[libvirt] 'dommemstat' is not working for LXC hypervisor.

Kumar L Srikanth-B22348 B22348 at freescale.com
Wed Apr 28 11:13:41 UTC 2010


Thanks for the reply Daniel.
Virsh dominfo dommand showing following results:

Id:             32473
Name:           vm1
UUID:           f13bc513-15f2-1dd1-74f6-18c47931ece9
OS Type:        exe
State:          running
CPU(s):         1
Max memory:     5000000 kB
Used memory:    5000000 kB
Autostart:      disable


Though whatever services running on the domain, every time used memory
is showing as 5000000 kB. Is that result is correct?

Regards,
Srikanth.

-----Original Message-----
From: Daniel P. Berrange [mailto:berrange at redhat.com] 
Sent: Wednesday, April 28, 2010 4:10 PM
To: Kumar L Srikanth-B22348
Cc: libvir-list at redhat.com
Subject: Re: 'dommemstat' is not working for LXC hypervisor.

On Wed, Apr 28, 2010 at 12:00:09PM +0530, Kumar L Srikanth-B22348 wrote:
> Hi Daniel,
> 
> I am using libvirt version 0.8.0. I created a domain 'srikanth_vm' 
> using 'lxc' hypervisor. I am able to start the Domain. But, I am not 
> able to get the memory stats for that Domain.
> 
> If I issue 'dommemstat Srikanth_vm' in the virsh console, the 
> following error is throwing:
> 
> error: Failed to get memory statistics for domain srikanth_vm
> 
> error: this function is not supported by the hypervisor:
> virDomainMemoryStats

That is expected - no one has implemented the dommemstat API for the LXC
driver yet, though it should be really quiet easy todo so. All the info
should be available  already via the memory cgroup controller

> Can you please let me know, how can I get memory stats for a 
> particular domain in libvirt?

The virDomainGetInfo API / virhs dominfo  command shows you the overall
allocated memory. The dommemstats command gives you a finer breakdown of
usage of that memory by the guest


Daniel
-- 
|: Red Hat, Engineering, London    -o-
http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o-
http://deltacloud.org :|
|: http://autobuild.org        -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B
9505 :|





More information about the libvir-list mailing list