1VNSTATI(1)                       User Manuals                       VNSTATI(1)
2
3
4

NAME

6       vnstati - png image output support for vnStat
7
8

SYNOPSIS

10       vnstati  [-5bcdDehimostvy?]   [--altdate] [--begin date] [--cache time]
11       [--config file] [--days [limit]] [--dbdir directory]  [--debug]  [--end
12       date]   [--fiveminutes  [limit]]  [--headertext  text]  [--help]  [-hg]
13       [--hours [limit]]  [--hoursgraph]  [-hs]  [--hsummary]  [-i  interface]
14       [--iface   interface]   [--limit  limit]  [--locale  locale]  [--months
15       [limit]] [-ne] [-nh] [-nl] [--noedge] [--noheader] [--nolegend] [--out‐
16       put file] [-ru [mode]] [--rateunit [mode]] [--style number] [--summary]
17       [--top  [limit]]   [--transparent]   [--version]   [-vs]   [--vsummary]
18       [--months [limit]]
19
20

DESCRIPTION

22       The  purpose  of vnstati is to provide image output support for statis‐
23       tics collected using vnstat(1).  The image file format  is  limited  to
24       png.  All  basic outputs of vnStat are supported excluding live traffic
25       features. The image can be outputted either to a file  or  to  standard
26       output.
27
28

OPTIONS

30       --altdate
31              Use  alternative  date and time text location. The date and time
32              text will be moved from the upper right header  section  to  the
33              lower  left  corner.  This  option  will  have no effect if -nh,
34              --noheader has been selected.
35
36
37       -b, --begin date
38              Begin the list output with a specific date  /  time  defined  by
39              date  instead of the begin being selected based on the number of
40              entries to be shown.  If date isn't available  in  the  database
41              then  the  closest  later  date will be used.  date supports the
42              following formats: YYYY-MM-DD HH:MM and YYYY-MM-DD.  This option
43              can only be used with list outputs.
44
45
46       -c, --cache time
47              Update  output  file  only  if at least time minutes have passed
48              since the previous file update. This option is ignored if stdout
49              is used as output.
50
51
52       --config file
53              Use  file  as configuration file instead of using automatic con‐
54              figuration file search functionality.
55
56
57       -d, --days [limit]
58              Output traffic statistics on a daily basis for  the  last  days.
59              The length of the list will be limited to 30 entries unless con‐
60              figured otherwise or unless  the  optional  limit  parameter  is
61              used.  All entries stored in the database will be shown if limit
62              is set to 0.
63
64
65       --dbdir directory
66              Use directory as database directory instead of using the  direc‐
67              tory  specified  in  the  configuration  file  or  the hardcoded
68              default if no configuration file is available.
69
70
71       -D, --debug
72              Show additional debug output.
73
74
75       -e, --end date
76              End the list output with a specific date / time defined by  date
77              instead of the latest date / time in the database. If date isn't
78              available in the database then the closest earlier date will  be
79              used.  date supports the following formats: YYYY-MM-DD HH:MM and
80              YYYY-MM-DD.  This option can only be used with list outputs. The
81              top  list also requires --begin to be used at the same time with
82              this option.
83
84
85       -5, --fiveminutes [limit]
86              Output traffic statistics with a 5  minute  resolution  for  the
87              last  hours.   The  length  of  the  list  will be limited to 24
88              entries unless configured otherwise or unless the optional limit
89              parameter  is  used.  All entries stored in the database will be
90              shown if limit is set to 0.
91
92
93       --headertext text
94              Show text in image header section instead of automatically  gen‐
95              erated  interface identification.  text is limited to 64 charac‐
96              ters and may not get completely shown if longer than  the  width
97              of  the  image.  Use  with --altdate if maximal space is needed.
98              This option will have no effect  if  -nh,  --noheader  has  been
99              selected.
100
101
102       -h, --hours [limit]
103              Output  traffic  statistics on a hourly basis. The length of the
104              list will be limited to 24 entries unless  configured  otherwise
105              or  unless  the  optional  limit  parameter is used. All entries
106              store in the database will be shown if the limit is set to 0.
107
108
109       -hg, --hoursgraph
110              Output traffic statistics on a hourly  basis  for  the  last  24
111              hours using a bar graph.
112
113
114       -hs, --hsummary
115              Output  traffic  summary including hourly data bar graph using a
116              horizontal layout.
117
118
119       -i, --iface interface
120              Use interface instead of default or configured interface. It  is
121              also possible to merge the information of two or more interfaces
122              using  the  interface1+interface2+...   syntax.   All   provided
123              interfaces  must  be  unique and must exist in the database when
124              the merge syntax is used.
125
126
127       --limit limit
128              Set the maximum number of  shown  entries  in  list  outputs  to
129              limit.   Usage of --limit overrides the default list entry limit
130              values and the optional limit parameter  given  directly  for  a
131              list  query. All entries stored in the database will be shown if
132              limit is set to 0.
133
134
135       --locale locale
136              Use locale instead of using the locale setting specified in  the
137              configuration  file  or  the  system default if no configuration
138              file is available.
139
140
141       -m, --months [limit]
142              Output traffic statistics  on  a  monthly  basis  for  the  last
143              months.  The  length  of  the list will be limited to 12 entries
144              unless configured otherwise or unless the optional limit parame‐
145              ter is used. All entries stored in the database will be shown if
146              limit is set to 0.
147
148
149       -ne, --noedge
150              Remove darker edges from around the image.
151
152
153       -nh, --noheader
154              Remove header containing title and update time. Time of the pre‐
155              vious  update  will  still  be visible in the lower right corner
156              using a less visible color.
157
158
159       -nl, --nolegend
160              Remove legend containing rx and  tx  color  mapping  information
161              from the image.
162
163
164       -o, --output file
165              Write png image to file and exit. Output can be directed to std‐
166              out by giving "-" as filename.
167
168
169       -ru, --rateunit [mode]
170              Swap the configured rate unit. If rate has been configured to be
171              shown in bytes then rate will be shown in bits if this option is
172              present. In the same way, if rate  has  been  configured  to  be
173              shown  in bits then rate will be shown in bytes when this option
174              is present. Alternatively, mode with either 0 or 1 can  be  used
175              as  parameter  for  this option in order to select between bytes
176              (0) and bits (1) regardless of the configuration file setting.
177
178
179       --style number
180              Modify the content and style of outputs.  Setting  number  to  3
181              will  show  average traffic rate in all outputs where it is sup‐
182              ported.  Other values will show bar graphics instead.
183
184
185       -s, --summary
186              Output traffic statistics summary.
187
188
189       -t, --top [limit]
190              Output all time top traffic days. The length of the list will be
191              limited  to 10 entries unless configured otherwise or unless the
192              optional limit parameter is used.  All  entries  stored  in  the
193              database  will  be  shown  if  limit is set to 0. When used with
194              --begin and optionally with --end, the list  will  be  generated
195              using  the  daily  data  instead  of  separate top entries.  The
196              availability of daily data defines the boundaries the date  spe‐
197              cific query can access.
198
199
200       --transparent [enabled]
201              Toggle  background color transparency depending of the Transpar‐
202              entBg setting in the configuration file. Alternatively, 0  or  1
203              can  be  given  as parameter enabled for this option in order to
204              either disable (0) or enable (1) transparency regardless of  the
205              configuration file setting.
206
207
208       -v, --version
209              Show current version.
210
211
212       -vs, --vsummary
213              Output  traffic  summary including hourly data bar graph using a
214              vertical layout.
215
216
217       -y, --years [limit]
218              Output traffic statistics on a yearly basis for the last  years.
219              The list will show all entries by default unless configured oth‐
220              erwise or unless the  optional  limit  parameter  is  used.  All
221              entries  stored  in  the database will also be shown if limit is
222              set to 0.
223
224
225       -?, --help
226              Show a command option summary.
227
228

