Stop letting stalled threads hide from your process list

Process & Resource Monitoring (Top/Htop/Ps/Systemd)

Stop letting stalled threads hide from your process list

🧩 The Challenge

You look at top and see a process pegging a core, but everything inside the app looks like it is just sitting there doing nothing. It’s infuriating when the OS says the process is active but the application logs are totally silent.

💡 The Fix

Switch from looking at whole processes to looking at the individual threads themselves. This lets you pinpoint exactly which worker or routine is spinning its wheels while the rest of the application sits idle.

top -H -p <PID>

⚙️ Why It Works

By flipping that H flag, top stops aggregating the CPU usage of every sub-process and gives you the per-thread view. Usually, you will find one thread looping on a mutex or a stuck network poll that you never would have spotted otherwise.

🚀 Pro-Tip: Pipe that to watch -n 1 if you need to keep a live eye on a process that keeps spawning and killing threads.

Linux Tips & Tricks | © ngelinux.com | 11/14/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted