Fix proc_mem.size on HP-UX

This commit is contained in:
Doug MacEachern 2007-01-23 16:59:41 +00:00
parent fdb740265a
commit 0425a0231a
2 changed files with 13 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2007-01-22 Doug MacEachern <dougm@hyperic.com>
* Fix proc_mem.size on HP-UX
Submitted by: Ragnar <rr@mima.x.se>
2007-01-22 Doug MacEachern <dougm@hyperic.com> 2007-01-22 Doug MacEachern <dougm@hyperic.com>
* [SIGAR-32] Fix FileTail on Windows * [SIGAR-32] Fix FileTail on Windows

View File

@ -284,15 +284,19 @@ int sigar_proc_mem_get(sigar_t *sigar, sigar_pid_t pid,
} }
procmem->size = procmem->size =
pinfo->pst_tsize + /* text */ pinfo->pst_vtsize + /* text */
pinfo->pst_dsize + /* data */ pinfo->pst_vdsize + /* data */
pinfo->pst_ssize; /* stack */ 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->size *= pagesize;
procmem->resident = pinfo->pst_rssize * 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->minor_faults = pinfo->pst_minorfaults;
procmem->major_faults = pinfo->pst_majorfaults; procmem->major_faults = pinfo->pst_majorfaults;