.\" -*- nroff -*- .\" ovs.tmac .\" .\" Open vSwitch troff macro library . . .\" Continuation line for .IP. .de IQ . br . ns . IP "\\$1" .. . .\" Introduces a sub-subsection .de ST . PP . RS -0.15in . I "\\$1" . RE .. . .\" The content between the lines below is from an-ext.tmac in groff .\" 1.21, with some modifications. .\" ---------------------------------------------------------------------- .\" an-ext.tmac .\" .\" Written by Eric S. Raymond .\" Werner Lemberg .\" .\" Version 2007-Feb-02 .\" .\" Copyright (C) 2007, 2009, 2011 Free Software Foundation, Inc. .\" You may freely use, modify and/or distribute this file. .\" .\" .\" The code below provides extension macros for the `man' macro package. .\" Care has been taken to make the code portable; groff extensions are .\" properly hidden so that all troff implementations can use it without .\" changes. .\" .\" With groff, this file is sourced by the `man' macro package itself. .\" Man page authors who are concerned about portability might add the .\" used macros directly to the prologue of the man page(s). . . .\" Convention: Auxiliary macros and registers start with `m' followed .\" by an uppercase letter or digit. . . .\" Declare start of command synopsis. Sets up hanging indentation. .de SY . ie !\\n(mS \{\ . nh . nr mS 1 . nr mA \\n(.j . ad l . nr mI \\n(.i . \} . el \{\ . br . ns . \} . . HP \w'\fB\\$1\fP\ 'u . B "\\$1" .. . . .\" End of command synopsis. Restores adjustment. .de YS . in \\n(mIu . ad \\n(mA . hy \\n(HY . nr mS 0 .. . . .\" Declare optional option. .de OP . ie \\n(.$-1 \ . RI "[\fB\\$1\fP" "\ \\$2" "]" . el \ . RB "[" "\\$1" "]" .. . . .\" Start URL. .de UR . ds m1 \\$1\" . nh . if \\n(mH \{\ . \" Start diversion in a new environment. . do ev URL-div . do di URL-div . \} .. . . .\" End URL. .de UE . ie \\n(mH \{\ . br . di . ev . . \" Has there been one or more input lines for the link text? . ie \\n(dn \{\ . do HTML-NS "" . \" Yes, strip off final newline of diversion and emit it. . do chop URL-div . do URL-div \c . do HTML-NS . \} . el \ . do HTML-NS "\\*(m1" \&\\$*\" . \} . el \ \\*(la\\*(m1\\*(ra\\$*\" . . hy \\n(HY .. . . .\" Start email address. .de MT . ds m1 \\$1\" . nh . if \\n(mH \{\ . \" Start diversion in a new environment. . do ev URL-div . do di URL-div . \} .. . . .\" End email address. .de ME . ie \\n(mH \{\ . br . di . ev . . \" Has there been one or more input lines for the link text? . ie \\n(dn \{\ . do HTML-NS "" . \" Yes, strip off final newline of diversion and emit it. . do chop URL-div . do URL-div \c . do HTML-NS . \} . el \ . do HTML-NS "\\*(m1" \&\\$*\" . \} . el \ \\*(la\\*(m1\\*(ra\\$*\" . . hy \\n(HY .. . . .\" Continuation line for .TP header. .de TQ . br . ns . TP \\$1\" no doublequotes around argument! .. . . .\" Start example. .de EX . nr mE \\n(.f . nf . nh . ft CW .. . . .\" End example. .de EE . ft \\n(mE . fi . hy \\n(HY .. . .\" EOF .\" ---------------------------------------------------------------------- .TH ovs\-dpctl\-top "8" "2.15.0" "Open vSwitch" "Open vSwitch Manual" . .SH NAME \fBovs\-dpctl\-top\fR \- Top like behavior for ovs\-dpctl dump\-flows . .SH SYNOPSIS \fBovs\-dpctl\-top\fR [\-h] [\-v] [\-f FLOWFILES] [\-V] [\-s] [\-\-host HOST] [\-a | \-\-accumulate] [\-\-accumulate\-decay ACCUMULATEDECAY] [\-d DELAY] . .SH DESCRIPTION .PP This program summarizes \fBovs\-dpctl\fR flow content by aggregating the number of packets, total bytes and occurrence of the following fields: .IP \- Datapath in_port .IP \- Ethernet type .IP \- Source and destination MAC addresses .IP \- IP protocol .IP \- Source and destination IPv4 addresses .IP \- Source and destination IPv6 addresses .IP \- UDP and TCP destination port .IP \- Tunnel source and destination addresses . .SS "Output shows four values:" .IP \- FIELDS: the flow fields for example in_port(1). .IP \- COUNT: the number of lines in the dump\-flow output contain the flow field. .IP \- PACKETS: the total number of packets containing the flow field. .IP \- BYTES: the total number of bytes containing the flow field. If units are not present then values are in bytes. .IP \- AVERAGE: the average packets size (BYTES/PACKET). .PP .SS "Top Behavior" .PP While in top mode, the default behavior, the following single character commands are supported: .IP a \- toggles top in accumulate and live mode. Accumulate mode is described below. .IP s \- toggles which column is used to sort content in decreasing order. A DESC title is placed over the column. .IP _ \- a space indicating to collect dump\-flow content again .IP h \- halt output. Any character will restart sampling .IP f \- cycle through flow fields .IP q \- q for quit. .PP .SS "Accumulate Mode" .PP There are two supported modes: live and accumulate. The default is live. The parameter \fB\-\-accumulate\fR or the 'a' character in top mode enables the latter. In live mode, recent dump\-flow content is presented. Where as accumulate mode keeps track of the prior historical information until the flow is reset not when the flow is purged. Reset flows are determined when the packet count for a flow has decreased from its previous sample. There is one caveat, eventually the system will run out of memory if, after the accumulate\-decay period any flows that have not been refreshed are purged. The goal here is to free memory of flows that are not active. Statistics are not decremented. Their purpose is to reflect the overall history of the flow fields. .PP .SS "Debugging Errors" .PP Parsing errors are counted and displayed in the status line at the beginning of the output. Use the \fB\-\-verbose\fR option with \fB\-\-script to see what output was not parsed, like this: .PP $ ovs\-dpctl dump\-flows | ovs\-dpctl\-top \fB\-\-script\fR \fB\-\-verbose\fR .PP Error messages will identify content that failed to parse. .PP .SS "Access Remote Hosts" .PP The \fB\-\-host\fR must follow the format user@hostname. This script simply calls \&'ssh user@Hostname' without checking for login credentials therefore public keys should be installed on the system identified by hostname, such as: .PP $ ssh\-copy\-id user@hostname .PP Consult ssh\-copy\-id man pages for more details. .PP .SS "Expected usage" .PP $ ovs\-dpctl\-top .PP or to run as a script: .PP $ ovs\-dpctl dump\-flows > dump\-flows.log .PP $ ovs\-dpctl\-top \fB\-\-script\fR \fB\-\-flow\-file\fR dump\-flows.log .SS "OPTIONS" .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit. .TP \fB\-v\fR, \fB\-\-version\fR show program's version number and exit. .TP \fB\-f\fR FLOWFILES, \fB\-\-flow\-file\fR FLOWFILES file containing flows from ovs\-dpctl dump\-flow. .TP \fB\-V\fR, \fB\-\-verbose\fR enable debug level verbosity. .TP \fB\-s\fR, \fB\-\-script\fR Run from a script (no user interface). .TP \fB\-\-host\fR HOST Specify a user@host for retrieving flows see Accessing Remote Hosts for more information. .TP \fB\-a\fR, \fB\-\-accumulate\fR Accumulate dump\-flow content. .TP \fB\-\-accumulate\-decay\fR ACCUMULATEDECAY Decay old accumulated flows. The default is 5 minutes. A value of 0 disables decay. .TP \fB\-d\fR DELAY, \fB\-\-delay\fR DELAY Delay in milliseconds to collect dump\-flow content (sample rate).