Results 1 to 3 of 3
Is there any command to get the memory utilization of a particular process in Linux?
I tried with Top and /proc/pid/status commands but the results are not proper, the memory ...
- 07-15-2009 #1Just Joined!
- Join Date
- Jul 2009
- Posts
- 2
Memory utilization for a particular process
Is there any command to get the memory utilization of a particular process in Linux?
I tried with Top and /proc/pid/status commands but the results are not proper, the memory keeps on increasing.
Can anyone tell other than Top and /proc/pid/status commands ?
- 07-15-2009 #2Linux Newbie
- Join Date
- Mar 2009
- Posts
- 228
This will give you the resident set size, the non-swapped physical memory that a task has used, for a process which is in kilobytes
man ps for details.Code:ps -eo pid,rss | grep "<pid> " | awk '{print $2}'
- 07-16-2009 #3Just Joined!
- Join Date
- Jul 2009
- Posts
- 2
Hi,
Thank you for your response.
"ps -eo pid,rss | grep "<pid> " | awk '{print $2}' "
Even this command gives the same information as that of Top.
But problem here is that the information given by top is not reliable it is constanly varying.
For example if we add some routes in a router the memory utilization increases accordingly for a process and now if the same amount of routes are deleted the memory utilization is not decreasing to the previous value, it is sometimes increasing which is wrong behaviour.
So my intention is to know the exact memeory allocation and deallocation for a particular process.


Reply With Quote