Monitorowanie ruchu sieciowego

Bandwidth Monitor NG

Bandwidth Monitor NG is a small and simple console-based live network and disk io bandwidth monitor for Linux, BSD, Solaris, Mac OS X and others.

screenshot-bwm-ng

iftop

iftop does for network usage what top(1) does for CPU usage. It listens to network traffic on a named interface and displays a table of current bandwidth usage by pairs of hosts. Handy for answering the question “why is our ADSL link so slow?”.

screenshot-iftop

NetHogs

NetHogs is a small ‘net top’ tool. Instead of breaking the traffic down per protocol or per subnet, like most tools do, it groups bandwidth by process. NetHogs does not rely on a special kernel module to be loaded. If there’s suddenly a lot of network traffic, you can fire up NetHogs and immediately see which PID is causing this. This makes it easy to indentify programs that have gone wild and are suddenly taking up your bandwidth.

screenshot-nethogs

Moving or Renaming Multiple Files – The Easy (zsh) Way

Linux workers like you and me often need to move a bunch of files. For example, you want to rename all *.dat files into *.dat_save, or you want to rename all files foo.* into something like bar.*. This, however, is not easy to do using the move command as 1) “mv” only supports a single destination file or directory and 2) the shell tries to expand patterns like “*.dat” into e.g. “a.dat b.dat c.dat” before executing the command. The typical workaround is to write a for loop like “for f in *.dat; do mv $f ${f/dat/dat_save}; done“. But it goes much easier if you use the power of zsh, which is the superior shell anyway. ;)

Insert the following two lines into your .zshrc

autoload -U zmv
alias mmv='noglob zmv -W'

The first line activates the zmv command, an extended move command provided by the zsh. The second line creates an alias for a simplified invocation of that command. All of a sudden, you can write something like “mmv *.dat *.dat_old” or “mmv foo.* bar.*” into a newly opened terminal and it will do as you expect! You can even invoke “mmv **/*2008.mp3 **/*2009.mp3” and all matching files residing in any subdirectory are renamed according to the pattern as well.

OpenELEC

Open Embedded Linux Entertainment Center, or OpenELEC for short, is a small Linux distribution built from scratch as a platform to turn your computer into a complete XBMC media center. OpenELEC is designed to make your system boot as fast as possible and the install is so easy that anyone can turn a blank PC into a media machine in less than 15 minutes.