How to check Top memory consuming process In Gb
Hello
Whether there is any tool are command avaiable to list all top running memory consuming process in Gb .I google and find top comman but it display the memory consumption IN Mb .How can i get the report in Gb format for beeter analysing |
Code:
ps aux | awk '{print $4"\t"$11}' | sort -gr | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr | head If you're trying specifically to get the actual value in Megs/Gigs, you might want to install htop and give that a shot. htop has more options available. http://htop.sourceforge.net/ |
[root@example Desktop]# ps aux | awk '{print $4"\t"$11}' | sort -gr | uniq -c | awk '{print $2" "$1" "$3}' | sort -nr | head
68.3 1 /usr/bin/java 2.1 1 gnome-screensaver 2.0 1 /usr/bin/Xorg 1.1 1 /usr/bin/gnome-terminal 0.9 1 /usr/libexec/mysqld 0.8 1 nautilus 0.5 1 /usr/lib/vmware-tools/sbin64/vmtoolsd 0.4 1 /usr/libexec/wnck-applet 0.4 1 metacity 0.4 1 gnome-panel [root@example Desktop]# free -m total used free shared buffers cached Mem: 993 923 69 0 2 34 -/+ buffers/cache: 886 106 Swap: 8159 578 7581 [root@example Desktop]# I could int find the wright percentage for the my server |
How about using some memory-related switches and ps' sorting capabilities?:
Code:
/bin/ps ax -orss,%mem,cmd --sort=rss|tac|head -10 |
Seems the OP wants to correlate individual process "memory" usage (whatever that might mean) and overall system usage as per "free".
Good luck in that endeavour ... |
Quote:
Quote:
|
I'll try - but memory management is such a can of worms.
Have a read of this from one of the kernel devs. Take note of the general comments rather than the specific patches being discussed - this is pretty old, but still valid even though most of the patches have been merged by now. There are also plenty of threads discussing this here on LQ. Short answer - use the solutions offered to get the largest consumers, but don't try to reverse map it back to the "system used". Just too hard, even for the kernel devs. Edit: forgot to mention; have a look at /proc/meminfo to see how many "types" of memory allocation there are. Not all relevant in this discussion admittedly. |
All times are GMT -5. The time now is 02:12 PM. |