vnstat.conf man page

vnstat.conf — vnStat configuration file




vnstat(1), vnstati(1) and vnstatd(1) 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 '#´ 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.

The configuration file is divided into three sections based on the usage of each keyword. The first section contains keywords that are considered generic for all commands, the second section is for daemon related keywords and the last section for image output.

Common Keywords

Try to automatically detect MaxBandwidth value for each monitored interface. Mostly only ethernet interfaces support this feature. MaxBandwidth or interface specfic MaxBW will be used as fallback value if detection fails. 1 = enabled, 0 = disabled. (vnstat and vnstatd only)
Time in seconds how much the boot time reported by system kernel can variate between updates. Value range: 0..300
Enable or disable the availability check of at least some free disk space before a database write. 1 = enabled, 0 = disabled.
Specifies the directory where interface databases are to be stored. A full path must be given and a leading '/' isn't required.
DayFormat, MonthFormat, TopFormat
Formatting of date in available outputs. Uses the same format as date(1). (vnstat and vnstati only)
Default interface used when no other interface is specified on the command line. (vnstat and vnstati only)
Locale 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)
Maximum bandwidth for all interfaces. If the interface specific traffic exceeds the given value then the data is assumed to be invalid and rejected. Set to 0 in order to disable the feature. Value range: 0..50000 (vnstat and vnstatd only)
Same as MaxBandwidth but can be used for setting individual limits for selected interfaces. The name of the interface is specified directly after the MaxBW keyword without spaces. For example MaxBWeth0 for eth0 and MaxBWppp0 for ppp0. Value range: 0..50000 (vnstat and vnstatd only)
Day of month that months are expected to change. Usually set to 1 but can be set to alternative values for example for tracking monthly billed traffic where the billing period doesn't start on the first day. Value range: 1..28 (vnstat and vnstatd only)
Modify 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 and weekly outputs, 3 = rate column is visible in all outputs where it is supported. (vnstat and vnstati only)
Default query mode when no parameters are given. 0 = normal, 1 = days, 2 = months, 3 = top10, 4 = exportdb, 5 = short, 6 = weeks, 7 = hours and 8 = xml. (vnstat only)
Select which unit is used when traffic rate is visible. 0 = bytes, 1 = bits. (vnstat and vnstati only)
Select used prefix when traffic rate is visible in bits per second. 0 = IEC binary prefixes (Kibit/s...), 1 = SI decimal prefixes (kbit/s...). (vnstat and vnstati only)
RXCharacter, TXCharacter
Character used for representing the percentual share of received and transmitted traffic in daily output. (vnstat only)
RXHourCharacter, TXHourCharacter
Character used for representing the percentual share of received and transmitted traffic in hourly output. (vnstat only)
Defines how many seconds the -tr option will sample traffic. Value range: 2..600 (vnstat only)
Log days without any traffic to daily list. 1 = enabled, 0 = disabled. (vnstat and vnstatd only)
Select how units are prefixed. This will option changes only the prefix, not how traffic is calculated. 0 = IEC standard prefixes (KiB/MiB/GiB/TiB), 1 = old style binary prefixes (KB/MB/GB/TB). (vnstat and vnstati only)
Enable or disable the use of file locking during database access. Disabling file locking may cause database corruption if several processes are trying to write to the file at the same time.


Config file that will be used unless $HOME/.vnstatrc exists or alternative value is given as command line parameter.


Using long date output formats may cause misalignment in shown columns if the length of the date exceeds the fixed size allocation.


Teemu Toivola <tst at iki dot fi>

See Also

vnstat(1), vnstati(1), vnstatd(1), units(7)

Referenced By

vnstat(1), vnstatd(1), vnstati(1).

DECEMBER 2016 version 1.16 User Manuals