- Fix: TrafficlessDays configuration option was enabled when set to zero
when it should have been disabled
- - Fix: MonthRotate setting was getting ignored for the first month if
+ - Fix: MonthRotate setting was getting ignored for the first month if
the database is created when day of month < MonthRotate value
- Configurable summary layout in image output (1.7 <> 1.8 layouts)
- --oneline, a simple parseable one line output
- --delete for deleting databases and stopping monitoring, doesn't require
restarting the daemon
- A database write can be configure to occur after interface status changes
- - Different database write interval can be configure to be used when
+ - Different database write interval can be configure to be used when
all monitored interfaces are offline
- Better configurability for the content of outputs, including a narrow
output for space limited terminals (OutputStyle and --style)
- Fix: 'make install' didn't install the config file is $(DESTDIR) was used
- Traffic of current and previous months added to summary
- Increased accuracy of monthly estimate calculation
- - Traffic rates can be made visible and the shown unit is configurable
+ - Traffic rates can be made visible and the shown unit is configurable
as bits or bytes
- New summary layout in image output
- Image output can have the background color set as transparent
1.4 / 26-Mar-2004
- Fix: major output problems when compiled with some compilers
- (thanks to DukePyrolator for reporting this bug and
+ (thanks to DukePyrolator for reporting this bug and
Juha / vlu for testing the patch)
- Fix: month rotation if database isn't updated every day
- Minor non-visible fixes and code cleanup
Compiling the binaries
::::::::::::::::::::::
- This source package contains the required sources for vnStat including
+ This source package contains the required source files for vnStat including
the daemon (vnstatd) and image output (vnstati). Executing
make
If there were no errors, vnStat binaries, man pages and a config file
should now be installed. Next the used kernel should be checked that it
- is able to provide static information about the system boot time.
+ is able to provide static information about the system boot time. This has
+ mainly been an issue in some kernels from the 2.4 series.
vnstat --testkernel
Installing without root access
::::::::::::::::::::::::::::::
- Copy all needed binaries to some directory included in your $PATH
+ Copy all needed binaries to some directory included in your PATH
(~/bin/ is an example) and make the database directory.
cp src/vnstat src/vnstatd src/vnstati ~/bin/
vnstat --testkernel
- If this gives 'command not found' then check your $PATH. The only way to fix
- a faulty kernel (afaik) is to compile/install a newer one. This can't be done
- without the root account so you'll have to solve this problem with your
- sysadmin if the kernel is broken.
+ If this gives 'command not found' then check content of your PATH variable.
+ The only way to fix a faulty kernel (afaik) is to compile/install a newer one.
+ This can't be done without the root account so you'll have to solve this
+ problem with your sysadmin if the kernel is broken.
Now open the config file ~/.vnstatrc with your favorite text editor and locate
the following line:
-
+
DatabaseDir "/var/lib/vnstat"
and replace it with
-
+
DatabaseDir "/pathtomyhomedir/.vnstat"
- and save the file. If you are unsure about you homedir path execute
-
+ and save the file. If you are unsure about your home directory path, execute
+
cd ; pwd
- The ouput should tell your homedir.
+ The ouput should tell your home directory.
Now it's time to add a crontab entry for vnStat in order to get the daemon
running automatically after a system startup. Do that by executing the
Compiling the binaries
::::::::::::::::::::::
- This source package contains the required sources for vnStat including
+ This source package contains the required source files for vnStat including
the daemon (vnstatd) and image output (vnstati). Executing
gmake
will compile 'vnstat' and 'vnstatd' without requiring additional libraries.
- The optional image output however requires libgd2 to be available. In
+ The optional image output however requires libgd2 to be available. In
BSD ports libgd2 is usually named simply 'gd'. Executing
gmake all
cgi ('vnstat.cgi') to be used with http server with the image output
support has been provided in the 'examples' directory. Configuration
options for the cgi are in the beginning of the file.
-
+
Some BSD users may need to use
LIBRARY_PATH="/usr/local/lib" CPATH="/usr/local/include" gmake all
Installing without root access
::::::::::::::::::::::::::::::
- Copy all needed binaries to some directory included in your $PATH
+ Copy all needed binaries to some directory included in your PATH
(~/bin/ is an example) and make the database directory.
cp src/vnstat src/vnstatd src/vnstati ~/bin/
Next open the config file ~/.vnstatrc with your favorite text editor and
locate the following line:
-
+
DatabaseDir "/var/lib/vnstat"
and replace it with
-
+
DatabaseDir "/pathtomyhomedir/.vnstat"
- and save the file. If you are unsure about you homedir path execute
-
+ and save the file. If you are unsure about your home directory path, execute
+
cd ; pwd
- The ouput should tell your homedir.
+ The ouput should tell your home directory.
Now it's time to add a crontab entry for vnStat. Do that by executing the
command 'crontab -e' and add the following line (without leading spaces,
Compiling the binaries requires Xcode to be installed. However, Xcode is
only used for installing the command line tools. The image output support
hasn't been verified and isn't therefore installed with these instructions.
-
+
In Xcode, open "Preferences...", then click "Downloads" and install
"Command Line Tools".
sudo -s -H
followed with a password that may be required. Verify that the user is now
- 'root' with
+ 'root' with
whoami
During first startup, the daemon (vnstatd) should list and add all
available interfaces for monitoring. Depending on configuration, it may
- take some minutes for the 'vnstat' command to begin showing results.
+ take some minutes for the 'vnstat' command to begin showing results.
Monitoring of unwanted interfaces can be stopped with:
vnstat --delete -i ethunwanted
:::::::::::::::
vnStat works best when installed. See the INSTALL or INSTALL_BSD file
- depending on used operating system. It contains all needed information
- for the installing process. Instructions for upgrading from a previous
- version are included in the UPGRADE file.
+ depending on used operating system. Experimental instructions for OS X
+ are available in the INSTALL_OSX file. These files contain all needed
+ information for the installing process. Instructions for upgrading from
+ a previous version are included in the UPGRADE file.
Available options and documentation
complete list can be accessed with 'vnstat --longhelp'. The following
man pages are available with more detailed descriptions of each option
including some usage examples:
-
+
vnstat general documentation and console query parameters
vnstatd daemon documentation
vnstati image output documentation
git: https://github.com/vergoh/vnstat
- The current version of vnStat is always available from
+ The current version of vnStat is always available from
http://humdi.net/vnstat/
New configuration settings
::::::::::::::::::::::::::
+1.14: (none)
+
1.13: BandwidthDetection, BandwidthDetectionInterval
1.12: DaemonUser, DaemonGroup, CreateDirs, UpdateFileOwner
1) Follow the normal install procedure, 'make install' will not overwrite
your configuration file
-2) Generate a new configuration file using current settings in order to
+2) Generate a new configuration file using current settings in order to
get new configuration tags included:
vnstat --showconfig >/tmp/newconf
- Never overwrite the current configuration file directly! That will
+ Never overwrite the current configuration file directly! That will
result in all previous settings getting replaced by defaults.
-3) Check that the configuration settings in /tmp/newconf are correct. If
- date formatting using system locale is used then use the following
+3) Check that the configuration settings in /tmp/newconf are correct. If
+ date formatting using system locale is used then use the following
settings:
Locale "-"
filesystems depending on availability. That way vnStat can be used even
without root permissions on most systems.
.PP
-The implementation is divided into two commands. The purpose of
+The implementation is divided into two commands. The purpose of the
.B vnstat
-is to provide an interface for querying the traffic information stored
+command is to provide an interface for querying the traffic information stored
in network interface specific databases where as the daemon
.BR vnstatd (1)
is responsible for data retrieval and storage. Although the daemon process
was more than 10 seconds. An optional
.I mode
parameter can be used to select between the displaying of packets per
-second (mode 0) and transfer counters (mode 1) during execution.
+second (mode 0) and transfer counters (mode 1) during execution.
.B "--style"
can also be used to affect the layout of the output.
.TP
.B "--savemerged"
-Write the end result of a database merge to the file
+Write the end result of a database merge to the file
.I mergeddb
that can then be used as a new database if renamed. Top 10 traffic days
isn't included in the merge and will start empty in the new database.
.BI "-tr " time
Calculate how much traffic goes through the selected interface during
the given
-.I time
-seconds. The
+.I time
+seconds. The
.I time
will be 5 seconds if a number parameter isn't specified.
.BR vnstati (1)
and
.BR vnstatd (1)
-all use the same configuration file for storing configuration data.
+all use the same configuration file for configuration related settings.
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.
+consists of keyword-argument pairs, one per line. Empty lines and
+lines starting with\ '#\' 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
The configuration file is divided into three sections based on the
usage of each keyword. The first section contains keywords that are
considered generic for all commands, the second section is for
-the daemon related keywords and the last section for the image output.
+daemon related keywords and the last section for image output.
.SH COMMON KEYWORDS
.TP
.B CheckDiskSpace
-Enable or disable the checking of at least some free disk space before
+Enable or disable the availability check of at least some free disk space before
a database write. 1 = enabled, 0 = disabled.
.TP
.TP
.B MaxBandwidth
-Maximum bandwidth for all interfaces. If the counted traffic exceeds
-the given value then the data is assumed to be invalid and rejected.
+Maximum bandwidth for all interfaces. If the interface specific traffic
+exceeds the given value then the data is assumed to be invalid and rejected.
Set to 0 in order to disable the feature. Value range: 0..50000
(vnstat and vnstatd only)
.TP
.B UnitMode
-Select how units are prefixed. 0 = IEC standard prefixes
+Select how units are prefixed. This will option changes only the prefix,
+not how traffic is calculated. 0 = IEC standard prefixes
(KiB/MiB/GiB/TiB), 1 = old style binary prefixes (KB/MB/GB/TB).
(vnstat and vnstati only)