less than 1 minute read

to monitor the network traffic one can use the tool vnstat

  1. install vnstat
  2. setup database for interface: vnstat -u -i eth0
  3. start/enable service
  4. usage: update database: vnstat -u
  5. usage: query database: vnstat -q

troubleshooting: when systemctl status shows that database couldnt be created, just do this:

sudo chown -R vnstat:vnstat /var/lib/vnstat

source: wiki.archlinux.org