6 ms·
VnStat – A network traffic monitor for Linux and BSD
- Cieplak 11y agoBeen 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_Protocols:soconnect.d#Mac_OS_X http://dtracebook.com/index.php/Network_Lower_Level_Protocol... soaccept.d: http://dtracebook.com/index.php/Network_Lower_Level_Protocols:soaccept.d#Mac_OS_X 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
- steckerbrett 11y ago`iftop` works well on OSX.
- mrpippy 11y agoI'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.
- yc1010 11y agoI 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
- feld 11y agoIs there a reason why? I find vnstat to use zero noticeable resources even under high traffic load (1Gb)
- johnpowell 11y agoSame.. It is one of the first things I install on a new server. I have never noticed it using gobs of RAM or CPU.
- keeperofdakeys 11y agoI'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.
- deleted 11y ago[deleted]
- yc1010 11y agoI 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
- tux 11y agoYou 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 https://github.com/tuxy/bash/blob/master/vnstat.sh HTML - https://github.com/tuxy/static/blob/master/vnstat.html https://github.com/tuxy/static/blob/master/vnstat.html