I am trying to get stats of Domains running under XEN hypervisor. I used Libvirt function for this purpose. I am trying to understand output for Memory. Domain running is Fedora-22 with 1GB Ram. Here is my code
y = virDomainGetInfo(allDomain, &info);
if (y == -1)
printf("Errorl\n");
else {
printf("Max Memory: %lu\n", info.maxMem);
printf("Memory: %lu", info.memory);
}
I get output as
Max Memory: 1048576
Memory: 1048576
Now, as per Libvirt API, info.memory
should return the memory in KBytes used by the domain.
My Question is, if info.memory
returns memory used and my
domain is using complete 100% of Max Memory or not? Also I tried to
create Domain with memory varying from 128MB to 2GB with same effect. I
also tried to run some applications in Domain but Memory usage return by
given function does not change.
Any help or guidance will be much appreciated.
Regards,
Aleem Akhtar
Research Assistant | HPC-Lab | SEECS
National University of Sciences & Technology
Sector H-12, Islamabad
Email: aleem.akhtar@seecs.nust.edu.pk
Website: aleemakhtar.com