Debugging overload detection
This commit is contained in:
parent
ce9fe7960a
commit
da5618297b
@ -212,9 +212,12 @@ def execute(config, state):
|
||||
"""
|
||||
path = common.build_local_vm_path(config['local_data_directory'])
|
||||
vm_cpu_mhz = get_local_data(path)
|
||||
log.debug('vm_cpu_mhz: ' + str(vm_cpu_mhz))
|
||||
vm_ram = get_ram(state['vir_connection'], vm_cpu_mhz.keys())
|
||||
log.debug('vm_ram: ' + str(vm_ram))
|
||||
vm_cpu_mhz = cleanup_vm_data(vm_cpu_mhz, vm_ram.keys())
|
||||
|
||||
log.debug('vm_cpu_mhz updated: ' + str(vm_cpu_mhz))
|
||||
|
||||
if not vm_cpu_mhz:
|
||||
if log.isEnabledFor(logging.INFO):
|
||||
log.info('The host is idle')
|
||||
@ -223,6 +226,8 @@ def execute(config, state):
|
||||
host_cpu_utilization = vm_mhz_to_percentage(
|
||||
vm_cpu_mhz,
|
||||
state['physical_cpu_mhz_total'])
|
||||
log.debug('state[physical_cpu_mhz_total]: ' + str(state['physical_cpu_mhz_total']))
|
||||
log.debug('host_cpu_utilization: ' + str(host_cpu_utilization))
|
||||
time_step = int(config['data_collector_interval'])
|
||||
migration_time = common.calculate_migration_time(
|
||||
vm_ram, float(config['network_migration_bandwidth']))
|
||||
|
@ -75,9 +75,6 @@ def threshold(threshold, utilization):
|
||||
:return: The decision of the algorithm.
|
||||
:rtype: bool
|
||||
"""
|
||||
log.debug(str(utilization))
|
||||
if utilization:
|
||||
log.debug('utilization[-1] = ' + str(utilization[-1]))
|
||||
log.debug('threshold = ' + str(threshold))
|
||||
return utilization[-1] > threshold
|
||||
return False
|
||||
|
Loading…
x
Reference in New Issue
Block a user