Ubuntu – vnstat not updating

14.04networkingvnstat

I installed vnstat on my Ubuntu 14.04 server to track my internet usage (I have a limited monthly transfer). The database never updates, however. I've tried uninstalling/reinstalling, but that doesn't work. What do I need to do to get vnstat to update and be accurate?

Best Answer

Run

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

This fixed my problem on Ubuntu 14.04.

Make sure you have following files in that folder and have proper ownership.

boby@fwhlin:/var/lib/vnstat$ ls -la
total 16
drwxr-xrwx  2 vnstat vnstat 4096 May 16 01:50 .
drwxr-xr-x 78 root   root   4096 Jul 22 15:14 ..
-rw-r--rwx  1 vnstat vnstat 2792 Jul 26 00:26 eth0
-rw-rw-r--  1 vnstat vnstat 2792 Jul 26 00:26 .eth0
boby@fwhlin:/var/lib/vnstat$ 

.eth0 is temp file, that may disappear sometimes.

Related Question