Process & Resource Monitoring (Top/Htop/Ps/Systemd)
Stop wasting time watching top spin when you want to see who owns what
🧩 The Challenge
Ever been paged for a server running at 100 percent CPU only to see a bunch of processes owned by ‘www-data’ and have no idea which actual site is causing the grief? It is maddening to see 50 identical command lines without knowing who triggered them.
💡 The Fix
Start using the pgrep and ps flags that actually pull the specific user context and execution start times so you can isolate the rogue process instead of guessing. You will stop killing the wrong worker threads once you can map the PID to a specific user or start time.
ps -eo user,pid,pcpu,pmem,start,args --sort=-pcpu | head -n 10
⚙️ Why It Works
Passing the -e flag grabs every process on the system, while the -o option lets you cherry-pick exactly the columns that matter, like the process start time, which usually gives away exactly which request kicked off the runaway loop. Sorting by pcpu keeps the noise at the bottom where it belongs.
🚀 Pro-Tip: Alias this to something like ‘topcpu’ in your .bashrc and you will never type those flags again.
Linux Tips & Tricks | © ngelinux.com | 9/1/2026
