Pcornel
Linux · Resource Monitoring

Disk

Cheat sheet · https://pcornel.dk/topic.php?topic=2837

Back to the Topic

Answer

Disk monitoring covers capacity (df), inodes (df -i), and performance: throughput, IOPS, utilisation (%util) and latency (await) per device.

Remember

%util near 100 % with high await means the device is saturated. Find the process doing I/O with iotop or pidstat -d. Capacity and inode exhaustion both give "No space left on device".

First checks

  • iotop -o — processes doing I/O
  • top -o %CPU / htop — live CPU and memory per process
  • vmstat 1 5 — CPU, memory, swap and I/O over time
  • free -h — memory and swap
  • iostat -xz 1 3 — disk utilisation and latency (sysstat)
  • uptime — load averages

Commands

df -h
df -i

Verify in this order

workload I/O → device queue → latency and utilisation → capacity and inode use

Where it usually breaks

First mismatch in hardware/kernel capability → scheduler/mm/device → cgroup/namespace → process/thread → service/runtime → workload behavior/counters; preserve identity/native diagnostic/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2837

Confirmation

Confirm action

Continue?