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
screen -t nethogs  nethogs wlan0
screen -t iotop iotop

# screen -c /tmp/myscreen.cfg

Top 10 Awesome Linux Screen Tricks

No comments:

Post a Comment