mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
[XEND] Add simple VCPUs, VBDs, VIFs statistics monitoring
Keep track of xentop like statistics to expose through the Xen API Signed-off-by: Alastair Tse <atse@xensource.com>
This commit is contained in:
1 parent
e8d1d26031
commit
a19ccaa253
3 files changed
+71
-10
No files matched your search
@@ -200,6 +200,12 @@ def xapi_host_info(*args):
|
||||
print HOST_INFO_FORMAT % ('VMs', len(hostinfo['resident_VMs']))
|
||||
print HOST_INFO_FORMAT % ('UUID', host)
|
||||
|
||||
for host_cpu_uuid in hostinfo['host_CPUs']:
|
||||
host_cpu = execute(server.host_cpu.get_record, session,
|
||||
host_cpu_uuid)
|
||||
print 'CPU %s Util: %.2f' % (host_cpu['number'],
|
||||
float(host_cpu['utilisation']))
|
||||
|
||||
def xapi_host_set_name(*args):
|
||||
if len(args) < 1:
|
||||
raise OptionError("No hostname specified")
|
||||
|
||||