WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] Actual Memory used by DomU not see using python API.

To: "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] Actual Memory used by DomU not see using python API.
From: "Sane, Abhijeet" <Abhijeet_Sane@xxxxxxx>
Date: Thu, 27 May 2010 03:40:14 -0600
Accept-language: en-US
Acceptlanguage: en-US
Cc: Goncalo Gomes <Goncalo.Gomes@xxxxxxxxxxxxx>, Jonathan Ludlam <Jonathan.Ludlam@xxxxxxxxxxxxx>
Delivery-date: Thu, 27 May 2010 02:40:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acr9gJv1Ourq+7ukT6S+Aq5h0IdRiA==
Thread-topic: Actual Memory used by DomU not see using python API.
Hi ,
I am collecting Domain stats for the DomU 's on a host. I want to collect the 
actual memory used , memory_dynamic_max using  the python api.
The code snippet is as follows

         try:
532                 for vm in all:
533                         try:
534                                 record = session.xenapi.VM.get_record(vm)
535                                 if  not record["is_control_domain"] and  
not record["is_a_template"] and record["resident_on"] :
536                                         vm_name = record["name_label"]
537                                         uuid = record["uuid"]
538                                         domid = record["domid"]
539                                         static_max_mem = 
str(record["memory_static_max"])
540                                         vm_metrics = record["metrics"]
541                                         vm_metric = 
session.xenapi.VM_metrics.get_record(vm_metrics)
542                                         dyn_max_mem =  
str(vm_metric["memory_actual"])
543                                         cpu_online = 
session.xenapi.VM.get_VCPUs_max(vm)
544                                         vif_set = 
session.xenapi.VM.get_VIFs(vm)



I see that "memory_actual" values does not reflect the actual memory used but 
shows the max memory available to the domain. I want to know if the rrd 
database stores this data . Let me know if I am using the wrong field to 
collect the data.

Please guide.

Abhijeet Sane


_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

<Prev in Thread] Current Thread [Next in Thread>