🐧Linux System Monitoring Labs

🎯 Objective

Learn how to monitor a Linux system’s performance and resource usage using built-in and common open-source tools.


🧰 Prerequisites

  • Ubuntu 20.04+ system (VM or physical)

  • sudo access

Install essential tools

sudo apt update
sudo apt install htop iotop sysstat net-tools dstat -y

πŸ”Ή Lab 1: Monitor CPU and Memory Usage with top and htop

top

βœ… Shows real-time CPU, memory, and process usage.

htop

βœ… A more interactive and colorful view.


πŸ”Ή Lab 2: Monitor Disk I/O with iotop

βœ… Shows which processes are reading from or writing to the disk.


πŸ”Ή Lab 3: Monitor Disk Usage with df and du

βœ… View disk usage by filesystem.

βœ… See which directories are using the most space.


πŸ”Ή Lab 4: Monitor Network Usage with netstat and ss

βœ… Shows listening ports and the associated processes.

βœ… Modern, faster alternative to netstat.


πŸ”Ή Lab 5: Monitor System Load and Performance Over Time

βœ… Displays system load averages.

βœ… CPU usage history (requires sysstat).


πŸ”Ή Lab 6: Monitor System Resources with dstat

βœ… Combines CPU, disk, net, paging, and I/O stats in one view.


πŸ”Ή Lab 7: Identify High Resource Processes

βœ… Find top CPU and memory-consuming processes.


βœ… Wrap-Up

  • βœ… Used top, htop, iotop, dstat for real-time monitoring

  • βœ… Monitored CPU, disk, memory, network, and load

  • βœ… Learned to investigate and troubleshoot resource hogs


Last updated