When run, flent must be supplied either (a) a test name and one or more host names to connect to, or (b) one or more input files containing data from previous runs to post-process.
Test names, hostnames and input file names can all be specified as unqualified
arguments, and flent will do its best to guess which is which. For each
argument, if it is an existing file, it is assumed to be an input file, if it is
the name of an existing test configuration it’s assumed to be a test name, and
if neither of those are true, it is assumed to be a host name. The
-H switches can be used to explicitly specify the interpretation
of an argument.
flent [options] <host|test|input file …>
- -o OUTPUT, --output=OUTPUT¶
File to write processed output to (default standard out).
- -D DATA_DIR, --data-dir=DATA_DIR¶
Directory to store data files in. Defaults to the current directory.
- -i INPUT, --input=INPUT¶
File to read input from (instead of running tests). Input files can also be specified as unqualified arguments without using the
- -f FORMAT, --format=FORMAT¶
Select output format (plot, csv, org_table, stats). Default is no processed output (just writes the JSON data file).
- -p PLOT, --plot=PLOT¶
Select which plot to output for the given test (implies
-fplot). Use the
--list-plotsoption to see available plots.
- -t TITLE, --title-extra=TITLE¶
Text to add to plot title and data file name.
- -n NOTE, --note=NOTE¶
Add arbitrary text as a note to be stored in the JSON data file (under the NOTE key in the metadata object).
- -r RCFILE, --rcfile=RCFILE¶
Load configuration data from RCFILE (default ~/.flentrc). See section below for information on the rc file format.
- -x, --extended-metadata¶
Collect extended metadata and store it with the data file. May include details of your machine you don’t want to distribute; see the section on the data format below.
Collect extended metadata from a remote host. HOSTNAME is passed verbatim to ssh, so can include hosts specified in ~/.ssh/config. Note that gathering the data can take some time, since it involves executing several remote commands. This option can be specified multiple times and implies
Run the flent GUI. All other options are used as defaults in the GUI, but can be changed once it is running. The GUI can also be started by running the flent-gui binary. For more information on the GUI, see the The Flent GUI section.
Start a new GUI instance. Otherwise, flent will try to connect to an already running GUI instance and have that load any new data files specified as arguments. Implies
--guiwhen passed on the command line, but not when set in the rc file. Note that when multiple GUI instances are running, there is no guarantee as to which instance will get a subsequent open request (if run again without
Normally, the GUI defers redrawing plots until they are needed to avoid redrawing all open plots every time an option changes. This switch turns off that optimisation in favour of always redrawing everything straight away. This is useful when loading a bunch of plots from the command line and then wanting to flip through them without drawing delay.
- -b BATCH_NAME, --batch-name=BATCH_NAME¶
Run test batch BATCH_NAME (must be specified in a batch file loaded by the
--batch-fileoption). Can be supplied multiple times.
- -B BATCH_FILE, --batch-file=BATCH_FILE¶
Load batch file BATCH_FILE. Can be specified multiple times, in which case the files will be combined (with identically-named sections being overridden by later files). See appropriate section below for an explanation of the batch file format.
Override parameter ’key’ in the batch config and set it to ’value’. The key name will be case folded to lower case. Can be specified multiple times.
Dry batch run. Prints what would be done, but doesn’t actually run any tests.
Be verbose during batch run: Print all commands executed.
Do not randomise the order of test runs within each batch.
Try to resume a previously interrupted batch run. The argument is the top-level output directory from the previous run.
This will attempt to find a data file in the resume directory and load the BATCH_TIME from the previous run from that and continue. The assumption is that the output directory and filenames are generated from the batch time, so that they will match with the previous run when the same time is used. Then, tests for which data files already exist will be skipped on this run. If the rest of the batch invocation is different from the one being resumed, results may not be what you want.
There’s a check to ensure that the generated output path is a subdirectory of the resume directory, and the whole run will be aborted if it isn’t.
Test configuration options¶
These options affect the behaviour of the test being run and have no effect when parsing input files.
- -H HOST, --host=HOST¶
Host to connect to for tests. For tests that support it, multiple hosts can be specified by supplying this option multiple times. Hosts can also be specified as unqualified arguments; this parameter guarantees that the argument be interpreted as a host name (rather than being subject to auto-detection between input files, hostnames and test names).
Local hostname or IP address to bind to (for test tools that support this). Can be specified multiple times for tests that connect to more than one host; if it is, it must be specified as many times as there are hosts.
A remote hostname to connect to when starting a test. The idx is the runner index, which is assigned sequentially to each runner (and so it is not the same as the sequence of hostnames). Look for the ‘IDX’ key in SERIES_META for a test get the idx used here, but note that the idx assignment depends on the exact arguments to the test.
This works by simply prepending ‘ssh HOSTNAME’ to the runner command, so it relies on the same binaries being in the same places on both machines, and won’t work for all runners.
This option can be specified multiple times to have multiple runners run on remote hosts.
- -l LENGTH, --length=LENGTH¶
Base test length (some tests may add some time to this).
- -s STEP_SIZE, --step-size=STEP_SIZE¶
Measurement data point step size.
- -d DELAY, --delay=DELAY¶
Number of seconds to delay parts of test (such as bandwidth loaders).
- -4, --ipv4¶
Use IPv4 for tests (some tests may ignore this).
- -6, --ipv6¶
Use IPv6 for tests (some tests may ignore this).
Socket timeout (in seconds) used for UDP delay measurement, to prevent stalls on packet loss. Only enabled if the installed netperf version is detected to support this (requires SVN version of netperf).
For the default value, see the output of flent
-h. The value of this parameter is an implicit upper bound on how long a round-trip time that can be measured. As such you may need to adjust it if you are experiencing latency above the default value. Set to 0 to disable.
Send size (in bytes) used for TCP tests. Netperf uses the socket buffer size by default, which if too large can cause spikes in the throughput results. Lowering this value will increase CPU usage but also improves the fidelity of the throughput results without having to decrease the socket buffer size.
Can be specified multiple times, with each value corresponding to a stream of a test. If only specified once, the same value will be applied to all flows.
Arbitrary test parameter in key=value format. Key will be case folded to lower case. The values are stored with the results metadata, and so can be used for storing arbitrary information relevant for a particular test run.
In addition to serving as simple metadata, the test parameters can also affect the behaviour of some test configurations. See the Supplied Tests section for information on these.
This option can be specified multiple times to set multiple test parameters.
Switch upstream and downstream directions for data transfer. This means that ’upload’ will become ’download’ and vice versa. Works by exchanging netperf
TCP_STREAMparameters, so only works for tests that employ these as their data transfer, and only for the TCP streams.
Parse socket stats during test. This will capture and parse socket statistics for all TCP upload flows during a test, adding TCP cwnd and RTT values to the test data. Requires the ‘ss’ utility to be present on the system, and can fail if there are too many simultaneous upload flows; which is why this option is not enabled by default.
Define a new symbolic name that can be used when specifying flow markings using the ‘markings’ test parameter. This can be used to make it easier to specify custom diffserv markings on flows by using symbolic names for each marking value instead of the hex codes. Values specified here will be used in addition to the common values (listed below), and cannot override the built-in names. Names will be case-folded when matching.
The list of symbolic markings natively supported, along with their hex expansions, are:
AF11: 0x28 CS0: 0x00 AF12: 0x30 CS1: 0x20 AF13: 0x38 CS2: 0x40 AF21: 0x48 CS3: 0x60 AF22: 0x50 CS4: 0x80 AF23: 0x58 CS5: 0xa0 AF31: 0x68 CS6: 0xc0 AF32: 0x70 CS7: 0xe0 AF33: 0x78 EF: 0xb8 AF41: 0x88 AF42: 0x90 AF43: 0x98
Note that the hexadecimal values denote the value of the full ToS byte (including the two ECN bits), so they need to be right-shifted by two bits to get the corresponding diffserv code points.
Plot configuration options¶
These options are used to configure the appearance of plot output and only make
sense combined with
Override the figure axis labels. Can be specified twice, corresponding to figures with multiple axes.
- -I, --invert-latency-y¶
Invert latency data series axis (typically the Y-axis), making plots show ’better’ values upwards.
- -z, --zero-y¶
Always start Y axis of plot at zero, instead of autoscaling the axis. Autoscaling is still enabled for the upper bound. This also disables log scale if enabled.
Use the specified logarithmic scale on plots.
Data normalisation factor. Divide all data points by this value. Can be specified multiple times, in which case each value corresponds to a data series.
Specify bounds of the plot axes. If specifying one number, that will become the upper bound. Specify two numbers separated by a comma to specify both upper and lower bounds. To specify just the lower bound, add a comma afterwards. Can be specified twice, corresponding to figures with multiple axes.
- -S, --scale-mode¶
Treat file names (except for the first one) passed as unqualified arguments as if passed as
--scale-data(default as if passed as
Concatenate multiple result sets into one data series. This means that each data file will have its time axis shifted by the preceding series duration and appended to the first data set specified. Only works for data sets from the same test, obviously.
Plot data points with absolute UNIX time on the x-axis. This requires the absolute starting time for the test run to be stored in the data file, and so it won’t work with data files that predates this feature.
When plotting multiple data series, plot each one on a separate subplot instead of combining them into one plot. This mode is not supported for all plot types, and only works when
Skip missing series entirely from bar plots, instead of leaving an empty space for it.
Do not print the number of data points on combined plots. When using plot types that combines results from several test runs, the number of data series in each combined data point is normally added after the series name, (n=X) for X data series. This option turns that off.
Exclude annotation with hostnames, time and test length from plots.
- --figure-note=NOTE, --fig-note=NOTE¶
Add a note (arbitrary text) to the bottom-left of the figure.
Exclude title from plots.
Override plot title with this string. Completely discards the configured title (from the test configuration), as well as the title stored in the data set, and replaces it with the value supplied here. This is useful to override the plot title at the time of plotting, for instance to add a title to an aggregate plot from several data series. When this parameter is specified,
--no-titlehas no effect.
Hides tick labels from box and bar plots.
Don’t use line markers to differentiate data series on plots.
Exclude legend from plots.
Place a horizontal legend below the plot instead of a vertical one next to it. Doesn’t always work well if there are too many items in the legend.
Override legend title on plot.
Control legend placement. Enabling this option will place the legend inside the plot at the specified location. Can be one of ‘best’, ‘upper right’, ‘upper left’, ‘lower left’, ‘lower right’, ‘right’, ‘center left’, ‘center right’, ‘lower center’, ‘upper center’ or ‘center’.
Reverse the order of items in the legend. This can be useful to make the legend order match the data series in some cases.
Filter legend labels by removing the longest common substring from all entries. This is not particularly smart, so use with care.
Replace ‘src’ with ‘dst’ in legends. Can be specified multiple times.
Filter the plot legend by the supplied regular expression (removing any text from the legend that matches the expression). Can be specified multiple times, in which case the filters will be applied in the order specified. Note that for combining several plot results, the regular expression is also applied before the grouping logic, meaning that a too wide filter can mess up the grouping.
Override dataset label. Can be specified multiple times when multiple datasets are being plotted, in which case the order of labels corresponds to the order of datasets.
--override-title, this is applied at the time of plotting.
Filter out specified series from plot. Can be specified multiple times.
Split data sets into groups when creating box plots. Specify this option multiple times to define the new groups; the value of each option is the group name.
Say you’re plotting nine datasets which are really testing two variables with three values each. In this case, it can be useful to have the box plot of the results be split into three parts (corresponding to the values of one variable) with each three boxes in each of them (corresponding to the values of the second variable). This option makes this possible; simply specify it three times with the labels to be used for the three groups.
A constraint on this option is that the number of datasets being plotted must be divisible by the number of groups.
Comma-separated list of colours to be used for the plot colour cycle. Can be specified in any format understood by matplotlib (including HTML hex values prefixed with a #).
Yes, this option uses British spelling. No, American spelling is not supported.
Override colour_mode attribute. This changes the way colours are assigned to bar plots. The default is ‘groups’ which assigns a separate colour to each group of data series. The alternative is ‘series’ which assigns a separate colour to each series, repeating them for each data group.
group_bysetting for combination plots. This is useful to, for instance, switch to splitting up combined data sets by batch run instead of by file name.
When doing a combination plot save the intermediate data to
DIRNAME. This can then be used for subsequent plotting to avoid having to load all the source data files again on each plot.
Figure width in inches. Used when saving plots to file and for default size of the interactive plot window.
Figure height in inches. Used when saving plots to file and for default size of the interactive plot window.
Figure DPI. Used when saving plots to raster format files.
Use the fallback layout engine (tight_layout built in to matplotlib). Use this if text is cut off on saved figures. The downside to the fallback engine is that the size of the figure (as specified by
--figure-height) is no longer kept constant.)
Don’t load included matplotlibrc values. Use this if autodetection of custom matplotlibrc fails and flent is inadvertently overriding rc values.
Don’t highlight data series on hover in interactive plot views. Use this if redrawing is too slow, or the highlighting is undesired for other reasons.
Additional data files to consider when scaling the plot axes (for plotting several plots with identical axes). Note, this displays only the first data set, but with axis scaling taking into account the additional data sets. Can be supplied multiple times; see also
Misc and debugging options:¶
- -L LOG_FILE, --log-file=LOG_FILE¶
Write debug log (test program output) to log file.
List available tests and exit.
List available plots for selected test and exit.
- -V, --version¶
Show Flent version information and exit.
- -v, --verbose¶
Enable verbose logging to console.
- -q, --quiet¶
Disable normal logging to console (and only log warnings and errors).
Print full exception backtraces to console.
- -h, --help¶
Show usage help message and exit.
Flent will abort what it is currently doing on receiving a SIGINT – this includes killing all runners, cleaning up temporary files and shutting down as gracefully as possible. Runners are killed with SIGTERM in this mode, and their output is discarded. If a batch run is in progress, the current test will be interrupted in this way, and the rest of the batch run is aborted. Previously completed tests and their results are not aborted. Post-commands marked as ’essential’ will be run after the test is interrupted. Additionally, flent converts SIGTERM into SIGINT internally and reacts accordingly.
Upon receiving a SIGUSR1, flent will try to gracefully abort the test it is currently running, and parse the output of the runners to the extent that any such output exists. That is, each runner will be killed by a SIGINT, which will cause a graceful shutdown for at least ping and netperf (although netperf running in TCP_MAERTS mode will bug out when interrupted like this, so end-of-tests statistics will be missing). Flent will only react once to a SIGUSR1, sending exactly one SIGINT to the active runners, then wait for them to exit. This may take several seconds in the case of netperf. If the runners for some reason fail to exit, flent will be stuck and will need to be killed with SIGINT. If running in batch mode, SIGUSR1 will only affect the currently running test; subsequent tests will still be run.