LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

vnstatd

Network traffic statistics collection daemon

TLDR

Start the daemon
$ sudo systemctl start vnstat
copy
Enable at boot
$ sudo systemctl enable vnstat
copy
Run daemon in foreground
$ vnstatd -n
copy
Run with debug output
$ vnstatd -D
copy
Sync database and exit
$ vnstatd --sync
copy

SYNOPSIS

vnstatd [options]

DESCRIPTION

vnstatd is the daemon component of vnStat that collects network traffic statistics. It reads interface counters from the kernel at configured intervals and stores data in a persistent database.The daemon tracks multiple interfaces simultaneously, recording 5-minute, hourly, daily, monthly, and yearly statistics. It automatically detects new interfaces added to the database without requiring restart.Resource usage is minimal since vnstatd reads kernel counters rather than capturing packets. Data persists across reboots, making it suitable for long-term bandwidth monitoring.

PARAMETERS

-d, --daemon

Fork to background as daemon.
-n, --nodaemon
Stay in foreground.
-s, --sync
Sync cached data to database and exit.
-D, --debug
Enable debug output.
--config file
Use specified config file.
-p, --pidfile file
Use specified PID file.
--noadd
Don't add new interfaces automatically.
-v, --version
Display version.

CONFIGURATION

Config file: /etc/vnstat.confKey settings include monitored interfaces, database location, update interval, and data retention periods.

INSTALL

sudo apt install vnstat
copy
sudo dnf install vnstat
copy
sudo pacman -S vnstat
copy
sudo apk add vnstat
copy
sudo zypper install vnstat
copy
brew install vnstat
copy
nix profile install nixpkgs#vnstat
copy

CAVEATS

Statistics begin from daemon start, not historically. Kernel counter resets (reboots, interface changes) may cause inaccuracies. Database corruption possible on unclean shutdown.

HISTORY

vnstatd is part of vnStat, created by Teemu Toivola for lightweight network traffic monitoring. The project began in 2002 and has become a standard tool for bandwidth monitoring on Linux servers and embedded systems.

SEE ALSO

vnstat(1), vnstati(1), iftop(8), nethogs(8)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid