def get_dom(domid):
data = dict(domid=domid)
data['name'] = xsc.read('', '/local/domain/%d/name' % domid)
+ # /vm contains a path like "/vm/UUID"; strip the "/vm/"
data['uuid'] = xsc.read('', '/local/domain/%d/vm' % domid)[4:]
- if data['name'][0:2] == 'd_':
+ if data['name'].startswith('d_'):
data['munin_name'] = 'db domid %d' % domid
else:
data['munin_name'] = data['name']
if cmd == 'config':
print """
- graph_title Xen domain network usage
- graph_args --base 1000
- graph_vlabel bits in (-) / out (+) per ${graph_period}
- graph_info This graph shows how network is utilized by Xen domains.
- graph_category network
- graph_period second"""
+ graph_title Xen domain network usage
+ graph_args --base 1000
+ graph_vlabel bits in (-) / out (+) per ${graph_period}
+ graph_info This graph shows how network is utilized by Xen domains.
+ graph_category network
+ graph_period second"""
for d in sorted(domains):
for direction in ('down', 'up'):
key = "%s_%s" % (d, direction)