[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]