Site icon New Generation Enterprise Linux

Stop guessing why your process is stuck in uninterruptible sleep

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

Stop guessing why your process is stuck in uninterruptible sleep

đź§© The Challenge

You look at top and see a process in D state, and suddenly your load average is climbing into the double digits. It’s infuriating because you can’t kill it, you can’t debug it with gdb, and you’re just sitting there watching the server crawl to a halt.

đź’ˇ The Fix

Use the wchan column in ps to actually see which kernel function the process is stuck in. It saves you from rebooting the whole box when the real issue is just a hung NFS mount or a locking disk.

ps -eo pid,state,wchan:30,comm | grep -v ' S '

⚙️ Why It Works

This command pulls the process ID, its current status, and the specific kernel function it is currently waiting on, filtered to ignore standard sleeping processes. Seeing that specific function name usually points you straight to the hardware or driver that is throwing the tantrum.

🚀 Pro-Tip: If the output shows anything related to nfs or rpc, check your mount points immediately before you start blaming the application code.

Linux Tips & Tricks | © ngelinux.com | 10/31/2026

0 0 votes
Article Rating
Exit mobile version