.TH VNSTATI 1 "MARCH 2018" "version 1.18" "User Manuals" .SH NAME vnstati \- png image output support for vnStat .SH SYNOPSIS .B vnstati [ .B \-cdhimostv? ] [ .B \-\-altdate ] [ .B \-\-cache .I time ] [ .B \-\-config .I file ] [ .B \-\-days ] [ .B \-\-dbdir .I directory ] [ .B \-\-headertext .I text ] [ .B \-\-help ] [ .B \-\-hours ] [ .B \-hs ] [ .B \-\-hsummary ] [ .B \-i .I interface ] [ .B \-\-iface .I interface ] [ .B \-\-locale .I locale ] [ .B \-\-months ] [ .B \-ne ] [ .B \-nh ] [ .B \-nl ] [ .B \-\-noedge ] [ .B \-\-noheader ] [ .B \-\-nolegend ] [ .B \-\-output .I file ] [ .B \-ru ] [ .B \-\-rateunit ] [ .B \-\-style .I number ] [ .B \-\-summary ] [ .B \-\-top10 ] [ .B \-\-transparent ] [ .B \-\-version ] [ .B \-vs ] [ .B \-\-vsummary ] .SH DESCRIPTION The purpose of .B vnstati is to provide image output support for statistics collected using .BR vnstat (1). The image file format is limited to png. All basic outputs of vnStat are supported excluding live traffic features. The image can be outputted either to a file or to standard output. .SH OPTIONS .TP .B "--altdate" Use alternative date and time text location. The date and time text will be moved from the upper right header section to the lower left corner. This option will have no effect if .B "-nh, --noheader" has been selected. .TP .BI "-c, --cache " time Update output file only if at least .I time minutes have passed since the previous file update. This option is ignored if stdout is used as output. .TP .BI "--config " file Use .I file as configuration file instead of using normal configuration file search functionality. .TP .B "-d, --days" Output traffic statistics on a daily basis for the last 30 days. .TP .BI "--dbdir " directory Use .I directory as database directory instead of using the directory specified in the configuration file or the hardcoded default if no configuration file is available. .TP .BI "--headertext " text Show .I text in image header section instead of automatically generated interface identification. .I text is limited to 64 characters and may not get completely shown if longer than the width of the image. Use with .B "--altdate" if maximal space is needed. This option will have no effect if .B "-nh, --noheader" has been selected. .TP .B "-h, --hours" Output traffic statistics on a hourly basis for the last 24 hours. .TP .B "-hs, --hsummary" Output traffic summary including hourly data using a horizontal layout. .TP .BI "-i, --iface " interface Use .I interface instead of default or configured interface. .TP .BI "--locale " locale Use .I locale instead of using the locale setting specified in the configuration file or the system default if no configuration file is available. .TP .B "-m, --months" Output traffic statistics on a monthly basis for the last 12 months. .TP .B "-ne, --noedge" Remove darker edges from around the image. .TP .B "-nh, --noheader" Remove header containing title and update time. Time of the previous update will still be visible in the lower right corner using a less visible color. .TP .B "-nl, --nolegend" Remove legend containing rx and tx color mapping information from the image. .TP .BI "-o, --output " file Write png image to .I file and exit. Output can be directed to stdout by giving "-" as filename. .TP .B "-ru, --rateunit" Change the configured rate unit. If rate has been configured to be shown in bytes then rate will be shown in bits if this option is present. In the same way, if rate has been configured to be shown in bits then rate will be shown in bytes when this option is present. Alternatively 0 or 1 can be given as parameter for this option in order to select between bytes (0) and bits (1) regardless of the configuration file setting. .TP .BI "--style " number Modify the content and style of outputs. Setting .I number to 3 will show average traffic rate in all outputs where it is supported. Other values will show bar graphics instead. .TP .B "-s, --summary" Output traffic statistics summary. .TP .B "-t, --top10" Output all time top 10 traffic days. .TP .B "--transparent" Toggle background color transparency depending of the TransparentBg setting in the configuration file. Alternatively 0 or 1 can be given as parameter for this option in order to either disable (0) or enable (1) transparency regardless of the configuration file setting. .TP .B "-v, --version" Show current version. .TP .B "-vs, --vsummary" Output traffic summary including hourly data using a vertical layout. .TP .B "-?, --help" Show a command option summary. .SH FILES .TP .I /var/lib/vnstat/ Default database directory. Files are named according to the monitored interfaces. .TP .I /etc/vnstat.conf Config file that will be used unless .I $HOME/.vnstatrc exists. See .BR vnstat.conf (5) for more information. .SH EXAMPLES .TP .B "vnstati -s -i eth0 -o /tmp/vnstat.png" Output traffic summary for interface eth0 to file /tmp/vnstat.png. .TP .B "vnstati -vs -i eth0+eth1+eth2 -o /tmp/vnstat.png" Output traffic summary with hourly data under the normal summary for a merge of interfaces eth0, eth1 and eth2 to file /tmp/vnstat.png. .TP .B "vnstati -h -c 15 -o /tmp/vnstat_h.png" Output hourly traffic statistics for default interface to file /tmp/vnstat_h.png if the file has not been updated within the last 15 minutes. .TP .B "vnstati -d -ne -nh -o -" Output daily traffic statistics without displaying the header section and edges for default interface to standard output (stdout). .TP .B "vnstati -m --config /home/me/vnstat.cfg -i -o -" Output monthly traffic statistics for default interface specified in configuration file /home/me/vnstat.cfg to standard output (stdout). .SH RESTRICTIONS Depending on the built-in fonts provided by the GD library, not all characters may end up shown correctly when a UTF-8 locale is used. .PP Using long date output formats may cause misalignment in shown columns if the length of the date exceeds the fixed size allocation. .SH AUTHOR Teemu Toivola .SH "SEE ALSO" .BR vnstat (1), .BR vnstatd (1), .BR vnstat.conf (5), .BR units (7)