Check CPU load per core
Show %usr, %sys and %iowait per core to tell one maxed-out core from evenly spread load.
mpstat -P ALL 1
- tool
- troubleshooting32 commands
More troubleshooting commands
-
vmstat 1 5 | awk 'NR>2{print "runq="$1" blocked="$2}'; nprocIf the vmstat r column (runnable tasks) is above nproc, the CPU is saturated, not just showing a high load average.
-
ps -o nlwp= -p <pid>; ps -eLf | wc -lCount threads for one process and for the whole system; runaway threads can use up kernel.pid_max.
-
while sleep 5; do ps -o rss= -p <pid> | awk '{print strftime("%T"),$1/1024"MB"}'; doneSample RSS every 5 seconds to tell a real leak (steady growth) from normal ups and downs.
-
cat /proc/<pid>/smaps_rollupGet Rss, Pss and Swap totals in one read without parsing the full smaps; cheap even for huge processes.
-
pmap -x <pid> | sort -k3 -rn | headSort mappings by RSS to spot a leaking heap, a large mmap or a bloated shared library.