Hacker News new | comments | show | ask | jobs | submit login
VnStat – A network traffic monitor for Linux and BSD (humdi.net)
70 points by merah on July 19, 2015 | hide | past | web | favorite | 9 comments



You can also use vnstat with vnstati to generate nice graphs.

I use it something like this with cron.

Bash - https://github.com/tuxy/bash/blob/master/vnstat.sh

HTML - https://github.com/tuxy/static/blob/master/vnstat.html


I've used vnstat for traffic monitoring on Linux/BSD routers for years, simple and does the job. The on-disk format is not machine-independent though, I had to start my records over when OpenBSD went to 64-bit time_t.


I have been using it for years as well but instead of having it running all the time I just run "vnstat -i eth0 -tr" every minute with cron and log that 5 second average result


Is there a reason why? I find vnstat to use zero noticeable resources even under high traffic load (1Gb)


Same.. It is one of the first things I install on a new server. I have never noticed it using gobs of RAM or CPU.


I have scripts collect all sorts of other data about the server and send it to central log server every minute, i do not really need exact data more of a snapshot (traffic, ram, cpu, harddrive etc etc) and well I do not like running things all time on server, tho' yes vnstat is very light


I'd hope it does, considering the man page says it literally reads the kernel's interface counters from /proc (or in other words, the kernel does all the counting). The daemon has its own polling time as well.


Been looking for a tool like iptraf or nethogs for OSX. nettop is ok. My favorite thus far are these two dtrace scripts for tracing network connections:

soconnect.d: http://dtracebook.com/index.php/Network_Lower_Level_Protocol...

soaccept.d: http://dtracebook.com/index.php/Network_Lower_Level_Protocol...

If you're on OSX and want to play around with dtrace, there are a bunch of really cool built-in scripts:

   man -k dtrace


`iftop` works well on OSX.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: