OVS-FLOWVIZ(8)
π OVS-FLOWVIZ(8) β Open vSwitch manual π
okay bestie, this is the whole manual vibe for ovs-flowviz β the Open vSwitch tool that makes OpenFlow and datapath flow dumps actually make sense. β¨
πΈ NAME πΈ
ovs-flowviz β utility for visualizing OpenFlow and datapath flows π¦
π SYNOPSIS π
ovs-flowviz [-i [alias,]file | --input [alias,]file] [-c file | --config file] [-f filter | --filter filter] [-l filter | --highlight filter] [--style style] flow-type format [argsβ¦]
ovs-flowviz --help
β¨ DESCRIPTION β¨
ovs-flowviz helps you visualize OpenFlow and datapath flow dumps in different formats so theyβre way easier to understand. Literally the glow-up your flow table needed. π
It reads flows from stdin or from a file specified by the --input option, filters them, highlights them, and finally outputs them in one of the predefined formats. Main character energy from start to finish. π
π OPTIONS π
-h,--helpβ Print a brief help message to the console. π«Ά-i [<alias>,]<file>,--input [<alias>,]<file>β File to read flows from. If not provided,ovs-flowvizwill read flows fromstdin. This option can be specified multiple times. The file path can be prepended by an alias that will be shown in the output. For example:
--input node1,/path/to/file1 --input node2,/path/to/file2
-c <file>,--config <file>β Style configuration file to use, overriding the default one. Styles defined in the style configuration file can be selected using the--styleoption.
For more details on the style configuration file, see the Style Configuration File section below. π
-f <filter>,--filter <filter>β Flow filter expression. Only those flows matching the expression will be shown (although some formats implement filtering differently, see the Datapath tree format section below).
The filtering syntax is detailed in Filtering Syntax. π
-l <filter>,--highlight <filter>β Highlight the flows that match the provided filter expression.
The filtering syntax is detailed in Filtering Syntax. π‘
--style <style>β Style. The selected style must be defined in the style configuration file. πflow-typeβopenflowordatapath.formatβ See the Supported formats section. π
π SUPPORTED FORMATS π
ovs-flowviz supports several visualization formats for both OpenFlow and datapath flows:
- Flow Type: Both β Format:
consoleβ Prints the flows in a configurable, colorful style in the console. π¨ - Flow Type: Both β Format:
jsonβ Prints the flows in JSON format. π§Ύ - Flow Type: Both β Format:
htmlβ Prints the flows in an HTML list. π - Flow Type: OpenFlow β Format:
cookieβ Prints the flows in the console sorted by cookie. πͺ - Flow Type: OpenFlow β Format:
logicβ Prints the logical structure of flows in the console. π§ - Flow Type: Datapath β Format:
treeβ Prints the flows as a tree structure arranged byrecirc_idandin_port. π³ - Flow Type: Datapath β Format:
graphβ Prints a graphviz graph of the flows arranged byrecirc_idandin_port. π
π¨ Console format π¨
The console format works for both OpenFlow and datapath flow types, and prints flows in the terminal using the style determined by the --style option.
Arguments:
-h,--heat-mapβ Color of the packet and byte counters to reflect their relative size. The color gradient goes through the following colors: blue (coldest, lowest), cyan, green, yellow, red (hottest, highest). π₯
Note filtering is applied before the range is calculated. π«Ά
π§Ύ JSON format π§Ύ
The json format works for both OpenFlow and datapath flow types, and prints flows in JSON format. See the JSON Syntax section for more details.
π HTML format π
The html format works for both OpenFlow and datapath flows, and prints flows in an HTML table that offers some basic interactivity. OpenFlow flows are sorted in tables and datapath flows are arranged in flow trees (see Datapath tree format for more details).
Styles defined via Style Configuration File and selected via --style option also apply to the html format. β¨
πͺ OpenFlow cookie format πͺ
The OpenFlow cookie format is similar to the console format but instead of arranging the flows by table, it arranges the flows by cookie. Thatβs it, thatβs the vibe. π
π§ OpenFlow logic format π§
The OpenFlow logic format helps visualize the logic structure of OpenFlow pipelines by arranging flows into logical blocks. A logical block is a set of flows that have:
- Same priority. π
- Match on the same fields (regardless of the match value and mask). π―
- Execute the same actions (regardless of the actionsβ arguments, except for
resubmitandoutput). β‘ - Optionally, the cookie can be included as part of the logical flow. πͺ
Arguments:
-s,--show-flowsβ Show all the flows under each logical block. π-d,--ovn-detraceβ Useovn-detrace.pyscript to extract cookie information (implies β-cβ). π§-c,--cookieβ Consider the cookie in the logical block. πͺ--ovn-detrace-path <path>β Use an alternative path to search forovn_detrace.py. π€οΈ--ovnnb-db <conn>β OVN NB database connection method (implies β-dβ). Default:unix:/var/run/ovn/ovnnb_db.sock. πΎ--ovnsb-db <conn>β OVN SB database connection method (implies β-dβ). Default:unix:/var/run/ovn/ovnsb_db.sock. πΎ--o <filter>,--ovn-filter <filter>β Specify the filter to be run on the ovn-detrace information. Syntax: python regular expression (Seehttps://docs.python.org/3/library/re.html). π-h,--heat-mapβ Change the color of the packet and byte counters to reflect their relative size. The color gradient goes through the following colors: blue (coldest, lowest), cyan, green, yellow, red (hottest, highest). π₯
Note filtering is applied before the range is calculated. π«Ά
π³ Datapath tree format π³
The datapath tree format arranges datapath flows in a hierarchical tree. The tree is comprised of blocks with the same recirc_id and in_port. Within those blocks, flows with the same action are combined. And matches which are the same are omitted to reduce the visual noise.
When a flowβs actions includes the recirc() action with a specific recirc_id, flows matching on that recirc_id and the same in_port are listed below. This is done recursively for all actions.
The result is a hierarchical representation that shows how actions are related to each other via recirculation. Note that flows with a specific non-zero recirc_id are listed below each group of flows that have a corresponding recirc() action. Therefore, the output contains duplicated flows and can be verbose.
Filtering works in a slightly different way for datapath flow trees. Unlike other formats where a filter simply removes non-matching flows, the output of a filtered datapath flow tree will show full sub-trees that contain at least one flow that satisfies the filter.
The html format prints this same tree as an interactive HTML table and the graph format shows the same tree as a graphviz graph. π¦
π Datapath graph format π
The datapath graph generates a graphviz visual representation of the same tree-like flow hierarchy that the tree format prints.
Arguments:
-h,--htmlβ Print the graphviz format as an svg image alongside an interactive HTML table of flows. πΌοΈ
π JSON SYNTAX π
okay so when you print a single-file OpenFlow or datapath dump without PMD thread blocks in json format, you get a list of JSON objects, and each one is literally a flow. slay.
That list can be inside one or more levels of JSON dictionaries if multiple files are processed (filename used as key) or if PMD thread blocks are found in datapath flows (name of the thread used as key). nested lore, but we move.
Each flow object includes these keys:
origβ original flow string.infoβ object with the flow information such ascookie,duration,table,n_packets,n_bytes, etc.matchβ object with the flow match. For each match, the object contains a key-value where the key is the name of the match as defined inovs-fields(7)andovs-ofctl(8), and the value represents the match value. The way each value is represented depends on its type. See Value representation.actionsβ list of action objects. Each action is represented by a JSON object that has one key and one value. The key corresponds to the action name. The value represents the arguments of the key. See Action representation.ufidβ the UFID (datapath flows only).
πΈ Value representation πΈ
values are represented differently depending on their type, bestie:
- Flags β the value of flags is
true. - Decimal / Hexadecimal β represented by their integer value. If they support masking, represented by a dictionary with two keys:
valuecontains the field value andmaskcontains the mask. Both are integers. - Ethernet β represented by a string:
{address}[/{mask}] - IPv4 / IPv6 β represented by a string
{address}[/{mask}] - Registers β represented by a dictionary with three keys:
fieldcontains the field value (string),start, andendrepresent the first and last bit of the register value.
for example, the register
NXM_NX_REG10[0..15]
is represented as
{
"field": "NXM_NX_REG10",
"start": 0,
"end": 15
},
π Action representation π
actions are generally represented by an object that has a single key and value. The key is the action name as defined in ovs-actions(7).
The value of actions that have no arguments (such as drop) is (boolean) true.
The value of actions that have a list of arguments (e.g: resubmit([port],[table],[ct])) is an object that has the name of the argument as key. The argument names for each action is defined in ovs-actions. For example, the action
resubmit(,10)
is represented as
{
"resubmit": {
"port": "",
"table": 10
}
}
The value of actions that have a key-word list as arguments (e.g: ct([argument])) is an object whose keys correspond to the keys defined in ovs-actions(7). The way values are represented depends on the type of the argument. For example, the action
ct(table=14,zone=NXM_NX_REG12[0..15],nat)
is represented as
{
"ct": {
"table": 14,
"zone": {
"field": "NXM_NX_REG12",
"start": 0,
"end": 15
},
"nat": true
}
}
β¨ STYLE CONFIGURATION FILE β¨
The style configuration file is selected via the --config option and has INI syntax. It can define any number of styles to be used by both console and html formats. Once defined in the configuration file, formats are selected using the --style option.
INI sections are used to define styles, [styles.mystyle] defines a style called mystle. Within a section styles can be defined as:
[FORMAT].[PORTION].[SELECTOR].[ELEMENT] = [VALUE]
FORMATβ eitherconsoleorhtml.PORTIONβ part of the key-value the style applies to:keyto indicate the key part of a key-value,valueto indicate the value part of a key-value,flagto indicate a single flag ordelimto indicate delimiters such as parentheses, brackets, etc.SELECTORβ select the key-value the style applies to:highlightedto indicate highlighted key-values,type.<type>to indicate certain types such asIPAddressorEthMaskor<keyname>to select a particular key name.ELEMENTβ select the style element to modify:colororunderline(only for console format).VALUEβ either a color hex, other color names defined in the rich python library (https://rich.readthedocs.io/en/stable/appendix/colors.html) ortrueif the element isunderline.
A default configuration file is shipped with ovs-flowviz and its path is printed in the --help output. A detailed description of the syntax alongside some examples are available there.
π₯ FILTERING SYNTAX π₯
ovs-flowviz provides rich highlighting and filtering. The special command ovs-flowviz filter dumps the filtering syntax:
$ ovs-flowviz filter
Filter Syntax
*************
[! | not ] {key}[[.subkey]...] [OPERATOR] {value})] [LOGICAL OPERATOR] ...
Comparison operators:
= equality
< less than
> more than
~= masking (valid for IP and Ethernet fields)
Logical operators:
!{expr}: NOT
{expr} && {expr}: AND
{expr} || {expr}: OR
Matches and flow metadata:
To compare against a match or info field, use the field directly, e.g:
priority=100
n_bytes>10
Use simple keywords for flags:
tcp and ip_src=192.168.1.1
Actions:
Actions values might be dictionaries, use subkeys to access individual
values, e.g:
output.port=3
Use simple keywords for flags
drop
Examples of valid filters:
nw_addr~=192.168.1.1 && (tcp_dst=80 || tcp_dst=443)
arp=true && !arp_tsa=192.168.1.1
n_bytes>0 && drop=true
Example expressions:
n_bytes > 0 and drop
nw_src~=192.168.1.1 or arp.tsa=192.168.1.1
! tcp && output.port=2
π EXAMPLES π
Print OpenFlow flows sorted by cookie adding OVN data to each one:
$ ovs-flowviz -i flows.txt openflow cookie --ovn-detrace
Print OpenFlow logical structure, showing the flows and heat-map:
$ ovs-flowviz -i flows.txt openflow logic --show-flows --heat-map
Display OpenFlow flows in HTML format with βlightβ style and highlight drops:
$ ovs-flowviz -i flows.txt --style "light" --highlight "n_packets > 0 and drop" openflow html > flows.html
Display the datapath flows in an interactive graphviz + HTML view:
$ ovs-flowviz -i flows.txt datapath graph --html > flows.html
Display the datapath flow trees that lead to packets being sent to port 10:
$ ovs-flowviz -i flows.txt --filter "output.port=10" datapath tree
π AUTHOR π
The Open vSwitch Development Community
π COPYRIGHT π
2016-2024, The Open vSwitch Development Community
source/version: 3.6 Β· date: Feb 13, 2026 Β· page: OVS-FLOWVIZ(8) β bye bestie, go visualize those flows π
β¨π¦
π¦ where this page comes from
- fedora 43: openvswitch 3.6.2-1.fc43 Β· Apache-2.0 AND LGPL-2.0-or-later AND SISSL
- fedora 43: openvswitch 3.6.2-1.fc43 Β· Apache-2.0 AND LGPL-2.0-or-later AND SISSL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms