Site icon New Generation Enterprise Linux

Stop staring at static snapshots when hunting memory hogs

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

Stop staring at static snapshots when hunting memory hogs

🧩 The Challenge

Everyone uses top or htop, but when a process is leaking memory and jumping all over the list, it is impossible to track the growth in real-time. I have spent way too much time refreshing the screen and squinting at numbers trying to figure out which process is actually climbing.

💡 The Fix

Use the internal sorting capabilities of top to lock onto the memory column so you can watch the resident set size update without the row bouncing around the screen. This makes it painfully obvious which process is the culprit.

top -o %MEM

⚙️ Why It Works

Setting the sort field directly through the flag ensures the process list stays pinned to your target metric regardless of what else is happening on the box. It turns a chaotic screen into a useful diagnostic view.

🚀 Pro-Tip: If you are already inside top, just hit Shift+M to toggle that sort order without restarting the tool.

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

0 0 votes
Article Rating
Exit mobile version