1VNSTAT.CONF(5)                   User Manuals                   VNSTAT.CONF(5)
2
3
4

NAME

6       vnstat.conf - vnStat configuration file
7
8

SYNOPSIS

10       /etc/vnstat.conf
11
12

DESCRIPTION

14       vnstat(1),  vnstati(1)  and  vnstatd(1)  all use the same configuration
15       file for configuration related settings.  Some of the settings are com‐
16       mon  for  all  three  programs.  The  file consists of keyword-argument
17       pairs, one per line. Empty lines and lines starting with '#´ are inter‐
18       preted  as  comments  and  not  processed.  Arguments may optionally be
19       enclosed in double quotes (") in order to represent arguments  contain‐
20       ing  spaces.  Arguments  can be padded with spaces or tabulator charac‐
21       ters. A hardcoded default value will be used  if  a  keyword  can't  be
22       found from the configuration file.
23
24       The  configuration  file  is  divided  into three sections based on the
25       usage of each keyword. The first section  contains  keywords  that  are
26       considered  generic  for all commands, the second section is for daemon
27       related keywords and the last section is for image output.
28
29

COMMON KEYWORDS

31       BandwidthDetection
32              Try to automatically detect MaxBandwidth value  for  each  moni‐
33              tored  interface.  Mostly  only ethernet interfaces support this
34              feature.  MaxBandwidth or interface specific MaxBW will be  used
35              as  fallback  value  if  detection fails.  1 = enabled, 0 = dis‐
36              abled. (vnstat and vnstatd only)
37
38
39       BootVariation
40              Time in seconds how much the boot time reported by system kernel
41              can variate between updates. Value range: 0..300
42
43
44       CheckDiskSpace
45              Enable  or  disable the availability check of at least some free
46              disk space before a database write. 1 = enabled, 0 = disabled.
47
48
49       DatabaseDir
50              Specifies the directory where  interface  databases  are  to  be
51              stored.   A  full  path  must  be  given and a leading '/' isn't
52              required.
53
54
55       DayFormat, MonthFormat, TopFormat
56              Formatting of date in available outputs. Uses the same format as
57              date(1).  (vnstat and vnstati only)
58
59
60       DefaultDecimals
61              Number  of decimals to use in outputs. Value range: 0..2 (vnstat
62              and vnstati only)
63
64
65       HourlyDecimals
66              Number of decimals to use in hourly output.  Value  range:  0..2
67              (vnstat only)
68
69
70       HourlySectionStyle
71              Select  what kind of spacer is used for separating the numerical
72              sections of the hourly output. 0 = none, 1 = '|', 2 = '][', 3  =
73              '[ ]'.  (vnstat only)
74
75
76       Interface
77              Default  interface  used when no other interface is specified on
78              the command line. (vnstat and vnstati only)
79
80
81       Locale Locale setting to be used for prints. This replaces  the  LC_ALL
82              environment  variable. Set to "-" or leave empty in order to use
83              the system default value. (vnstat and vnstati only)
84
85
86       MaxBandwidth
87              Maximum bandwidth for all interfaces. If the interface  specific
88              traffic  exceeds  the given value then the data is assumed to be
89              invalid and rejected.  Set to 0 in order to disable the feature.
90              Value range: 0..50000 (vnstat and vnstatd only)
91
92
93       MaxBW  Same as MaxBandwidth but can be used for setting individual lim‐
94              its for selected interfaces. The name of the interface is speci‐
95              fied  directly after the MaxBW keyword without spaces. For exam‐
96              ple MaxBWeth0 for eth0 and  MaxBWppp0  for  ppp0.  Value  range:
97              0..50000 (vnstat and vnstatd only)
98
99
100       MonthRotate
101              Day  of month that months are expected to change. Usually set to
102              1 but can be set to alternative values for example for  tracking
103              monthly billed traffic where the billing period doesn't start on
104              the first day. Value range: 1..28 (vnstat and vnstatd only)
105
106
107       OutputStyle
108              Modify the content and style of text outputs. 0  =  minimal  and
109              narrow output for terminal with limited width, 1 = normal output
110              with bar column visible, 2 = same as 1 except rate is visible in
111              summary  and  weekly  outputs, 3 = rate column is visible in all
112              outputs where it is supported. (vnstat and vnstati only)
113
114
115       QueryMode
116              Default query mode when no parameters are given. 0 = normal, 1 =
117              days, 2 = months, 3 = top10, 4 = exportdb, 5 = short, 6 = weeks,
118              7 = hours and 8 = xml. (vnstat only)
119
120
121       RateUnit
122              Select which unit is used when traffic  rate  is  visible.  0  =
123              bytes, 1 = bits.  (vnstat and vnstati only)
124
125
126       RateUnitMode
127              Select used prefix when traffic rate is visible in bits per sec‐
128              ond.  0 = IEC binary prefixes (Kibit/s...), 1 = SI decimal  pre‐
129              fixes (kbit/s...).  (vnstat and vnstati only)
130
131
132       RXCharacter, TXCharacter
133              Character used for representing the percentual share of received
134              and transmitted traffic in daily output. (vnstat only)
135
136
137       RXHourCharacter, TXHourCharacter
138              Character used for representing the percentual share of received
139              and transmitted traffic in hourly output. (vnstat only)
140
141
142       Sampletime
143              Defines  how  many  seconds  the -tr option will sample traffic.
144              Value range: 2..600 (vnstat only)
145
146
147       TrafficlessDays
148              Log days without any traffic to daily list. 1  =  enabled,  0  =
149              disabled.  (vnstat and vnstatd only)
150
151
152       UnitMode
153              Select how units are prefixed. This will option changes only the
154              prefix, not how traffic is calculated. 0 = IEC standard prefixes
155              (KiB/MiB/GiB/TiB),  1 = old style binary prefixes (KB/MB/GB/TB).
156              (vnstat and vnstati only)
157
158
159       UseFileLocking
160              Enable or disable  the  use  of  file  locking  during  database
161              access.  Disabling file locking may cause database corruption if
162              several processes are trying to write to the file  at  the  same
163              time.
164
165
167       BandwidthDetectionInterval
168              How  often  in  minutes interface specific detection of MaxBand‐
169              width is done for detecting possible changes  when  BandwidthDe‐
170              tection  is  enabled.  Can  be  disabled  by setting to 0. Value
171              range: 0..30
172
173
174       CreateDirs
175              Enable or disable the creation of directories when a  configured
176              path doesn't exist. This includes DatabaseDir , LogFile and Pid‐
177              File directories. The LogFile directory  will  be  created  only
178              when UseLogging has been set to 1. The PidFile directory will be
179              created only if the daemon is started as a  background  process.
180              The  daemon  process will try to create the directory using per‐
181              missions of the user used to start the process.
182
183
184       DaemonGroup
185              Specify the user to which the daemon process will switch  during
186              startup.   The  user  can  either  be the name of the group or a
187              numerical group id.  Leave empty to disable  the  group  switch.
188              This  option  can  only  be  used when the process is started as
189              root.
190
191
192       DaemonUser
193              Specify the user to which the daemon process will switch  during
194              startup.   The  user  can  either  be the login of the user or a
195              numerical user id.  Leave empty to disable the user switch. This
196              option can only be used when the process is started as root.
197
198
199       LogFile
200              Specify  log  file path and name to be used if UseLogging is set
201              to 1.
202
203
204       OfflineSaveInterval
205              How often in minutes cached interface data is saved to file when
206              all  monitored  interfaces  are offline. Value range: SaveInter‐
207              val..60
208
209
210       PidFile
211              Specify pid file path and name to be used.
212
213
214       PollInterval
215              How often in seconds interfaces are checked for status  changes.
216              Value range: 2..60
217
218
219       SaveInterval
220              How  often  in  minutes  cached interface data is saved to file.
221              Value range: ( UpdateInterval / 60 )..60
222
223
224       SaveOnStatusChange
225              Enable or disable the additional saving to file of cached inter‐
226              face  data  when the availability of an interface changes, i.e.,
227              when an interface goes offline or comes online. 1 = enabled, 0 =
228              disabled.
229
230
231       TimeSyncWait
232              How  many minutes to wait during daemon startup for system clock
233              to sync if most recent database update  appears  to  be  in  the
234              future.  This may be needed in systems without a real-time clock
235              (RTC) which require some time after boot to query  and  set  the
236              correct time. 0 = wait disabled.  Value range: 0..60
237
238
239       UpdateFileOwner
240              Enable  or  disable  the  update of file ownership during daemon
241              process startup or during manual creation of new databases. Dur‐
242              ing  daemon  startup,  only  database, log and pid files will be
243              modified if the user or group change  feature  (  DaemonUser  or
244              DaemonGroup ) is enabled and the files don't match the requested
245              user or group. During manual database creation, this option will
246              cause file ownership to be inherited from the database directory
247              if the directory already exists. This  option  only  has  effect
248              when the process is started as root or via sudo.
249
250
251       UpdateInterval
252              How often in seconds the interface data is updated. Value range:
253              PollInterval..300
254
255
256       UseLogging
257              Enable or disable logging. 0 = disabled, 1 =  logfile  and  2  =
258              syslog.
259
260
262       CBackground
263              Background color.
264
265
266       CEdge  Edge color if visible.
267
268
269       CHeader
270              Header background color.
271
272
273       CHeaderTitle
274              Header title text color.
275
276
277       CHeaderDate
278              Header date text color.
279
280
281       CLine  Line color.
282
283
284       CLineL Lighter version of line color. Set to '-' in order to use a cal‐
285              culated value based on CLine.
286
287
288       CRx    Color for received data.
289
290
291       CRxD   Darker version of received data color. Set to '-'  in  order  to
292              use a calculated value based on CRx.
293
294
295       CText  Common text color.
296
297
298       CTx    Color for transmitted data.
299
300
301       CTxD   Darker version of transmitted data color. Set to '-' in order to
302              use a calculated value based on CTx.
303
304
305       HeaderFormat
306              Formatting of date in header. Uses the same format as date(1).
307
308
309       HourlyRate
310              Show hours with rate instead of transferred amount. 1 = enabled,
311              0 = disabled.
312
313
314       SummaryLayout
315              Select  the used layout of the summary output. 1 = layout intro‐
316              duced in version 1.8 with monthly traffic included, 0  =  layout
317              used  before  version  1.8,  doesn't contain monthly traffic and
318              doesn't support average rate.
319
320
321       SummaryRate
322              Show rate in summary output if available. 1 = enabled, 0 =  dis‐
323              abled.
324
325
326       TransparentBg
327              Set background color as transparent. 1 = enabled, 0 = disabled.
328
329

FILES

331       /etc/vnstat.conf
332              Config  file  that will be used unless $HOME/.vnstatrc exists or
333              alternative value is given as command line parameter.
334
335

RESTRICTIONS

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

AUTHOR

342       Teemu Toivola <tst at iki dot fi>
343
344

SEE ALSO

346       vnstat(1), vnstati(1), vnstatd(1), units(7)
347
348
349
350version 1.18                      MARCH 2018                    VNSTAT.CONF(5)
Impressum