Re: [libvirt] Libvirt's DomainGetInfo Function Development

2016-08-05 Thread Martin Kletzander
On Fri, Aug 05, 2016 at 06:12:25PM +0200, Andrea Bolognani wrote: On Fri, 2016-08-05 at 18:49 +0500, Aleem Akhtar wrote: Thanks. But I am using XEN. I see. qemu-guest-agent is definitely not an option then. And I also don't want to go inside guest. I mean I want to get memory usage at the sa

Re: [libvirt] Libvirt's DomainGetInfo Function Development

2016-08-05 Thread Andrea Bolognani
On Fri, 2016-08-05 at 18:49 +0500, Aleem Akhtar wrote: > Thanks. > But I am using XEN. I see. qemu-guest-agent is definitely not an option then. > And I also don't want to go inside guest. I mean I want to > get memory usage at the same level I am getting max memory > and total memory. The probl

Re: [libvirt] Libvirt's DomainGetInfo Function Development

2016-08-05 Thread Aleem Akhtar
Thanks. But I am using XEN. And I also don't want to go inside guest. I mean I want to get memory usage at the same level I am getting max memory and total memory. I have another question. If Memory attribute of GetDomainInfo gives total memory I.e. memory in use plus remaining memory than what is

Re: [libvirt] Libvirt's DomainGetInfo Function Development

2016-08-05 Thread Andrea Bolognani
On Fri, 2016-08-05 at 17:45 +0500, Aleem Akhtar wrote: > Ok. So that's why I was getting 1 GB as a result. > So is there any way I can get memory in used programmatically?  > I mean without going inside guest domain. The only way I can come up with at the moment relies on qemu-guest-agent:   $ vi

Re: [libvirt] Libvirt's DomainGetInfo Function Development

2016-08-05 Thread Aleem Akhtar
Ok. So that's why I was getting 1 GB as a result. So is there any way I can get memory in used programmatically? I mean without going inside guest domain. On Aug 5, 2016 5:42 PM, "Andrea Bolognani" wrote: > On Thu, 2016-08-04 at 20:02 +0500, Aleem Akhtar wrote: > > > > I am trying to get stats o

Re: [libvirt] Libvirt's DomainGetInfo Function Development

2016-08-05 Thread Andrea Bolognani
On Thu, 2016-08-04 at 20:02 +0500, Aleem Akhtar wrote: >  > 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 = virDomainGetI

[libvirt] Libvirt's DomainGetInfo Function Development

2016-08-04 Thread Aleem Akhtar
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 {