vnStat - a network traffic monitor for Linux and BSD
Clone or download
Permalink
Failed to load latest commit information.
cfg rename TrafficlessDays -> TrafficlessEntries configuration option as … Sep 13, 2018
examples fix syntax error Oct 7, 2018
man improve documentation Oct 10, 2018
src fix compiler warnings (gcc 8.2.0 and clang 8.0.0) Oct 19, 2018
tests fix compiler warnings (gcc 8.2.0 and clang 8.0.0) Oct 19, 2018
.gitignore add another vnstati test with file output, fix imperfections visible … Oct 19, 2018
.travis.yml add mising no- prefix to parameters Mar 10, 2018
CHANGES add another vnstati test with file output, fix imperfections visible … Oct 19, 2018
COPYING update FSF address in license texts Feb 7, 2017
FAQ update http -> https May 1, 2018
INSTALL add instructions for log and pid files when installing without root a… Sep 13, 2018
INSTALL_BSD add instructions for log and pid files when installing without root a… Sep 13, 2018
Makefile.am add test image to clean target Oct 13, 2018
Makefile.in add test image to clean target Oct 13, 2018
README update http -> https May 1, 2018
README.md update documentation, add missing parameters Sep 22, 2018
UNINSTALL rewrite UNINSTALL Mar 15, 2018
UPGRADE rename TrafficlessDays -> TrafficlessEntries configuration option as … Sep 13, 2018
aclocal.m4 upgrade autoconf generated files with more recent version Aug 28, 2018
compile fix cross-compilation detection, resolves #53 Dec 27, 2016
config.guess fix cross-compilation detection, resolves #53 Dec 27, 2016
config.sub fix cross-compilation detection, resolves #53 Dec 27, 2016
configure upgrade autoconf generated files with more recent version Aug 28, 2018
configure.ac bump beta version May 1, 2018
depcomp fix cross-compilation detection, resolves #53 Dec 27, 2016
install-sh fix cross-compilation detection, resolves #53 Dec 27, 2016
missing fix typo in version string, provide some setup information after runn… Dec 8, 2015
test-driver fix typo in version string, provide some setup information after runn… Dec 8, 2015

README.md

vnStat

vnStat is a console-based network traffic monitor that uses the network interface statistics provided by the kernel as information source. This 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 installed.

See the official webpage https://humdi.net/vnstat/ for additional details and output examples.

Getting started

vnStat works best when installed. It's possible to either use the latest stable release or get the current development version from git.

Stable version

  1. wget https://humdi.net/vnstat/vnstat-latest.tar.gz
  2. optional steps for verifying the file signature
    1. wget https://humdi.net/vnstat/vnstat-latest.tar.gz.asc
    2. gpg --keyserver pgp.mit.edu --recv-key 0xDAFE84E63D140114
    3. gpg --verify vnstat-latest.tar.gz.asc vnstat-latest.tar.gz
    4. the signature is correct if the output shows "Good signature from Teemu Toivola"
  3. tar zxvf vnstat-latest.tar.gz
  4. cd vnstat-*

Development version

  1. git clone https://github.com/vergoh/vnstat
  2. cd vnstat

In both cases, continue with instructions from the INSTALL or INSTALL_BSD file 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 irc: Vergo (IRCNet) git: https://github.com/vergoh/vnstat

Bug reports, improvement ideas, feature requests and pull requests should be sent using the matching features on GitHub as those are harder to miss or forget.