hourly, daily and monthly network traffic for the selected interface(s).
Bellow you'll find the needed steps for its installation and setup on FreeBSD 7.0:
- % su
- # cd /usr/ports/net/vnstat ; make install clean
- # rehash
- # ifconfig -a
- # vnstat -u -i rl0
- # cat /usr/local/share/doc/vnstat/vnstat-cron >> /etc/crontab
Step 4 purpose is to find out the system network interface(s) in use, which in my case is rl0.
Finally with step 6 we've activated the cron job to feed vnStat's database following the port's supplied example.
To display the default statistics:
- % vnstat
- % vnstat -d
- % vnstat -m
- % vnstat -l -i rl0
- % vnstat --help
Further documentation is available at http://humdi.net/vnstat/.