Search This Blog

Thursday, May 19, 2011

Screen trick how to simultaneously monitor network traffic and disk activity and processes in Linux

As a system administrator sooner than later you will discover the 'screen' command. It is very powerful tool that allows you practically do anything with your (black) terminal screen or run commands in background for you.

The tools we will use for monitoring:
- htop is a top like process monitoring tool for text consoles
- nethogs is a network monitoring tool (needs root privileges!)
- iotop is a disk I/O monitoring tool

To start a single screen session, divided in 3 vertical smaller screens, each running its own monitoring program try this recipe:

# cat <<END >/tmp/myscreen.cfg
startup_message off
screen -t top htop
split
focus
screen -t nethogs  nethogs wlan0
split
focus
screen -t iotop iotop
END

# screen -c /tmp/myscreen.cfg

References:
Top 10 Awesome Linux Screen Tricks

No comments:

Post a Comment