Search This Blog

2015-01-20

Memory Management In Linux

Using ps we can find out how much memory is allocated to a process (VSZ) and how much memory a process is actually using (RSS)

ps -e -o pid,vsz,rss,comm= | sort -n -k 2

The above will show you the process id, how much memory is allocated to a process, how much the process is actually using, and a comment of process description. It will then sort by how much memory is allocated to a process for you to see which apps are using up a lot of VSS.

Long running processes are useful to know as well when looking for memory hungry apps that have been running a long time

ps -ef --sort=start_time


References:
http://linuxconfig.org/ps-output-difference-between-vsz-vs-rss-memory-usage
http://serverfault.com/questions/27887/how-to-sort-ps-output-by-process-start-time
http://linuxcommando.blogspot.ca/2008/09/how-to-get-process-start-date-and-time.html

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.