Process & Resource Monitoring (Top/Htop/Ps/Systemd)
Stop your process list from lying to you about memory
đź§© The Challenge
You look at top or htop and see a process hogging tons of RES memory, but the server isn’t actually swapping and the application isn’t behaving like it’s bloated. It is infuriating when you realize the kernel is counting shared libraries differently than you expect, leaving you to chase a memory leak that doesn’t exist.
đź’ˇ The Fix
Use the RSS and PSS columns in ps to see what that process is actually using exclusively. PSS gives you the proportional set size, which divides shared memory across the processes that use it, giving you a far more honest picture of memory usage.
ps aux --sort=-rss | awk '{printf "%-10s %-10s %-10s %s\n", $1, $2, $6, $11}'
⚙️ Why It Works
Adding the proportional set size field cuts through the noise of shared memory libraries like glibc or Qt that make every process look like it is ten times larger than it really is. Most people stick to the default RSS view and end up panicking over inflated numbers that don’t represent real physical RAM consumption.
🚀 Pro-Tip: Stick to pmap -x <pid> if you need to see exactly which shared library is the biggest offender.
Linux Tips & Tricks | © ngelinux.com | 9/11/2026
