-2.0 / <not released yet>
+2.0 / 21-Oct-2018
- Fixed
- Data rate calculations when using SI decimal prefixes
- --importdb, -u / --update and related options using vnstat command
- Old style (default in versions up to 1.7) summary layout in image output
- - see "Current development status" section in README.md
-
1.18 / 4-Mar-2018
will compile 'vnstat' and 'vnstatd'. The optional image output capable binary
'vnstati' will also be compiled if the required additional libgd library is
- found to be available.
+ found to be available and --disable-image-output isn't given as parameter
+ for ./configure.
An example cgi ('vnstat.cgi') to be used with a http server with the image
output support has been provided in the 'examples' directory. Configuration
If there were no errors, vnStat binaries, man pages and a configuration
file should now be installed. The configuration file will be upgraded using
- previously configured values if it is found already to exist.
+ previously configured values if it is found already to exist. A backup
+ of the previous configuration file will be named as vnstat.conf.old.
The configuration file /etc/vnstat.conf should be checked at this point.
See the vnstat.conf man page for documentation about available options.
systemctl enable vnstat
systemctl start vnstat
- upstart:
- cp -v examples/upstart/vnstat.conf /etc/init/
- initctl start vnstat
-
init.d:
Debian:
cp -v examples/init.d/debian/vnstat /etc/init.d/
chkconfig vnstat on
service vnstat start
+ upstart:
+ cp -v examples/upstart/vnstat.conf /etc/init/
+ initctl start vnstat
+
An alternative method is to add the command to an already existing
script that gets executed during system startup. In many distributions
/etc/rc.local can be used if nothing else suitable can be found. Note
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 as
+ the entries in the database aren't updated constantly.
+
Monitoring of unwanted interfaces can be stopped with:
vnstat --remove -i ethunwanted
This step isn't mandatory for using vnStat.
- The source package includes a test suite for validating at least some of the
+ The source package includes a test suite for validating many of the
functionalities provided by the executables. The test suite requires the
Check unit testing framework ( https://libcheck.github.io/check/ ) to be
installed and available. Depending on the used distribution, the necessary
will compile 'vnstat' and 'vnstatd' without requiring additional libraries.
The optional image output capable binary 'vnstati' will also be compiled if
- the required additional libgd2 library is found to be available.
+ the required additional libgd2 library is found to be available and
+ --disable-image-output isn't given as parameter for ./configure.
An example cgi ('vnstat.cgi') to be used with a http server with the image
output support has been provided in the 'examples' directory. Configuration
If there were no errors, vnStat binaries, man pages and a configuration
file should now be installed. The configuration file will be upgraded using
- previously configured values if it is found already to exist.
+ previously configured values if it is found already to exist. A backup
+ of the previous configuration file will be named as vnstat.conf.old.
The configuration file /usr/local/etc/vnstat.conf should be checked at
this point. See the vnstat.conf man page for documentation about available
available interfaces for monitoring. The command can also be executed
manually at this point in order to avoid having to reboot the system
Depending on configuration, it may take some minutes for the 'vnstat'
- command to begin showing results. Monitoring of unwanted interfaces
- can be stopped with:
+ command to begin showing results as the entries in the database aren't
+ updated constantly.
+
+ Monitoring of unwanted interfaces can be stopped with:
vnstat --remove -i ethunwanted
This step isn't mandatory for using vnStat.
- The source package includes a test suite for validating at least some of the
+ The source package includes a test suite for validating many of the
functionalities provided by the executables. The test suite requires the
Check unit testing framework ( https://libcheck.github.io/check/ ) to
be installed and available (usually 'devel/check' in ports). The configure
means that vnStat won't actually be sniffing any traffic and also ensures
light use of system resources.
- Traffic statistics are stored on a hourly level for the last 24 hours,
- on a daily level for the last 30 days and on a monthly level for the
- last 12 months. Total seen traffic and a top 10 days listing is also
- provided.
+ By default, traffic statistics are stored on a five minute level for the last
+ 48 hours, on a hourly level for the last 4 days, on a daily level for the
+ last 2 full months and on a yearly level forever. The data retention durations
+ are fully user configurable. Total seen traffic and a top days listing is also
+ provided. Optional png image output is available in systems with the gd
+ library installed.
Optional png image output is available in systems with the gd library
installed.
means that vnStat won't actually be sniffing any traffic and also ensures
light use of system resources.
-Traffic statistics are stored on a hourly level for the last 24 hours, on
-a daily level for the last 30 days and on a monthly level for the last 12
-months. Total seen traffic and a top 10 days listing is also provided.
-Optional png image output is available in systems with the gd library
+By default, traffic statistics are stored on a five minute level for the last
+48 hours, on a hourly level for the last 4 days, on a daily level for the
+last 2 full months and on a yearly level forever. The data retention durations
+are fully user configurable. Total seen traffic and a top days listing is also
+provided. Optional png image output is available in systems with the gd library
installed.
See the official webpage https://humdi.net/vnstat/ for additional details
depending on used operating system. Instructions for upgrading from a previous
version are included in the UPGRADE file.
-## Current development status
-
-Unlike version 1.18, the current development version uses a sqlite database
-for storing data instead of a C structure dump in a file. This change enables
-having longer-duration statistics with user-configurable data retention
-durations. Yearly and five-minute resolution statistics are now included.
-
-##### Overall status
-
- * beta version
- * vnstatd (daemon) has all features implemented
- * some sanity checks may be missing
- * vnstat (console output) has all necessary features implemented
- * vnstati (image output) has all intended original features implemented
- * 5 minute resolution outputs available in both text and image formats
- * data migration verified to work automatically from 1.x version databases
- * test coverage is better than with 1.x releases
- * some unit conversion issues have been found and fixed
-
-##### Done
-
- * vnstatd (daemon)
- * database creation and handling
- * support for multiple interfaces
- * dynamic data buffering, SaveInterval is honored
- * 5 minute, hourly, daily, monthly, yearly and total traffic recorded to database
- * legacy database files are read only during first startup for data import
- * write support is no longer included in code
- * legacy database files aren't removed after first time import to new database
- * full data import from vnStat 1.x database format including reconstructed yearly data
- * legacy database is not kept in memory for each interface during daemon runtime
- * new configuration options for data retention durations
- * features can be disabled
- * old data cleanup
- * executed during startup and then once every hour
- * logging and handling of possible database access errors
- * only fatal errors will cause the daemon to exit directly
- * all vnstat (console output) features
- * all vnstati (image output) features
- * pebibyte and exbibyte support
- * query of time range specific data
- * new `MonthRotate` configuration option handling
-
-##### Removed features
-
- * text format database import
- * most likely better to do directly via sqlite cli or using some script language
- * merge of data from multiple interfaces
- * weekly ouput
- * data still accessible with time range specific queries
- * kernel test
- * provided some use mostly with 2.0 and 2.2 kernels
- * `--update` / `-u` and several other database modifiers using vnstat command
- * `--exportdb`, use `--oneline`, `--json` or `--xml` instead
- * old style (default in versions up to 1.7) summary layout in image output
-
-##### TODO
-
- * feature configurability
- * is something still missing?
- * documentation
- * especially feature comparison with 1.x versions is needed as some features have been left out
- * remember what else has been forgotten from this list
-
## Contacting the author
**email:** Teemu Toivola <tst at iki dot fi>
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for vnstat 2.0_beta4.
+# Generated by GNU Autoconf 2.69 for vnstat 2.0.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
# Identity of this package.
PACKAGE_NAME='vnstat'
PACKAGE_TARNAME='vnstat'
-PACKAGE_VERSION='2.0_beta4'
-PACKAGE_STRING='vnstat 2.0_beta4'
+PACKAGE_VERSION='2.0'
+PACKAGE_STRING='vnstat 2.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures vnstat 2.0_beta4 to adapt to many kinds of systems.
+\`configure' configures vnstat 2.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of vnstat 2.0_beta4:";;
+ short | recursive ) echo "Configuration of vnstat 2.0:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-vnstat configure 2.0_beta4
+vnstat configure 2.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by vnstat $as_me 2.0_beta4, which was
+It was created by vnstat $as_me 2.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='vnstat'
- VERSION='2.0_beta4'
+ VERSION='2.0'
cat >>confdefs.h <<_ACEOF
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by vnstat $as_me 2.0_beta4, which was
+This file was extended by vnstat $as_me 2.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-vnstat config.status 2.0_beta4
+vnstat config.status 2.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
-AC_INIT([vnstat], [2.0_beta4])
+AC_INIT([vnstat], [2.0])
AM_INIT_AUTOMAKE([foreign subdir-objects std-options -Wall -Werror])
AM_MAINTAINER_MODE
-.TH VNSTAT 1 "MARCH 2018" "version 2.0" "User Manuals"
+.TH VNSTAT 1 "OCTOBER 2018" "version 2.0" "User Manuals"
.SH NAME
vnstat \- a console-based network traffic monitor
.SH DESCRIPTION
.B vnStat
-is a console-based network traffic monitor. It keeps a log of hourly,
-daily and monthly network traffic for the selected interface(s). However,
-it isn't a packet sniffer. The traffic information is read from the
+is a console-based network traffic monitor. It keeps a log of 5 minute interval,
+hourly, daily, monthly and yearly network traffic for the selected interface(s).
+However, it isn't a packet sniffer. The traffic information is read from the
.BR proc (5)
or
.B sys
The implementation is divided into two commands. The purpose of the
.B vnstat
command is to provide an interface for querying the traffic information stored
-in network interface specific databases whereas the daemon
+in the database whereas the daemon
.BR vnstatd (1)
-is responsible for data retrieval and storage. Although the daemon process
-is constantly running as a service, it is actually spending most of the
+is responsible for data retrieval, caching and storage. Although the daemon
+process is constantly running as a service, it is actually spending most of its
time sleeping between data updates.
.SH OPTIONS
.TP
.B "-s, --short"
-Use short output mode. This mode is also used if more than one
-database is available.
+Use short output mode. This mode is also used when more than one interface is
+available in the database and no specific interface is selected.
.TP
.B "--showconfig"
.TP
.I /var/lib/vnstat/
-This directory contains all databases the program uses. Files are
-named according to the monitored interfaces. A backup copy of each
-database is kept in a file starting with a . (dot character) and
-otherwise named according to the original file.
+Default database directory.
.TP
.I /etc/vnstat.conf
.TP
.B "vnstat -i eth2 --remove"
-Delete database of interface eth2 and stop monitoring it.
+Delete database entries for interface eth2 and stop monitoring it.
.SH RESTRICTIONS
-.TH VNSTAT.CONF 5 "MARCH 2018" "version 2.0" "User Manuals"
+.TH VNSTAT.CONF 5 "OCTOBER 2018" "version 2.0" "User Manuals"
.SH NAME
vnstat.conf \- vnStat configuration file
to represent arguments containing spaces. Arguments can be padded
with spaces or tabulator characters. A hardcoded default value
will be used if a keyword can't be found from the configuration file or
-if the configured value is outside accepted limits.
+if the configured value cannot be parsed or is outside supported value range.
.PP
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
+considered common for all commands, the second section is for
daemon related keywords and the last section is for image output.
.SH COMMON KEYWORDS
.TP
.B DatabaseDir
-Specifies the directory where interface databases are to be stored.
+Specifies the directory where the database is to be stored.
A full path must be given and a leading '/' isn't required.
.TP
.TP
.B HourlyDecimals
-Number of decimals to use in hourly output. Value range: 0..2
+Number of decimals to use in hourly graph output. Value range: 0..2
(vnstat only)
.TP
.B HourlySectionStyle
Select what kind of spacer is used for separating the numerical sections of the
-hourly output. 0 = none, 1 = '|', 2 = '][', 3 = '[ ]'.
+hourly graph output. 0 = none, 1 = '|', 2 = '][', 3 = '[ ]'.
(vnstat only)
.TP
.TP
.B QueryMode
Default query mode when no parameters are given. 0 = normal, 1 = days,
-2 = months, 3 = top, 5 = short, 7 = hours, 8 = xml, 9 = one line
-and 10 = json. (vnstat only)
+2 = months, 3 = top, 5 = short, 6 = years, 7 = hours graph, 8 = xml, 9 = one line,
+10 = json, 11 = hours and 12 = 5 minute. (vnstat only)
.TP
.B RateUnit
.TP
.B "RXCharacter, TXCharacter"
Character used for representing the percentual share of received
-and transmitted traffic in daily output. (vnstat only)
+and transmitted traffic in list mode outputs. (vnstat only)
.TP
.B "RXHourCharacter, TXHourCharacter"
Character used for representing the percentual share of received
-and transmitted traffic in hourly output. (vnstat only)
+and transmitted traffic in hourly graph output. (vnstat only)
.TP
.B Sampletime
.TP
.B UpdateFileOwner
-Enable or disable the update of file ownership during daemon process startup
-or during manual creation of new databases. During daemon startup, only database,
-log and pid files will be modified if the user or group change feature (
+Enable or disable the update of file ownership during daemon process startup.
+During daemon startup, only database, log and pid files will be modified if the
+user or group change feature (
.B DaemonUser
or
.B DaemonGroup
.TP
.B CEdge
-Edge color if visible.
+Edge color, if visible.
.TP
.B CHeader
.TP
.B CLineL
Lighter version of line color. Set to '-' in order to use a calculated
-value based on CLine.
+value based on
+.BR CLine .
.TP
.B CRx
.TP
.B CRxD
Darker version of received data color. Set to '-' in order to use
-a calculated value based on CRx.
+a calculated value based on
+.BR CRx .
.TP
.B CText
.TP
.B CTxD
Darker version of transmitted data color. Set to '-' in order to use
-a calculated value based on CTx.
+a calculated value based on
+.BR CTx .
.TP
.B HeaderFormat
-.TH VNSTATD 1 "MARCH 2018" "version 2.0" "User Manuals"
+.TH VNSTATD 1 "OCTOBER 2018" "version 2.0" "User Manuals"
.SH NAME
vnstatd \- daemon based database updating for vnStat
.TP
.I /var/lib/vnstat/
-Default database directory. Files are named according to the monitored
-interfaces.
+Default database directory.
+
.TP
.I /etc/vnstat.conf
Config file that will be used unless
exists. See the configuration chapter and
.BR vnstat.conf (5)
for more information.
+
.TP
.I /var/log/vnstat.log
Log file that will be used if logging to file is enable and no other file
is specified in the config file.
+
.TP
.I /var/run/vnstat.pid
File used for storing the process id if no other file is specified in the
-.TH VNSTATI 1 "MARCH 2018" "version 2.0" "User Manuals"
+.TH VNSTATI 1 "OCTOBER 2018" "version 2.0" "User Manuals"
.SH NAME
vnstati \- png image output support for vnStat
.TP
.I /var/lib/vnstat/
-Default database directory. Files are named according to the monitored interfaces.
+Default database directory.
+
.TP
.I /etc/vnstat.conf
Config file that will be used unless
exists. See
.BR vnstat.conf (5)
for more information.
+
.SH EXAMPLES
.TP