usage: ovs-dpctl-top [-h] [-v] [-f FLOWFILES] [-V] [-s] [--host HOST] [-a]
[--accumulate-decay ACCUMULATEDECAY] [-d DELAY]
Top like behavior for ovs-dpctl dump-flows output.
This program summarizes ovs-dpctl flow content by aggregating the number
of packets, total bytes and occurrence of the following fields:
- Datapath in_port
- Ethernet type
- Source and destination MAC addresses
- IP protocol
- Source and destination IPv4 addresses
- Source and destination IPv6 addresses
- UDP and TCP destination port
- Tunnel source and destination addresses
Output shows four values:
- FIELDS: the flow fields for example in_port(1).
- PACKETS: the total number of packets containing the flow field.
- BYTES: the total number of bytes containing the flow field. If units are
not present then values are in bytes.
- AVERAGE: the average packets size (BYTES/PACKET).
- COUNT: the number of lines in the dump-flow output contain the flow field.
Top Behavior
While in top mode, the default behavior, the following single character
commands are supported:
a - toggles top in accumulate and live mode. Accumulate mode is described
below.
s - toggles which column is used to sort content in decreasing order. A
DESC title is placed over the column.
_ - a space indicating to collect dump-flow content again
h - halt output. Any character will restart sampling
f - cycle through flow fields. The initial field is in_port
q - q for quit.
Accumulate Mode
There are two supported modes: live and accumulate. The default is live.
The parameter --accumulate 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.
Debugging Errors
Parsing errors are counted and displayed in the status line at the beginning
of the output. Use the --verbose option with --script to see what output
was not parsed, like this:
$ ovs-dpctl dump-flows | ovs-dpctl-top --script --verbose
Error messages will identify content that failed to parse.
Access Remote Hosts
The --host 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:
$ ssh-copy-id user@hostname
Consult ssh-copy-id man pages for more details.
Expected usage
$ ovs-dpctl-top
or to run as a script:
$ ovs-dpctl dump-flows > dump-flows.log
$ ovs-dpctl-top --script --flow-file dump-flows.log
options:
-h, --help show this help message and exit
-v, --version show version
-f, --flow-file FLOWFILES
file containing flows from ovs-dpctl dump-flow
-V, --verbose enable debug level verbosity
-s, --script Run from a script (no user interface)
--host HOST Specify a user@host for retrieving flows seeAccessing Remote Hosts for
more information
-a, --accumulate Accumulate dump-flow content
--accumulate-decay ACCUMULATEDECAY
Decay old accumulated flows. The default is 5 minutes. A value of 0
disables decay.
-d, --delay DELAY Delay in milliseconds to collect dump-flow content (sample rate).
Options (9)
| Option | Description | Source |
|---|
-h, --help | show this help message and exit. | help + man |
-v, --version | show program's version number and exit. | help + man |
-f, --flow-file FLOWFILES | file containing flows from ovs-dpctl dump-flow. | help + man |
-V, --verbose | enable debug level verbosity. | help + man |
-s, --script | Run from a script (no user interface). | help + man |
--host HOST | Specify a user@host for retrieving flows see Accessing Remote Hosts for more information. | help + man |
-a, --accumulate | Accumulate dump-flow content. | help + man |
--accumulate-decay ACCUMULATEDECAY | Decay old accumulated flows. | help + man |
-d, --delay DELAY | Delay in milliseconds to collect dump-flow content (sample rate). | help + man |
Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.