Find out the total memory a certain user's processes are using
I have a Redhat 7.9 with 16GB of RAM and 8GB of Swap and because I got Swap full notifications, I would like to know how much memory does the ora user's processes are using at a certain time.
Right now, the swap is pretty ok but still being used even if the Mem is showing 1451 from 15875 being used. Code:
free -m Code:
ps aux | awk '{arr[$1]+=$4}; END {for (i in arr) {print i,arr[i]}}' | sort -k2 When running ps aux I see that some process are using 0.0% Mem so I assume this is a roundup for something like 0.033% so not as accurate as I would like to be. Is there a way to be more 100% accurate? My ora user got 101.3 and that's % of RAM - so does that mean that it was using all 100% of the 16GB and some more 1.3% from the Swap? Why do I see 1451 of RAM currently being used if the ps aux is showing that ora's processes are using more than 100% of memory. And why is Swap being used if only a small portion of RAM is used? |
Accounting for memory usage is a black art, not a science. Anyone claiming 100% accounting is fooling themselves. Have a read of this for a tool that gives simple accurate results.
|
All times are GMT -5. The time now is 12:36 PM. |