1834263 Members
88749 Online
110066 Solutions
New Discussion

Re: top command question

 
SOLVED
Go to solution
Javier Ortiz Guajardo
Frequent Advisor

top command question

i??m reading the top manual and i don??t understand what means the column
RES.
Resident size of the process in kilobytes.The resident size information is, at best,an approximate value.

Resident where? (in memory i suppose)

how can i summarize it?
the SIZE process + RES = Total size process? (i guess no)
or RES is other size resident in memory?

i must summarize the size RES like memory usage).

Thanks?
Thanks.
The obstacles are those things that the people see when they left to see their goals.
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: top command question

The reason that the value is approximate is that memory calculations are very tricky because of shared libraries and shared memory segments. Consider the simple case of the shell: There might be hundreds of instances of sh running each with it's own private data segment but sharing a common text segment - the executable code and sharing functions in shared libraries. How many times should that memory usage be counted? It's even possible for the total memory to greatly exceed the virtual memory of the box but that's an illusion because of the sharing of memory segments.
If it ain't broke, I can fix that.
S.K. Chan
Honored Contributor

Re: top command question

In addition read the HP Memory Mgt Whitepaper.
http://docs.hp.com/hpux/onlinedocs/os/11i/mem_mgt.html
James R. Ferguson
Acclaimed Contributor

Re: top command question

Hi:

To add to the information already given, a recent 11.0 patch corrected an incongruous reporting of memory usage by 'top'.

Without PHCO_26020, 'top' could sometimes show the RESident size of a process as larger than its SIZE. This was due to the inclusion private uarea, shared memory, mmap regions in addition to the resident data, stack and text allocated, in the calculation of RES. The patch "resolves" the anomoly by adding these values to the SIZE. Again, this emphasizes why the RESident value is only an approximation.

Regards!

...JRF...