Wednesday, January 21, 2009

Vnstat On Debian & Ubuntu

Hi...

Installation Of Vnstat On Debian

apt-get install vnstat

Once installed you'll need to initialise the database the system uses for recording your traffic details. The tool uses one database for each network interface you wish it to monitor. (These are not real databases, just text files located in the directory /var/lib/vnstat.)

vnstat -u -i eth0

debian:~# vnstat
Database updated: Wed Jan 21 15:25:01 2009

eth0

received: 0 MB (nan%)
transmitted: 0 MB (nan%)
total: 0 MB

rx | tx | total
-----------------------+------------+-----------
today 0 MB | 0 MB | 0 MB
-----------------------+------------+-----------
estimated 0 MB | 0 MB | 0 MB

vnstat --help
-q, --query query database
-h, --hours show hours
-d, --days show days
-m, --months show months
-w, --weeks show weeks
-t, --top10 show top10
-s, --short use short output
-u, --update update database
-i, --iface change interface (default: eth0)
-?, --help short help
-v, --version show version
-tr, --traffic calculate traffic

See also "--longhelp" for complete options list and "man vnstat".

man vnstat (View Man Page For More info)


No comments: