[Libvir] How to get the memory used by a guest domin

ajishrao ajishrao at gmail.com
Wed Apr 30 13:07:26 UTC 2008


Hi dan,

 I got confused with your answer, virDomainInfo memory,

Does it mean that all allocated memory is utilized by the guest OS?
 Their is good chance that Guest OS may not be utilizing all memory.

How to find out the Currently running Guest Domains memory utilization
level?

On Wed, 2008-04-30 at 13:18 +0100, Daniel P. Berrange wrote:y

> On Wed, Apr 30, 2008 at 05:45:55PM +0530, Pranay Prasoon wrote:
> > Hi,
> > It appears to be no API available to provide the memory used by a guest
> > domin.
> > I looked at the availble libvirt api called "virNodeGetCellsFreeMemory"
> > using which it is possible to get the free mem. But looking further I found
> > that this is free memory of the "whole box" rather than based upon the guest
> > domain.
> > How can I get the memory used by a guest domin.
> 
>     virDomainGetInfo()
> 
> It fills in a virDomainInfo  struct with 
> 
>     unsigned long maxMem;       /* the maximum memory in KBytes allowed */
>     unsigned long memory;       /* the memory in KBytes used by the domain */
> 
> Dan.


Thanks & Regards
--Ajish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080430/8cfdb707/attachment-0001.htm>


More information about the libvir-list mailing list