Watch hot threads live
Watch a process's threads live; convert the hot TID to hex (printf %x) to match nid in jstack.
top -H -p <pid>
- tool
- troubleshooting32 commands
More troubleshooting commands
-
mpstat -P ALL 1Show %usr, %sys and %iowait per core to tell one maxed-out core from evenly spread load.
-
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.