add hpux swap rate metrics

This commit is contained in:
Doug MacEachern 2007-08-03 05:04:03 +00:00
parent 0522dd045e
commit 2af18adeb3
1 changed files with 5 additions and 1 deletions

View File

@ -100,6 +100,7 @@ int sigar_mem_get(sigar_t *sigar, sigar_mem_t *mem)
int sigar_swap_get(sigar_t *sigar, sigar_swap_t *swap)
{
struct pst_swapinfo swapinfo;
struct pst_vminfo vminfo;
int i=0;
swap->total = swap->free = 0;
@ -117,7 +118,10 @@ int sigar_swap_get(sigar_t *sigar, sigar_swap_t *swap)
swap->used = swap->total - swap->free;
swap->page_in = swap->page_out = -1;
pstat_getvminfo(&vminfo, sizeof(vminfo), 1, 0);
swap->page_in = vminfo.psv_spgin;
swap->page_out = vminfo.psv_spgout;
return SIGAR_OK;
}