logger.log("bwmon: Warning: Configuration file /etc/planetlab/plc_config.py not found", 2)
logger.log("bwmon: Running in DEBUG mode. Logging to file and not emailing.", 1)
logger.log("bwmon: Warning: Configuration file /etc/planetlab/plc_config.py not found", 2)
logger.log("bwmon: Running in DEBUG mode. Logging to file and not emailing.", 1)
# Notify slice
if self.emailed == False:
subject = "pl_mom capped bandwidth of slice %(slice)s on %(hostname)s" % params
# Notify slice
if self.emailed == False:
subject = "pl_mom capped bandwidth of slice %(slice)s on %(hostname)s" % params
kernelhtbs = gethtbs(root_xid, default_xid)
logger.log("bwmon: now %s running HTBs" % kernelhtbs.keys().__len__(), 2)
kernelhtbs = gethtbs(root_xid, default_xid)
logger.log("bwmon: now %s running HTBs" % kernelhtbs.keys().__len__(), 2)
for (xid, slice) in slices.iteritems():
# Monitor only the specified slices
if xid == root_xid or xid == default_xid: continue
for (xid, slice) in slices.iteritems():
# Monitor only the specified slices
if xid == root_xid or xid == default_xid: continue
kernelhtbs[xid]['usedbytes'], \
kernelhtbs[xid]['usedi2bytes'], \
live[xid]['_rspec'])
kernelhtbs[xid]['usedbytes'], \
kernelhtbs[xid]['usedi2bytes'], \
live[xid]['_rspec'])
logger.log("bwmon: Updating slice %s" % slice.name, 2)
# Update byte counts
slice.update(kernelhtbs[xid]['maxrate'], \
logger.log("bwmon: Updating slice %s" % slice.name, 2)
# Update byte counts
slice.update(kernelhtbs[xid]['maxrate'], \