Process & Resource Monitoring (Top/Htop/Ps/Systemd)
Stop digging through process lists to find what is eating your memory
🧩 The Challenge
Dealing with a server that is paging to disk while you scramble to figure out which process is the glutton is a total nightmare. I have spent way too much time staring at htop trying to sort by memory while the UI is barely responsive.
💡 The Fix
Use the ps command with specific sorting flags to get a clean, ordered list delivered to your terminal instantly. It is much faster than waiting for an interactive monitor to refresh when the system is struggling.
ps -eo pid,pmem,pcpu,comm --sort=-rss | head -n 11
⚙️ Why It Works
Passing the rss flag tells the system to sort by Resident Set Size, which shows you exactly how much actual physical RAM each process is hoarding. The -eo flag limits the output to just the columns you care about so you are not blinded by extra noise.
🚀 Pro-Tip: Pipe that to watch if you need a live view that won’t freeze your entire session during a memory spike.
Linux Tips & Tricks | © ngelinux.com | 11/13/2026
