--config
Command-line option path, when given, overrides automatic search.
Vnstat configuration file
Configuration file locations are platform- and environment-dependent. See FILES below.
vnstat(1), vnstati(1) and vnstatd(8) all use the same configuration file for configuration related settings. Some of the settings are common for all three programs. The file consists of keyword-argument pairs, one per line. Empty lines and lines starting with '#' or ';' are interpreted as comments and not processed. Arguments may optionally be enclosed in double quotes (") in order to represent arguments containing spaces. Arguments can be padded with spaces or tabulator characters. A hardcoded default value will be used if a keyword can't be found from the configuration file or if the configured value cannot be parsed or is outside supported value range.
The configuration file is divided into three sections based on the usage of each keyword. The first section ("COMMON KEYWORDS") contains keywords that are considered common for all commands, the second section ("DAEMON RELATED KEYWORDS") is for daemon related keywords and the last section ("IMAGE OUTPUT RELATED KEYWORDS") is for image output.
DatabaseDirSpecifies the directory where the database is to be stored. A full path must be given and a leading '/' isn't required.
Formatting of date in available outputs. Uses the same format as date(1). (vnstat and vnstati only)
DefaultDecimalsNumber of decimals to use in outputs. Value range: 0..2 (vnstat and vnstati only)
EstimateBarVisibleShow a visual representation of the traffic estimation if OutputStyle has been configured with a value of 1 or 2 to make the bar column visible. 1 = enabled, 0 = disabled. (vnstat only, see EstimateStyle for vnstati)
EstimateTextReplace default "estimated" text on the estimate line with custom text. Limited to 9 characters. (vnstat and vnstati only)
EstimateVisibleShow a line with traffic estimation for the selected time period or alert as the last line of the output in output modes supporting it. Disabling estimate visibility also disables estimate conditions in --alert. 1 = enabled, 0 = disabled. (vnstat and vnstati only)
HourlyDecimalsNumber of decimals to use in hourly graph output. Value range: 0..2 (vnstat only)
HourlySectionStyleSelect what kind of spacer is used for separating the numerical sections of the hourly graph output. 0 = none, 1 = '|', 2 = '][', 3 = '[ ]'. (vnstat only)
InterfaceDefault interface used when no other interface is specified on the command line. Leave empty for automatic selection. The automatic selection will prioritize the interface with most traffic for outputs doing database queries. Queries not using the database will first check if the database is available and select the interface with most traffic out those that are currently visible in the system. If no database can be read then the first available interface will be used. (vnstat and vnstati only)
InterfaceMatchMethodMethod for matching interface given for a query to an interface in the database.
Method 0 requires the interface name to be a case sensitive exact match. Method 1 extends the previous method by allowing a case sensitive exact match of the interface alias. Method 2 extends the previous method by allowing a case insensitive exact match of the interface alias. Method 3 extends the previous method by allowing a case insensitive match of the beginning of the interface alias.
Methods will be evaluated in the order described above resulting in exact interface matches always taking precedence. If any interface alias matching method results in multiple matches then the interface with the highest total traffic will be used. (vnstat and vnstati only)
InterfaceOrderInterface order in outputs with multiple interfaces. 0 = alphabetical by name, 1 = alphabetical by alias. If 1 is selected and multiple interfaces don't have aliases then the interface name will be used for defining the order. (vnstat only)
Number of entries to show in list outputs unless overridden from the command line. Set to 0 to show all entries available in the database. (vnstat and vnstati)
LiveSpinnerShow spinning animation at the beginning of -l / --live output line. 1 = enabled, 0 = disabled. (vnstat only)
LocaleLocale setting to be used for prints. This replaces the LC_ALL environment variable. Set to "-" or leave empty in order to use the system default value. (vnstat and vnstati only)
OutputStyleModify the content and style of text outputs. 0 = minimal and narrow output for terminal with limited width, 1 = normal output with bar column visible, 2 = same as 1 except rate is visible in summary output, 3 = rate column is visible in all outputs where it is supported. (vnstat and vnstati only)
QueryModeDefault query mode when no parameters are given. 0 = summary, 1 = days, 2 = months, 3 = top, 4 = single summary, 5 = short, 6 = years, 7 = hours graph, 8 = xml, 9 = one line, 10 = json, 11 = hours, 12 = 5 minute and 13 = 95th percentile. (vnstat only)
RateUnitSelect which unit is used when traffic rate is visible. 0 = bytes, 1 = bits. (vnstat and vnstati only)
RateUnitModeSelect used prefix when traffic rate is shown in bits per second. IEC binary prefixes are calculated with powers of 1024. SI decimal prefixes are calculated with powers of 1000. 0 = IEC binary prefixes (Kibit/s...), 1 = SI decimal prefixes (kbit/s...). (vnstat and vnstati only)
Character used for representing the percentual share of received and transmitted traffic in list mode outputs. (vnstat only)
Character used for representing the percentual share of received and transmitted traffic in hourly graph output. (vnstat only)
SampletimeDefines how many seconds the -tr option will sample traffic. Value range: 2..600 (vnstat only)
UnitModeSelect how units are prefixed. IEC and JEDEC binary prefixes are calculated with powers of 1024. SI decimal prefixes are calculated with powers of 1000. 0 = IEC standard prefixes (B/KiB/MiB/GiB...), 1 = old style (JEDEC) binary prefixes (B/KB/MB/GB...), 2 = SI decimals prefixes (B/kB/MB/GB...) (vnstat and vnstati only)
No configuration file is required. Built-in defaults are used if no file is found during automatic search.
--config
Command-line option path, when given, overrides automatic search.
$XDG_CONFIG_HOME/vnstat/vnstat.conf
Used only when the XDG_CONFIG_HOME environment variable is set to a non-empty value and --config has not been used. An empty value is treated as unset.
$HOME/.config/vnstat/vnstat.conf
Used when the HOME environment variable is set and no earlier location was found.
$HOME/.vnstatrc
Used when the HOME environment variable is set and no earlier location was found.
/etc/vnstat.conf
Used when no earlier location was found.
/usr/local/etc/vnstat.conf
Used when no earlier location was found.
Using long date output formats may cause misalignment or clipping in shown columns if the length of the date exceeds the fixed size allocation.
9 releases since Debian 6.0 (Squeeze); the text changed 8 times.