Products
Applications
Support
Company
How To Buy
Skip to main content (Press Enter).
Sign in
Skip auxiliary navigation (Press Enter).
Register
Skip main navigation (Press Enter).
Toggle navigation
Search Options
Home
Communities
All Communities
Application Networking and Security
Enterprise Software
Mainframe Software
Software Defined Edge
Symantec Enterprise
Tanzu
VMware {code}
VMware Cloud Foundation
Blogs
All Blogs
Enterprise Software
Mainframe Software
Symantec Enterprise
VMware
Events
All Events
Enterprise Software
Mainframe Software
Symantec Enterprise
VMware
Water Cooler
Betas
Flings
Education
Groups
Enterprise Software
Mainframe Software
Symantec Enterprise
VMware
Members
vCenter
Cloud & SDDC
View Only
Community Home
Threads
Library
Events
Members
Back to discussions
Expand all
|
Collapse all
sort by most recent
sort by thread
HP-UX process memory size
rr_hyperic
Jan 23, 2007 09:49 AM
Hi. I have noticed that the process memory size values returned from sigar_proc_mem_get() is not the ...
Douglas MacEachern
Jan 23, 2007 05:05 PM
(moved to sigar-dev) Interesting, the numbers look the same between top and sigar on HP-UX 11.00, ...
1.
HP-UX process memory size
0
Recommend
rr_hyperic
Posted Jan 23, 2007 09:49 AM
Reply
Reply Privately
Options Dropdown
Hi. I have noticed that the process memory size values returned from sigar_proc_mem_get() is not the same as top, which it should be comparable to, as stated in the sigar docs.
I switched from real memory to virtual memory usage,
and added the sizes for all memory areas for a process found in /usr/include/sys/pstat/pm_pstat_body.h from HP-UX B.11.11. which seemed to be relevant.
Also switched from real to virtual memory for shared area
This post from HP forums seem to verify that,
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1077194
But this post mentions the size calculation is fuzzy:
http://groups.google.co.in/group/comp.sys.hp.hpux/browse_thread/thread/7c4ac0033ce706c8/600ccdc16fd04f0b?lnk=gst&q=glance&rnum=15
anyway.. now size matches "hp-ux top" size more closely
diff -u sigar/os/hpux/hpux_sigar.c.orig sigar/os/hpux/hpux_sigar.c
--- sigar/os/hpux/hpux_sigar.c.orig 2006-12-16 20:12:33 +0100
+++ sigar/os/hpux/hpux_sigar.c 2007-01-23 10:24:07 +0100
@@ -34,6 +34,10 @@
typedef int32_t pstat_int_t;
#endif
int sigar_os_open(sigar_t **sigar)
{
*sigar = malloc(sizeof(**sigar));
@@ -284,15 +288,19 @@
}
procmem->size =
- pinfo->pst_tsize + /* text */
- pinfo->pst_dsize + /* data */
- pinfo->pst_ssize; /* stack */
+ pinfo->pst_vtsize + /* text */
+ pinfo->pst_vdsize + /* data */
+ pinfo->pst_vssize + /* stack */
+ pinfo->pst_vshmsize + /* shared memory */
+ pinfo->pst_vmmsize + /* mem-mapped files */
+ pinfo->pst_vusize + /* U-Area & K-Stack */
+ pinfo->pst_viosize; /* I/O dev mapping */
procmem->size *= pagesize;
procmem->resident = pinfo->pst_rssize * pagesize;
- procmem->share = pinfo->pst_shmsize * pagesize;
+ procmem->share = pinfo->pst_vshmsize * pagesize;
procmem->minor_faults = pinfo->pst_minorfaults;
procmem->major_faults = pinfo->pst_majorfaults;
2.
RE: HP-UX process memory size
0
Recommend
Broadcom Employee
Douglas MacEachern
Posted Jan 23, 2007 05:05 PM
Reply
Reply Privately
Options Dropdown
(moved to sigar-dev)
Interesting, the numbers look the same between top and sigar on HP-UX
11.00, so I hadn't noticed. Your explanation makes sense and patch
looks good, I've applied to both trunk and the SIGAR_1_3 branch.
Thanks!
On Jan 23, 2007, at 1:48 AM, rr wrote:
> Hi. I have noticed that the process memory size values returned
> from sigar_proc_mem_get() is not the same as top, which it should
> be comparable to, as stated in the sigar docs.
>
> I switched from real memory to virtual memory usage,
> and added the sizes for all memory areas for a process found in /
> usr/include/sys/pstat/pm_pstat_body.h from HP-UX B.11.11. which
> seemed to be relevant.
>
> Also switched from real to virtual memory for shared area
>
> This post from HP forums seem to verify that,
>
http://forums1.itrc.hp.com/service/forums/questionanswer.do
?
> threadId=1077194
>
> But this post mentions the size calculation is fuzzy:
>
>
http://groups.google.co.in/group/comp.sys.hp.hpux/browse_thread/
> thread/7c4ac0033ce706c8/600ccdc16fd04f0b?lnk=gst&q=glance&rnum=15
>
> anyway.. now size matches "hp-ux top" size more closely
>
> diff -u sigar/os/hpux/hpux_sigar.c.orig sigar/os/hpux/hpux_sigar.c
> --- sigar/os/hpux/hpux_sigar.c.orig 2006-12-16 20:12:33 +0100
> +++ sigar/os/hpux/hpux_sigar.c 2007-01-23 10:24:07 +0100
> @@ -34,6 +34,10 @@
> typedef int32_t pstat_int_t;
> #endif
>
> int sigar_os_open(sigar_t **sigar)
> {
> *sigar = malloc(sizeof(**sigar));
> @@ -284,15 +288,19 @@
> }
>
> procmem->size =
> - pinfo->pst_tsize + /* text */
> - pinfo->pst_dsize + /* data */
> - pinfo->pst_ssize; /* stack */
> + pinfo->pst_vtsize + /* text */
> + pinfo->pst_vdsize + /* data */
> + pinfo->pst_vssize + /* stack */
> + pinfo->pst_vshmsize + /* shared memory */
> + pinfo->pst_vmmsize + /* mem-mapped files */
> + pinfo->pst_vusize + /* U-Area & K-Stack */
> + pinfo->pst_viosize; /* I/O dev mapping */
>
> procmem->size *= pagesize;
>
> procmem->resident = pinfo->pst_rssize * pagesize;
>
> - procmem->share = pinfo->pst_shmsize * pagesize;
> + procmem->share = pinfo->pst_vshmsize * pagesize;
>
> procmem->minor_faults = pinfo->pst_minorfaults;
> procmem->major_faults = pinfo->pst_majorfaults;
>
×
New Best Answer
This thread already has a best answer. Would you like to mark this message as the new best answer?
Copyright 2024. All rights reserved.
Powered by Higher Logic