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

[Xen-API] How to get the host (slave) and vm real-time metrics(e.g. cpu_utilization)


  • To: xen-api@xxxxxxxxxxxxx
  • From: Will Sun <willsun810@xxxxxxxxx>
  • Date: Mon, 24 Nov 2014 09:24:08 +0800
  • Delivery-date: Mon, 24 Nov 2014 01:24:31 +0000
  • List-id: User and development list for XCP and XAPI <xen-api.lists.xen.org>

HiÂall,

IÂbuildÂaÂpoolÂincludesÂ3ÂhostsÂÂ:ÂvGate7ÂvGate8ÂvGate9.ÂÂvGate9ÂisÂtheÂmaster,othersÂareÂslaves.

IÂbuildÂaÂpageÂtoÂshowÂtheÂhostÂandÂvmÂmetrics(e.g.Âcpu_utilization)ÂonÂtheÂsameÂpage.ItÂworksÂfineÂforÂtheÂmasterÂ(vGate9)Â.ButÂitÂcannotÂgetÂtheÂslaveÂmetrics.

AsÂfollows:

Â

Â

Â

Â


InÂpython,IÂuseÂtheÂfollowingÂcodes to get the CPU Usage:



IÂattemptÂtoÂmakeÂanÂAPIÂcallÂtoÂaÂslaveÂ(evenÂsomethingÂtrivialÂlikeÂpool.get_all()),ÂIÂgetÂthe ['HOST_IS_SLAVE' ] exception,ÂalongÂwithÂtheÂmaster'sÂIPÂaddress.

TheÂmainÂproblemÂisÂtoÂget three hostsÂreal-timeÂperformingÂmetricsÂandÂtoÂshowÂthemÂonÂtheÂsameÂpage.Â

IsÂthereÂanyÂworkaroundÂtoÂsolveÂthisÂproblem?ÂThankÂyouÂinÂadvance!

Â



Best Regards!


Jesson


_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api

 


Rackspace

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