1833758 Members
2814 Online
110063 Solutions
New Discussion

procsize vs. kmeminfo

 
Maxim Rozin
Frequent Advisor

procsize vs. kmeminfo

1. im trying to monitor my process real memory
im using 2 commands:
kmeminfo -user
procsize -fRn

the output is not the same, any one know what can be the reaon?

2. how can i tell how much swap each process is taking (without using kmeminfo -user)

thanx.
1 REPLY 1
Navin Bhat_2
Trusted Contributor

Re: procsize vs. kmeminfo

Hello Maxim,
I checked on my system and they have always matched. The reason you might have a confusion is because some of the process may not show a text or data since that process may not be active and the kernel did have to take a page fault and load any text or data in memory hence the phy/res sizes will show up zero. What you would see is only the UAREA associated with that process. The pregion and uarea are not swapped out but the rest text data etc can be paged out and if the processes becomes active you can see the pages being swapped back in.

Take a known active process and compare the res/virtual sizes shown in procsize to the virtual and physical pages allocated to that segment in the kmeminfo output and you will see that they match.

Look carefully at the reported memory regions and remember procsize reports only total of each region. So if you several sharedmemory regions (as seen in kmeminfo for that proc) you will see the total of those regions in the procsize output under the SHMEM column.

I can provide examples if you need them.


Here are the commands I used.

./procsize -fRVn -p 1739


./kmeminfo -pid 1739



------------------

Again to get per process swap information you need tools like kmeminfo or p4 to get that kind of information. I am not aware of any other system provided tools to get that info.


You could choose to call into HP support if you wish more detailed analysis of any problem you are facing.