search for: vir_domain_memory_stat_nr

Displaying 1 result from an estimated 1 matches for "vir_domain_memory_stat_nr".

2015 Oct 28
0
How to find memory utilization percent of kvm guest?
I currently use following approach but its failing Find Max memory using following API         vdgiRet = virDomainGetInfo(domPtr, infoPtr);         memTotal = infoPtr->memory; Find current utilization using following API                 rVal = virDomainMemoryStats (domPtr, memStats, VIR_DOMAIN_MEMORY_STAT_NR, 0) ;         for (i = 0; i < rVal; i++)         {             if (memStats[i].tag == 7)                 memUsed = memStats[i].val;         } Which is the value of "VIR_DOMAIN_MEMORY_STAT_RSS    =    7" Then I calculate util as (memUsed/memTotal) But the value of memUsed exceeds...