[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-API] XenAPI & DomU Memory Usage
Hi all, I've got a similar problem trying to retrive xenapi's values. While I'm able to fetch total and used memory using RRD's, I'm not yet able to retrive disk's data using VM_guest_metrics. I'm referring to this page: http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/index.html?c=VM_guest_metrics In "disks" field I was expecting to find "total disk / used disk" values but I'm not. Any idea about the missing value? Thanks 2012/5/1 Jonathan Ludlam <Jonathan.Ludlam@xxxxxxxxxxxxx>: > You can use the API call 'VM.query_data_source' to query a single RRD data > source through the API. > > e.g. > > [root@st21 ~]# python > Python 2.4.3 (#1, Sep 21 2011, 20:06:00) > [GCC 4.1.2 20080704 (Red Hat 4.1.2-51)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import xmlrpclib >>>> s=xmlrpclib.Server("http://localhost/") >>>> s.session.login_with_password("root","root") > {'Status': 'Success', 'Value': > 'OpaqueRef:1d1f04f1-f01d-a585-6e27-30ee9da3da2f'} >>>> sess='OpaqueRef:1d1f04f1-f01d-a585-6e27-30ee9da3da2f' >>>> vm=s.VM.get_by_uuid(sess,'c4d25869-386d-4238-2bc4-851b021a14e2')['Value'] >>>> s.VM.query_data_source(sess,vm,'memory') > {'Status': 'Success', 'Value': 268435456.0} > > This is, of course, only recommended if it's all you want. Don't query all > data sources on all VMs on all hosts every five seconds like this - use the > RRDs :-) > > Jon > > On 25 Apr 2012, at 14:10, Frederik Van Hecke wrote: > >> Hi, >> >> I'm running XCP 1.5 Beta with xen-tools installed in the DomU. >> Both XenCenter (6.0.2) as xsconsole show the actual memory usage of the VM. >> However the memory record for the vm's guest_metrics is empty. >> >> I was wondering whether that memory usage is retrievable through the API or >> not? >> I know it's in the RRD's, but if I can get it through the API that'd be so >> much more consistent / convenient. >> >> Any help / direction very much appreciated. Thank you. >> >> >> Kind regards, >> Frederik >> _______________________________________________ >> Xen-api mailing list >> Xen-api@xxxxxxxxxxxxx >> http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api > > > _______________________________________________ > Xen-api mailing list > Xen-api@xxxxxxxxxxxxx > http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api _______________________________________________ Xen-api mailing list Xen-api@xxxxxxxxxxxxx http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |