VNSTAT.CONF(5)
π VNSTAT.CONF(5) β the config file bestie π
okay so this is VNSTAT.CONF(5), aka the vnstat.conf manual page, and itβs literally the shared config file for vnstat(1), vnstati(1) and vnstatd(8). Same file, three programs, main character energy only. π
β¨ NAME β¨
vnstat.conf β the vnStat configuration file, periodt. π«Ά
β¨ SYNOPSIS β¨
Configuration file locations are platform- and environment-dependent. See FILES below.
β¨ DESCRIPTION β¨
vibe check: 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.
π COMMON KEYWORDS π
These are the shared ones, bestie. iykyk. π
DatabaseDirβ specifies the directory where the database is to be stored. A full path must be given and a leading'/'isnβt required. (yes, thatβs the rule, donβt ask me, I just work here π)DayFormat,MonthFormat,TopFormatβ formatting of date in available outputs. Uses the same format asdate(1). (vnstatandvnstationly)DefaultDecimalsβ number of decimals to use in outputs. Value range:0..2. (vnstatandvnstationly)EstimateBarVisibleβ show a visual representation of the traffic estimation ifOutputStylehas been configured with a value of1or2to make the bar column visible.1= enabled,0= disabled. (vnstatonly, seeEstimateStyleforvnstati)EstimateTextβ replace default"estimated"text on the estimate line with custom text. Limited to9characters. (vnstatandvnstationly)EstimateVisibleβ show 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. (vnstatandvnstationly)HourlyDecimalsβ number of decimals to use in hourly graph output. Value range:0..2. (vnstatonly)HourlySectionStyleβ select what kind of spacer is used for separating the numerical sections of the hourly graph output.0= none,1='|',2='][',3='[ ]'. (vnstatonly)Interfaceβ default 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. (vnstatandvnstationly)InterfaceMatchMethodβ method for matching interface given for a query to an interface in the database. Method0requires the interface name to be a case sensitive exact match. Method1extends the previous method by allowing a case sensitive exact match of the interface alias. Method2extends the previous method by allowing a case insensitive exact match of the interface alias. Method3extends 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. (vnstatandvnstationly)InterfaceOrderβ interface order in outputs with multiple interfaces.0= alphabetical by name,1= alphabetical by alias. If1is selected and multiple interfaces donβt have aliases then the interface name will be used for defining the order. (vnstatonly)List5Mins,ListHours,ListDays,ListMonths,ListYears,ListTopβ number of entries to show in list outputs unless overridden from the command line. Set to0to show all entries available in the database. (vnstatandvnstati)LiveSpinnerβ show spinning animation at the beginning of-l/--liveoutput line.1= enabled,0= disabled. (vnstatonly)Localeβ locale setting to be used for prints. This replaces theLC_ALLenvironment variable. Set to"-"or leave empty in order to use the system default value. (vnstatandvnstationly)OutputStyleβ 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 as1except rate is visible in summary output,3= rate column is visible in all outputs where it is supported. (vnstatandvnstationly)QueryModeβ default 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 and13= 95th percentile. (vnstatonly)RateUnitβ select which unit is used when traffic rate is visible.0= bytes,1= bits. (vnstatandvnstationly)RateUnitModeβ select used prefix when traffic rate is shown in bits per second. IEC binary prefixes are calculated with powers of1024. SI decimal prefixes are calculated with powers of1000.0= IEC binary prefixes (Kibit/s...),1= SI decimal prefixes (kbit/s...). (vnstatandvnstationly)RXCharacter,TXCharacterβ character used for representing the percentual share of received and transmitted traffic in list mode outputs. (vnstatonly)RXHourCharacter,TXHourCharacterβ character used for representing the percentual share of received and transmitted traffic in hourly graph output. (vnstatonly)Sampletimeβ defines how many seconds the-troption will sample traffic. Value range:2..600. (vnstatonly)UnitModeβ select how units are prefixed. IEC and JEDEC binary prefixes are calculated with powers of1024. SI decimal prefixes are calculated with powers of1000.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...). (vnstatandvnstationly)
π οΈ DAEMON RELATED KEYWORDS π οΈ
daemon bestie, this section is for you. No cap, these settings are lowkey important. π¦
5MinuteHoursβ data retention duration for the5minute resolution entries. The configuration defines for how many past hours entries will be stored. Set to-1for unlimited entries or to0to disable the data collection of this resolution.64bitInterfaceCountersβ select interface counter handling. Set to1for defining that all interfaces use64-bitcounters on the kernel side and0for defining32-bitcounter. Set to-1for using the old style logic used in earlier versions where counter values within32-bitsare assumed to be32-bitand anything larger is assumed to be a64-bitcounter. This may produce false results if a64-bitcounter is reset within the32-bits. Set to-2for using automatic detection based on available kernel datastructures.AlwaysAddNewInterfacesβ enable or disable automatic creation of new database entries for interfaces not currently in the database even if the database file already exists when the daemon is started. New database entries will also get created for new interfaces seen while the daemon is running. Pseudo interfaceslo,lo0andsit0are always excluded from getting added.1= enabled,0= disabled.BandwidthDetectionβ try to automatically detectMaxBandwidthvalue for each monitored interface. Mostly only ethernet interfaces support this feature.MaxBandwidthwill be used as fallback value if detection fails. Any interface specificMaxBWconfiguration will disable the detection for the specified interface. In Linux, the detection is disabled fortuninterfaces due to the Linux kernel always reporting10 Mbitregardless of the used real interface.1= enabled,0= disabled.BandwidthDetectionIntervalβ how often in minutes interface specific detection ofMaxBandwidthis done for detecting possible changes whenBandwidthDetectionis enabled. Can be disabled by setting to0. Value range:0..30BootVariationβ time in seconds how much the boot time reported by system kernel can variate between updates. Value range:0..300CheckDiskSpaceβ enable or disable the availability check of at least some free disk space before a database write.1= enabled,0= disabled.CreateDirsβ enable or disable the creation of directories when a configured path doesnβt exist. This includesDatabaseDir,LogFileandPidFiledirectories. TheLogFiledirectory will be created only whenUseLogginghas been set to1. ThePidFiledirectory will be created only if the daemon is started as a background process. The daemon process will try to create the directory using permissions of the user used to start the process.DaemonGroupβ specify the group to which the daemon process should switch during startup. The group can either be the name of the group or a numerical group id. Leave empty to disable group switching. This option can only be used when the process is started as root.DaemonUserβ specify the user to which the daemon process should switch during startup. The user can either be the login of the user or a numerical user id. Leave empty to disable user switching. This option can only be used when the process is started as root.DailyDaysβ how long we keep the one-day resolution entries, bestie π. This config says how many past days entries will be stored. Set to-1for unlimited entries, or0to disable data collection for this resolution. Choose wisely πDatabaseSynchronousβ this one changes the SQLite"synchronous"flag, which controls how much care is taken to make sure disk writes have fully completed when writing data to the database before continuing other actions. Higher values take extra steps to ensure data safety at the cost of slower performance. A value of0will result in all handling being left to the filesystem itself. Set to-1to select the default value according to database mode controlled by theDatabaseWriteAheadLoggingsetting. See SQLite documentation for more details regarding values from1to3. Value range:-1..3β¨DatabaseWriteAheadLoggingβ enable or disable SQLite Write-Ahead Logging mode for the database. See SQLite documentation for more details, and note that support for read-only operations isn't available in older SQLite versions.1= enabled,0= disabled π¦HourlyDaysβ data retention duration for the one-hour resolution entries. The configuration defines for how many past days entries will be stored. Set to-1for unlimited entries or to0to disable the data collection of this resolution βLogFileβ specify the log file path and name to be used ifUseLoggingis set to1πMaxBandwidthβ maximum bandwidth for all interfaces. If traffic since the previous update would exceed the maximum possible transfer for the configured rate, then the delta for that interval is discarded and counters are synchronized instead. Set to0in order to disable the feature. Value range:0..400000π₯MaxBWβ same asMaxBandwidth, but you can use it for setting individual limits for selected interfaces. The name of the interface is specified directly after theMaxBWkeyword without spaces. For exampleMaxBWeth0foreth0andMaxBWppp0forppp0.BandwidthDetectionis disabled on an interface-specific level for eachMaxBWconfiguration. Value range:0..400000πMonthlyMonthsβ data retention duration for the one-month resolution entries. The configuration defines for how many past months entries will be stored. Set to-1for unlimited entries or to0to disable the data collection of this resolution πΈMonthRotateβ day of month that months are expected to change. Usually set to1, but it can be set to alternative values, for example for tracking monthly billed traffic where the billing period doesn't start on the first day. For example, if set to7, days of February up to and including the 6th will count for January. Changing this option will not cause existing data to be recalculated. Value range:1..28ποΈMonthRotateAffectsYearsβ enable or disableMonthRotatealso affecting yearly data. Applicable only whenMonthRotatehas a value greater than one.1= enabled,0= disabled β¨MonthRotateVisibleβ control visibility of a note documenting on which day of the month monthly data begins. The note is shown in text and image outputs that include monthly data.0= never,1= whenMonthRotateis not1,2= always. (vnstatandvnstationly) πOfflineSaveIntervalβ how often in minutes cached interface data is saved to file when all monitored interfaces are offline. Value range:SaveInterval..60π€PidFileβ specify the pid file path and name to be used. The file is created only if the daemon is started as a background process π§PollIntervalβ how often in seconds interfaces are checked for status changes. Value range:2..60β±οΈRescanDatabaseOnSaveβ automatically discover added interfaces from the database and start monitoring. The rescan is done everySaveIntervalorOfflineSaveIntervalminutes depending on the current activity state.1= enabled,0= disabled πSaveIntervalβ how often in minutes cached interface data is saved to file. The value in minutes multiplied by60must be at leastUpdateIntervalseconds. Value range:1..60πΎSaveOnStatusChangeβ enable or disable the additional saving to file of cached interface data when the availability of an interface changes, i.e., when an interface goes offline or comes online.1= enabled,0= disabled π¦TimeSyncWaitβ how many minutes to wait during daemon startup for the system clock to sync if the most recent database update appears to be in the future. This may be needed in systems without a real-time clock (RTC) which require some time after boot to query and set the correct time.0= wait disabled. Value range:0..60β³TopDayEntriesβ data retention duration for the top day entries. The configuration defines how many of the past top day entries will be stored. Set to-1for unlimited entries or to0to disable the data collection of this resolution πTrafficlessEntriesβ create database entries even when there is no traffic during the entry's time period.1= enabled,0= disabled πUpdateFileOwnerβ enable or disable the update of file ownership during daemon process startup. During daemon startup, only database, log and pid files will be modified if the user or group change feature (DaemonUserorDaemonGroup) is enabled and the files don't match the requested user or group. During manual database creation, this option will cause file ownership to be inherited from the database directory if the directory already exists. This option only has effect when the process is started as root or via sudo πUpdateIntervalβ how often in seconds the interface data is updated. Value range:PollInterval..300β‘UseLoggingβ enable or disable logging. This option is ignored when the daemon is started with-n,--nodaemon, which results in all log output being shown in the terminal the daemon process is using.0= disabled,1= logfile and2= syslog πͺ΅UseUTCβ enable or disable using UTC as timezone in the database for all entries. When enabled, all entries added to the database will use UTC regardless of the configured system timezone. When disabled, the configured system timezone will be used. Changing this setting will not result in already existing data to be modified.1= enabled,0= disabled πVacuumOnHUPSignalβ enable or disable the execution of SQLiteVACUUMcommand after the daemon has received aHUPsignal. When enabled, the database file is rebuilt and repacked into a minimal amount of disk space. The difference in size can be notable especially if data retention durations have been reduced or previously monitored interfaces removed from the database.1= enabled,0= disabled π§ΉVacuumOnStartupβ enable or disable the execution of SQLiteVACUUMcommand during daemon startup. When enabled, the database file is rebuilt and repacked into a minimal amount of disk space. The difference in size can be notable especially if data retention durations have been reduced or previously monitored interfaces removed from the database.1= enabled,0= disabled π§ΌYearlyYearsβ data retention duration for the one-year resolution entries. The configuration defines for how many past years entries will be stored. Set to-1for unlimited entries or to0to disable the data collection of this resolution π
π¨ IMAGE OUTPUT RELATED KEYWORDS π¨
okay bestie, this is the image-output corner of the config and it is lowkey iconic β every keyword, every range, every tiny visual detail is right here π β¨
5MinuteGraphResultCount
Number of 5 minute periods to be included in the 5 minute resolution graph. The value affects the width of the graph. Value range: 288..2000
5MinuteGraphHeight
Height of the 5 minute resolution graph in pixels. Value range: 150..2000
BarColumnShowsRate
The bar column represents traffic rate in list outputs when enabled. It also requires that OutputStyle has been configured to show the traffic rate column by using the value 3. Enabling this option will automatically cause EstimateStyle to have the value 0. Visually this option affects only the color legend text and the last line on the list if that line represents the currently ongoing time period. 1 = enabled, 0 = disabled.
CBackground
Background color.
CEdge
Edge color, if visible.
CHeader
Header background color.
CHeaderTitle
Header title text color.
CHeaderDate
Header date text color.
CLine
Line color.
CLineL
Lighter version of line color. Set to '-' in order to use a calculated value based on CLine.
CPercentileLine
95th percentile line color. Used only in 95th percentile graph.
CRx
Color for received data.
CRxD
Darker version of received data color. Set to '-' in order to use a calculated value based on CRx.
CText
Common text color.
CTotal
Color for total data, sum of received and transmitted data. Used only in 95th percentile graph.
CTx
Color for transmitted data.
CTxD
Darker version of transmitted data color. Set to '-' in order to use a calculated value based on CTx.
EstimateStyle
Show a visual representation of the traffic estimation. 0 = not shown, 1 = continuation of existing bar, 2 = separate bar.
HeaderFormat
Formatting of date in header. Uses the same format as date(1).
HourlyGraphMode
Select the output mode of the hourly graph. 0 = 24 hour sliding window, 1 = graph begins from midnight.
HourlyRate
Show hours with rate instead of transferred amount. 1 = enabled, 0 = disabled.
ImageScale
Scale output to given percent after rendering the image. Doesn't improve output quality, only changes the size of the image. Value range: 50..500
CommonWidth
Use a common image width for summary, list, hourly graph and 5 minute graph image outputs based on the active font metrics. Useful when vertical alignment of multiple images is needed. 1 = enabled, 0 = disabled.
FontFile
Path to a TrueType font (.ttf) file to be used for image text rendering. Leave empty to use the libGD built-in bitmap fonts. When set, libGD must have been built with FreeType support and the font file must be readable; otherwise vnstati exits with error. Both monospace and proportional fonts are supported.
FontSize
Point size used for the body text when FontFile is set. Title, header, axis label and timestamp size scaling is controlled with FontScaleHeader, FontScaleTitle, FontScaleAxis and FontScaleTimestamp. Has no effect when FontFile is empty. Value range: 6..72
FontScaleHeader
Header text size as a percentage of FontSize when FontFile is set. Value range: 50..300
FontScaleTitle
Title text size as a percentage of FontSize when FontFile is set. Value range: 50..300
FontScaleAxis
Axis label text size as a percentage of FontSize when FontFile is set. Value range: 50..300
FontScaleTimestamp
Header and alternative date text size as a percentage of FontSize when FontFile is set. Value range: 50..300
LargeFonts
Increase the size of used fonts. When a FontFile is configured, this multiplies FontSize by 1.5 instead of switching built-in font faces. 1 = enabled, 0 = disabled
LineSpacingAdjustment
Adjust line spacing in list format outputs. Positive values increase the space between lines while negative values reduce it. Supports both built-in and TrueType fonts. Value range: -5..10
SummaryGraph
Select which graph style output is shown next to the summary data in the horizontal and vertical summary outputs. 0 = hours, 1 = 5 minutes.
SummaryRate
Show rate in summary output if available. 1 = enabled, 0 = disabled.
TransparentBg
Set background color as transparent. 1 = enabled, 0 = disabled.
π FILES π
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, it overrides automatic search.$XDG_CONFIG_HOME/vnstat/vnstat.confβ used only when theXDG_CONFIG_HOMEenvironment variable is set to a non-empty value and--confighas not been used. An empty value is treated as unset.$HOME/.config/vnstat/vnstat.confβ used when theHOMEenvironment variable is set and no earlier location was found.$HOME/.vnstatrcβ used when theHOMEenvironment 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.
π¨ RESTRICTIONS π¨
Using long date output formats may cause misalignment or clipping in shown columns if the length of the date exceeds the fixed size allocation.
π AUTHOR π
Teemu Toivola <tst at iki dot fi> π«Ά
π SEE ALSO π
vnstat(1), vnstati(1), vnstatd(8), units(7)
mwah π β that's the whole VNSTAT.CONF(5) page, version 2.14, dated OCTOBER 2026. now go make your graphs iconic π
π¦ where this page comes from
- arch rolling: vnstat 2.14-1 Β· GPL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms