Sigh. I know there are tools that easily show bytes/sec but I’m a lazy dumbass and don’t want to multiply by 8 to get bits. So I wrote this hack:
|
I generally keep that around just to see bandwidth. I have more complex versions that sniff out which interfaces are in use and show multiple interfaces in parallel as well. (Left as an exercise for the reader since mine are nastyuglyhacks)
One weirdness – some Linux kernel versions only update every other second so I again have to do math but /=2 is easier than *=8 so…
(Edit Sep 9 2010) -
Just saw ifstat. Looks like the tool I want is now here (though I really only care about megabits as a minimum unit) -
|
And… No shocker. On the kernels that are only reporting every other second, ifstat does as well. More interestingly, it seems to be exactly once every 2 seconds on all of those machines. It isn’t happening on newer kernels so I haven’t bothered to investigate more deeply…