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

Re: [Xen-API] Retrieve effectively used RAM by domU via API

We solve this problem by using direct access to xen (in python):

import xen.lowlevel.xc

mem_kb - _REAL_ allocated memory for domU.

P.S. Note - when VM migrates it have two domU in same time.

On 14.10.2011 23:26, Double-U wrote:

I've been out and about trying to find a way to retrieve the actual amount of 
RAM used by a domU via the API.
Thus far I've tried the API functions (VM_metrics), which always return the 
maximum amount of RAM available to the VM (b/o the ballooning mechanism).
Then I tried the RRD's, but upon closer investigation these return the same 
values as well.

Now, I am not very knowledgeable about this matter, but isn't there some way 
that Xen knows the amount of memory the VM is actually using, instead of the 
amount reserved? The only way I seem to be able to get that number is by 
actually running something like 'top' inside the domU -- which is hard when I 
sometimes do not have access to the VM. I hope turning the ballooning off isn't 
my only option here.

In case you are wondering why I would require said amounts: I need to know them to 
determine the efficiency of the software inside the VM (usage&  leakiness) and 
the VM configuration.

Did I miss something, isn't this exposed yet or am I experiencing a technical 

Any insight is greatly appreciated,
xen-api mailing list

xen-api mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.