Disk / Memory / CPU Troubleshooting
This page gives the fastest commands for capacity and performance issues. The goal is to identify whether the bottleneck is storage, memory pressure, CPU saturation, or process limits.
Disk
df -h du -sh /var/log/* find /var/log -type f -size +100M iostat -xz 1 3 lsof | grep deleted
Use cases: disk full, growing logs, deleted-but-still-open files, slow storage, container volume issues.
Memory
free -h vmstat 1 5 top ps aux --sort=-%mem | head pmap -x PID | tail -20
Use cases: RAM pressure, swap activity, large Java process, leak suspicion, runaway cache.
CPU
top htop mpstat -P ALL 1 3 ps aux --sort=-%cpu | head uptime
Use cases: high CPU, one hot core, thread contention, busy container, load spikes.
Fast Triage Sequence
- Check
uptimeandtop. - Check free disk with
df -h. - Check biggest directories with
du -sh *. - Check memory with
free -handvmstat. - Check per-core CPU with
mpstat -P ALL 1 3. - Check application process ownership of ports and files.