Changeset 1774 for trunk/packages/xvm-munin-config/host/usr
- Timestamp:
- Nov 25, 2008, 7:09:50 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/xvm-munin-config/host/usr/share/xvm-munin-host-config/plugins/xen_cpu
r1765 r1774 34 34 metrics = server.xenapi.VM_metrics.get_all_records() 35 35 for d in domains.values(): 36 ret[d['uuid'] ] = {'name': d['name_label'],37 'cpu_time': sum(metrics[d['metrics']]['VCPUs_utilisation'].values()),38 'domid': d['domid'],39 }36 ret[d['uuid'].replace('-', '_')] = {'name': d['name_label'], 37 'cpu_time': sum(metrics[d['metrics']]['VCPUs_utilisation'].values()), 38 'domid': d['domid'], 39 } 40 40 return ret 41 41 else: 42 42 domains = server.xend.domains_with_state(True, 'all', True) 43 43 for d in domains: 44 ret[sxp.child_value(d, 'uuid', 'NONE') ] = {'name': sxp.child_value(d, 'name', 'UNKNOWN'),45 'cpu_time': sxp.child_value(d, 'cpu_time', 0.0),46 'domid': sxp.child_value(d, 'domid', -1),47 }44 ret[sxp.child_value(d, 'uuid', 'NONE').replace('-', '_')] = {'name': sxp.child_value(d, 'name', 'UNKNOWN'), 45 'cpu_time': sxp.child_value(d, 'cpu_time', 0.0), 46 'domid': sxp.child_value(d, 'domid', -1), 47 } 48 48 return ret 49 49
Note: See TracChangeset
for help on using the changeset viewer.