FILES

230       /var/lib/vnstat/
231              Default database directory.
232
233
234       /etc/vnstat.conf
235              Config file that will be used unless $HOME/.vnstatrc exists. See
236              vnstat.conf(5) for more information.
237
238

EXAMPLES

240       vnstati -s -i eth0 -o /tmp/vnstat.png
241              Output    traffic   summary   for   interface   eth0   to   file
242              /tmp/vnstat.png.
243
244
245       vnstati -vs -i eth0+eth1+eth2 -o /tmp/vnstat.png
246              Output traffic summary with hourly data under the normal summary
247              for   a  merge  of  interfaces  eth0,  eth1  and  eth2  to  file
248              /tmp/vnstat.png.
249
250
251       vnstati -h -c 15 -o /tmp/vnstat_h.png
252              Output hourly traffic statistics for default interface  to  file
253              /tmp/vnstat_h.png  if  the  file has not been updated within the
254              last 15 minutes.
255
256
257       vnstati -d -ne -nh -o -
258              Output daily traffic statistics without  displaying  the  header
259              section and edges for default interface to standard output (std‐
260              out).
261
262
263       vnstati -m --config /home/me/vnstat.cfg -i -o -
264              Output monthly traffic statistics for default  interface  speci‐
265              fied  in configuration file /home/me/vnstat.cfg to standard out‐
266              put (stdout).
267
268

RESTRICTIONS

270       Depending on the built-in fonts provided by the  GD  library,  not  all
271       characters may end up shown correctly when a UTF-8 locale is used.
272
273       Using  long date output formats may cause misalignment in shown columns
274       if the length of the date exceeds the fixed size allocation.
275
276

AUTHOR

278       Teemu Toivola <tst at iki dot fi>
279
280

SEE ALSO

282       vnstat(1), vnstatd(8), vnstat.conf(5), units(7)
283
284
285
286version 2.6                      JANUARY 2020                       VNSTATI(1)
Impressum