Resource Monitoring
Watching System Resources
| Command | Watches |
|---|---|
top / htop | CPU, memory, per-process |
free -h | Memory & swap |
vmstat 1 | CPU/memory/IO over time |
iostat | Disk I/O (sysstat) |
sar | Historical stats (sysstat) |
uptime | Load average |
watch -n2 cmd | Re-run a command every 2s |
$ free -h
total used free shared buff/cache available
Mem: 7.7Gi 2.1Gi 3.4Gi 210Mi 2.2Gi 5.1Gi
Exam tip: In free -h, look at available (not just free) - the kernel uses spare RAM for buff/cache and reclaims it on demand.