From da723f62d45430fafb1aa4ed051556cb90fe7900 Mon Sep 17 00:00:00 2001 From: Teemu Toivola Date: Thu, 28 Aug 2014 23:29:50 +0300 Subject: [PATCH] improve documentation --- INSTALL | 2 +- man/vnstat.1 | 35 ++++++++++++++++++++++++----------- man/vnstat.conf.5 | 9 ++++++--- man/vnstatd.1 | 6 +++--- man/vnstati.1 | 10 +++++----- 5 files changed, 39 insertions(+), 23 deletions(-) diff --git a/INSTALL b/INSTALL index 4640b99..55ea853 100644 --- a/INSTALL +++ b/INSTALL @@ -11,7 +11,7 @@ Compiling the binaries The optional image output however requires libgd2 to be available. The required extra packages are usually named libgd2 and libgd2-dev (or libgd2-noxpm and libgd2-noxpm-dev in Debian/Ubuntu, xpm version can also - be used). Executing + be used, libgd-dev in more recent releases). Executing make all diff --git a/man/vnstat.1 b/man/vnstat.1 index fcdba1c..5d62dac 100644 --- a/man/vnstat.1 +++ b/man/vnstat.1 @@ -137,11 +137,15 @@ functionality. .TP .BI "--create" -Create database for selected interface. +Create database for interface specified with +.B -i +or +.B --iface +option. .TP .BI "-d, --days" -Show traffic for days. +Show traffic statistics on a daily basis for the last 30 days. .TP .BI "--dbdir " directory @@ -156,7 +160,11 @@ Show additional debug output. .TP .BI "--delete" -Delete the database for the selected interface and stop monitoring it. +Delete the database for the interface specified with +.B -i +or +.B --iface +and stop monitoring it. .TP .BI "--enable, --disable" @@ -174,7 +182,9 @@ to the up script. These two options aren't needed when the daemon is used. .BI "--exportdb" Instead of showing the database with a formated output, this output will dump the whole database in a format that should be easy to parse with most -script languages. Use this for example with PHP, Perl or Python to make a +script languages or imported back using the +.B --importdb +option. Use this for example with PHP, Perl or Python to make a custom webpage. The dump uses ; as field delimeter. .TS l l. @@ -212,7 +222,7 @@ have values in KiB. .TP .BI "-h, --hours" -Show traffic for the last 24 hours. +Show traffic statistics on a hourly basis for the last 24 hours. .TP .BI "--importdb " file @@ -264,7 +274,7 @@ Show complete options list. .TP .BI "-m, --months" -Show traffic for months. +Show traffic statistics on a monthly basis for the last 12 months. .TP .BI "--nick " nickname @@ -272,7 +282,8 @@ Set the selected interfaces .I nickname as an alias the will be displayed in queries. Usage of .B -u -is required to save the change. +is required to save the change and the daemon may not be running during +the set operation. .TP .BI "--oneline" @@ -295,6 +306,7 @@ Force database query mode. Reset the internal counters in the database for the selected interface. Use this if the interface goes down and back up, otherwise that interface will get some extra traffic to its database. +Not needed when the daemon is used. .TP .BI "--rebuildtotal" @@ -341,7 +353,7 @@ mode. Synchronize internal counters in the database with interface counters for the selected interface. Use this if the system is rebooted but interface counters aren't reseted. Such can occur -when suspend to ram/disk is used. +when suspend to ram/disk is used. Not needed when the daemon is used. .TP .BI "--testkernel" @@ -359,13 +371,13 @@ the given .I time seconds. The .I time -will be 5 seconds if a number parameter isn't included. +will be 5 seconds if a number parameter isn't specified. .TP .BI "-u, --update" Update all enabled databases or only the one specified with .B -i -parameter. +parameter. Not supported when the daemon is running. .TP .BI "-v, --version" @@ -405,7 +417,8 @@ for more information. .TP .BI "vnstat" -Display traffic summary for the default interface. +Display traffic summary for the default interface or multiple interfaces +when more than one is monitored. .TP .BI "vnstat -i eth0+eth1+eth3" diff --git a/man/vnstat.conf.5 b/man/vnstat.conf.5 index 10be80a..f8cd686 100644 --- a/man/vnstat.conf.5 +++ b/man/vnstat.conf.5 @@ -16,7 +16,7 @@ and all use the same configuration file for storing configuration data. Some of the settings are common for all three programs. The file contains keyword-argument pairs, one per line. Lines starting with -'#' and empty lines are interpreted as comments and not processed. +\'#\' and empty lines 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 @@ -147,8 +147,11 @@ directories. The .BI LogFile directory will be created only when .BI UseLogging -has been set to 1. The daemon process will try to create the directory using -permissions of the user used to start the process. +has been set to 1. The +.BI PidFile +directory 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. .TP .BI DaemonGroup diff --git a/man/vnstatd.1 b/man/vnstatd.1 index 979d631..6857abd 100644 --- a/man/vnstatd.1 +++ b/man/vnstatd.1 @@ -46,7 +46,7 @@ vnstatd \- daemon based database updating for vnStat The purpose of .B vnstatd -is to provide a more flexible way for updating +is to provide a more flexible and robust way for updating .BR vnstat (1) databases than what using cron for updating can provide. The daemon makes possible updating databases more often but at the same time causes @@ -182,11 +182,11 @@ with a maximum value of 60 minutes. .PP The default values of .BR UpdateInterval -20, +30, .BR SaveInterval 5 and .BR PollInterval -2 are usually suitable for most systems and provide a similar behaviour +5 are usually suitable for most systems and provide a similar behaviour as cron based updating does but with a better resolution for interface changes and fast interfaces. diff --git a/man/vnstati.1 b/man/vnstati.1 index a3ebe06..deb1b14 100644 --- a/man/vnstati.1 +++ b/man/vnstati.1 @@ -98,7 +98,7 @@ functionality. .TP .BI "-d, --days" -Output traffic for days. +Output traffic statistics on a daily basis for the last 30 days. .TP .BI "--dbdir " directory @@ -109,7 +109,7 @@ file or the hardcoded default if no configuration file is available. .TP .BI "-h, --hours" -Output traffic for the last 24 hours. +Output traffic statistics on a hourly basis for the last 24 hours. .TP .BI "-hs, --hsummary" @@ -130,7 +130,7 @@ default if no configuration file is available. .TP .BI "-m, --months" -Output traffic for months. +Output traffic statistics on a monthly basis for the last 12 months. .TP .BI "-ne, --noedge" @@ -165,11 +165,11 @@ Other values will show bar graphics instead. .TP .BI "-s, --summary" -Output traffic summary. +Output traffic statistics summary. .TP .BI "-t, --top10" -Output all time top10 traffic days. +Output all time top 10 traffic days. .TP .BI "--transparent" -- 2.40.0