How does CDM calculate memory usage on HP-UX based systems
search cancel

How does CDM calculate memory usage on HP-UX based systems

book

Article ID: 12049

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction



How is Memory information calculated by cdm probe for HP-UX based systems

Environment

Release: CNMSPP99000-8.4-Unified Infrastructure Mgmt-Server Pack-- On Prem
Component:

Resolution

The memory usage is found using the system call pstat_getdynamic(). 

The swap usage is found using the system call pstat_getswap(). 

Paging data is found using the system call pstat_getvminfo(). Since the data is cumulative the difference since the last data gathering is used as the basis for calculating paging in KB/s based on the formula paging_kbps = paging_delta * pagesize / interval. 

 

  •  Please find below API and the calculation formula used in HP-UX. 

 

API's for the calculation. 

1.pstat_getdynamic 

2.pstat_getswap 

3.pstat_getstatic 

 

Formulas: 

 

  • For the calculation of swap. 

"pstat_getswap" API is used for swap information in the probe. 

We use "pss_nblksenabled" parameter for calculation block device and "pss_swapchunk" for filesystem device. We are using a structure variable “si” which is passed in “pstat_getswap” then further for the calculation of swap total, calculated as follows: 

if (si.pss_flags & SW_BLOCK) 

swap_total += (si.pss_nblksenabled / 1024); 

swap_free += pagetom(si.pss_nfpgs); /* pages, not blocks! */ 

else if (si.pss_flags & SW_FS) 

swap_total += (si.pss_limit * si.pss_swapchunk / 1024); 

swap_free += pagetom(si.pss_nfpgs); 

 

  • We are using "pstat_getstatic" API for calculation of Physical Memory. 

 

  • Physical Used= Physical Mem - Memory free(calculated from page)- Cache Buffer 

Total Physical= Physical Mem + Total Swap 

Total Used = Physical Used + Swap Used - Cache Buffer(depends on gMemBufferUsed key) 

 

Additional Information

Article title: How does CDM calculate memory usage on Windows


Article title: How does CDM calculate memory usage on Linux


Article title: How does CDM calculate Memory Usage in Solaris?


Article title: How Is "Swap Usage" activity calculated by the cdm probe in Solaris


Article title: How Is "memory paging" activity calculated by the cdm probe?


CPU, Disk and Memory probe (cdm) Technical Brief