The exact sequence of Linux commands to run when a production server is degraded — CPU, memory, disk, network, logs, and real incident examples.
Run `ps aux --sort=-%cpu | head -15` for a non-interactive snapshot, or `top -bn1 | head -20` for a scriptable one-shot read. Both return CPU percentages without pausing the process tree, making them safe during a live incident. For sustained monitoring, `pidstat -u 1 5` samples per-process CPU usage across 5 intervals without the overhead of an interactive viewer.
Disk space exhaustion means no bytes are available for new data — `df -h` shows 100% usage. Inode exhaustion means no new directory entries can be created even when gigabytes of space remain — `df -ih` shows 100% inode usage. The latter is caused by millions of small files, common with misconfigured log rotators, PHP session directories, or mail spools. The fix is finding and deleting the inode-heavy directory with `find / -xdev -printf '%h\n' 2>/dev/null | sort | uniq -c | sort -rn | head -10`.
Discussion0