Great Tool For Network Bandwidth Monitoring: vnstat

Did you ever wonder how much bandwidth your linux server is using each month, or each day? There are a number of tools that can give you this information, but many of them are packet sniffers, and can effect performance.
I recently came across a really nice lightweight tool that monitors your network bandwidth utilization on Linux (actually I just learned that it also works on BSD operating systems as well, eg. Mac OSX , so I am running it on my desktop now as well) called vnstat. It works by analyzing the /proc stats on Linux (at regular intervals using a cron job), and then stores summaries in a really small database.
You can then access these stats whenever using the vnstat command line utility.
For example if you run vnstat -m it will generate a nice plain text summary report:
month rx | tx | total -------------------------+--------------+-------------------------------------- Dec '08 1.10 GB | 28.88 MB | 1.13 GB %%%%%%%%%%%%%%%%% Jan '09 1.35 GB | 68.79 MB | 1.41 GB %%%%%%%%%%%%%%%%%%%%%: -------------------------+--------------+-------------------------------------- estimated 2.21 GB | 111 MB | 2.31 GB
That particular server is only being used for backups right now, so the numbers are kind of low.
Highly recommend this tool if you are looking for a simple and lightweight way to monitor network bandwidth.
Here's a full list of command line options:
-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 select interface (default: eth0) -?, --help short help -v, --version show version -tr, --traffic calculate traffic -l, --live show transfer rate in real time
Related Entries
- Howto Backup your Mac incrementally over SSH - March 10, 2006
- The 15 Essential UNIX commands - July 29, 2005
- Linux and OS X Shell Commands - March 7, 2005
Trackbacks
Trackback Address: 688/2AFD6B6A9861E063456007CB9A2BD523
Comments
On 02/05/2009 at 7:20:43 AM EST Micheil wrote:
1
Yeah, VNStat is really good at monitoring both in and out traffic on any linux machine. Something to note, is that there's also a php frontend for it, which is really good too. (Although, I'll admit I've changed it to show the percentage of my bandwidth used.. but, hey, a books not yours until you scribble notes in the back of it, is it?)
Also, this comment box is really really small on 1024x768.
Post a Comment
Recent Entries
- Cache Template in Request Setting Explained
- What Version of Java is ColdFusion Using?
- ColdFusion 9 Performance Brief from Adobe
- Request Filtering in IIS 7 Howto
- J2EE Session Cookies on ColdFusion / JRun
- Hands on ColdFusion Security Training
- ColdFusion 9 Solr Vulnerability - Are you at Risk?
- FCKEditor Year 2010 Bug for Firefox 3.6 with ColdFusion
Also, this comment box is really really small on 1024x768.



add to del.icio.us



