ovs-dpctl-top man page
ovs-dpctl-top — Top like behavior for ovs-dpctl dump-flows
ovs-dpctl-top [-h] [-v] [-f FLOWFILES] [-V] [-s] [--host HOST] [-a | --accumulate] [--accumulate-decay ACCUMULATEDECAY] [-d DELAY]
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).
- COUNT: the number of lines in the dump-flow output contain the flow field.
- 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).
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
q - q for quit.
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.
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.
or to run as a script:
$ ovs-dpctl dump-flows > dump-flows.log
$ ovs-dpctl-top --script --flow-file dump-flows.log
- -h, --help
show this help message and exit.
- -v, --version
show program's version number and exit.
- -f FLOWFILES, --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 see Accessing 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
Delay in milliseconds to collect dump-flow content (sample rate).