raspi: log network traffic (vnstat)

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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s