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 [count]] [--dbdir directory]  [--debug]  [--end
12       date]   [--fiveminutes  [count]]  [--headertext  text]  [--help]  [-hg]
13       [--hours [count]]  [--hoursgraph]  [-hs]  [--hsummary]  [-i  interface]
14       [--iface  interface]  [--locale  locale] [--months [count]] [-ne] [-nh]
15       [-nl] [--noedge] [--noheader] [--nolegend] [--output file] [-ru [mode]]
16       [--rateunit   [mode]]  [--style  number]  [--summary]  [--top  [count]]
17       [--transparent] [--version] [-vs] [--vsummary] [--months [count]]
18
19

DESCRIPTION

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

OPTIONS

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

FILES

221       /var/lib/vnstat/
222              Default database directory.
223
224
225       /etc/vnstat.conf
226              Config file that will be used unless $HOME/.vnstatrc exists. See
227              vnstat.conf(5) for more information.
228
229

EXAMPLES

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

RESTRICTIONS

261       Depending  on  the  built-in  fonts provided by the GD library, not all
262       characters may end up shown correctly when a UTF-8 locale is used.
263
264       Using long date output formats may cause misalignment in shown  columns
265       if the length of the date exceeds the fixed size allocation.
266
267

AUTHOR

269       Teemu Toivola <tst at iki dot fi>
270
271

SEE ALSO

273       vnstat(1), vnstatd(1), vnstat.conf(5), units(7)
274
275
276
277version 2.3                        JULY 2019                        VNSTATI(1)
Impressum