Instiq
Chapter 4 · System Maintenance and Operations·v1.0.0·Updated 7/7/2026·~13 min

What's changed: Initial version (topic 2.04, subtopics 2.04.1–2.04.6)

4.4Monitoring Resource Usage

Key points

Learn the tools for monitoring CPU, memory, disk I/O, and network I/O: CPU with top, htop, ps, and sar; memory with vmstat, free, and sar; disk with iostat, iotop, and sar; network with netstat, iftop, ss, and sar. Also covers lsof for open files and iptraf for network traffic.

Turning a vague complaint that "the system feels slow" into a diagnosis of which resource—CPU, memory, disk I/O, or network I/O—is the bottleneck is where an operations engineer earns their keep. Because the best tool differs by resource type, the mapping must be memorized precisely.

4.4.1Monitoring CPU and memory

  • CPU: top (dynamically refreshing process list), htop (interactive, more readable top), ps (a static snapshot of process info), sar (CPU usage statistics including history).
  • Memory: vmstat (virtual memory stats including swap in/out), free (a listing of free/used memory), sar (historical memory usage stats, e.g. with -r).

4.4.2Disk I/O, network, and process detail

Continue reading — free sign-up

You're reading the free preview. Sign up free to read this section in full, plus every chapter (including 4+) and all questions.