Linux Network Traffic Monitoring
December 30th, 2008 Category: Linux ServerYou are running a Linux server and have no possibility to monitor your traffic monthly, daily, weekly etc? Then you really should try vnstat. I like it because it’s:
- easy to install
- easy to use
- collects long term traffic statistics
- doesn’t generate much CPU load
For people who don’t like the shell check out the vnstat PHP frontend.
Installation is esay using Debian Etch:
apt-get install vnstat vnstat -u -i eth0
For certain virtual servers you have to use a different ethernet interface than “eth0″, e.g. “venet0″:
vnstat -u -i venet0
That’s all. vnstat will now be executed periodically from cron. Some time passed you can check your traffic, like in the example below.
host:~# vnstat -m eth0 / monthly month rx | tx | total -----------------------+--------------+-------------------------------------- Jan '08 252.40 GB | 4.17 TB | 4.41 TB %::::::::::: Feb '08 140.07 GB | 3.96 TB | 4.10 TB ::::::::::: Mar '08 152.46 GB | 4.21 TB | 4.36 TB :::::::::::: Apr '08 150.35 GB | 4.11 TB | 4.26 TB :::::::::::: May '08 118.78 GB | 3.53 TB | 3.65 TB :::::::::: Jun '08 144.95 GB | 4.54 TB | 4.68 TB ::::::::::::: Jul '08 157.09 GB | 4.91 TB | 5.06 TB :::::::::::::: Aug '08 160.96 GB | 5.01 TB | 5.17 TB ::::::::::::::: Sep '08 172.33 GB | 5.43 TB | 5.60 TB :::::::::::::::: Oct '08 189.69 GB | 6.12 TB | 6.31 TB %::::::::::::::::: Nov '08 190.89 GB | 6.52 TB | 6.71 TB %:::::::::::::::::: Dec '08 209.59 GB | 7.35 TB | 7.55 TB %::::::::::::::::::::: -----------------------+--------------+-------------------------------------- estimated 219.94 GB | 7.71 TB | 7.93 TB













Leave a Reply