|
|
|
|
|
|
|
|
|
|
xen-api
Re: [Xen-API] Actual Memory used by DomU not see using python API.
i use
memory_dynamic_max - memory_internal_free
2010/5/27 Sane, Abhijeet <Abhijeet_Sane@xxxxxxx>:
> 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
>
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
|
|
|
|
|