Operating System - HP-UX
1748252 Members
3872 Online
108760 Solutions
New Discussion

Re: How to convert the process RSS value to the one in glance?

 
SOLVED
Go to solution
Howard_Zhong
Occasional Visitor

[HP-UX] How to convert the process RSS value to the one in glance?

Dear all,

 

My machine is HP-UX 11.31 IA64. In the glance, you can see my attachment glance.jpg, the RSS of process dtlogin is 497.9mb.

 

And then I use SNMP walk to get the process RSS value. The result of dtlogin is 127328. Anybody know the unit of the number 127328? And what is the formula to convert to 497.9mb?

 

If I treated 127328 as KB, and then 127328 * 8 = 1018624 Kb, and then divided by 1024, is equals 994.75 Mb, which is not equals the value 497.9mb in glance. Could you please advice? Thank you.

 

The following is the definition of the process RSS in the MIB browser.

 

 -- Oid: 1.3.6.1.4.1.11.2.3.1.4.2.1.28
--         defined in module HP-UNIX

-- ---------------------------------------------------------------
 -- Module : HP-UNIX
 -- Node: processRssize

processRssize OBJECT-TYPE
     SYNTAX Gauge
     ACCESS read-only
     STATUS mandatory
     DESCRIPTION "Resident Set Size for process (private pages)."
     ::= { processEntry 28  }

 

Thank you & Regards,

Howard Zhong

 

 

P.S. This thread has been moved from Community Feedback & Suggestions to HP-UX > sysadmin. - Hp Forum moderator

 

6 REPLIES 6
Dennis Handly
Acclaimed Contributor
Solution

Re: How to convert the process RSS value to the one in glance?

>If I treated 127328 as KB, and then 127328 * 8 = 1018624 KB

 

Not sure why you multiplied by 8?

 

>"Resident Set Size for process (private pages)."

 

Unless you changed the page size, they are 4 KB pages, which gives you the RSS value.

Howard_Zhong
Occasional Visitor

Re: How to convert the process RSS value to the one in glance?

Hi Dennis,

 

Thank you for your reply.

 

-> "Unless you changed the page size, they are 4 KB pages, which gives you the RSS value."

 

For default, I know how to calculate now.  127328 * 4 / 1024 = 497.375 Mb, which is the same as the one in glance. : )

 

BTW, do you know if there is any oid for the page size? I'm afraid that if somebody change the default 4KB pages, then my calculation might be wrong. I need to get the page size dynamically to avoid this problem. Many thanks.

 

The attachment are the process and filesystem oids.

 

Howard

 

Dennis Handly
Acclaimed Contributor

Re: How to convert the process RSS value to the one in glance?

>do you know if there is any OID for the page size?

 

No but there is sysconf(2) for PAGE_SIZE.

Bill Hassell
Honored Contributor

Re: How to convert the process RSS value to the one in glance?

From the Tunable Page Size enhancement document:

http://h20565.www2.hp.com/hpsc/doc/public/display?docId=emr_na-c01916157

 

 

 

Tunable Base Page Size is a new feature introduced in update 3 to
HP-UX 11i v3.  The system administrator can now adjust the size of a
base page used in managing system memory, by invoking the kctune
command to change the tunable base_pagesize and then rebooting the
system.


A base page is the unit of physical memory management in th e HP - UX
kernel.  It is the smallest block of physical memory that can be
allocated for storing data and code by the kernel.  Base pages are
also the smallest unit of memory protection.  The size of a base page
has been made a tunable parameter for Integrity platforms in Update 3
to HP-UX 11i v3.

Previously, the base page size was fixed by the constant NBPG , whose
value was 4 kB.

Virtual memory, as seen by applications, is managed by the kernel in
units of base pages.

Applications can also use "large pages", which are logical entities
whose size is a multiple of the system base page size.  The getconf(1)
command can be used to obtain the base page size of the system.
Typical usage to obtain the system page size is:

getconf PAGE_SIZE

On HP - UX Integrity sys tems without the Tunable Base Page Size
enhancement, and on all HP 9000 (PA-RISC) platforms, the base page
size is always 4 kB.

 

==================================

 

BTW: the PAGE_SIZE parameter is undocumented for getconf but works all the way back to 10.20 (maybe earlier).

 



Bill Hassell, sysadmin
Howard_Zhong
Occasional Visitor

Re: How to convert the process RSS value to the one in glance?

Thank you very much Bill.

 

I know better with your answer.

Howard_Zhong
Occasional Visitor

Re: How to convert the process RSS value to the one in glance?

Thank you very much Dennis.