fix find_victim
This commit is contained in:
parent
ada48978c2
commit
020bdf3f09
22
nohang
22
nohang
@ -734,11 +734,33 @@ def find_victim_and_send_signal(signal):
|
|||||||
response_time = time() - time0
|
response_time = time() - time0
|
||||||
send_result = 'no such process; response time: {} ms'.format(
|
send_result = 'no such process; response time: {} ms'.format(
|
||||||
round(response_time * 1000))
|
round(response_time * 1000))
|
||||||
|
|
||||||
|
# update stat_dict
|
||||||
|
key = 'The victim died in the search process'
|
||||||
|
if key not in stat_dict:
|
||||||
|
stat_dict.update({key: 1})
|
||||||
|
else:
|
||||||
|
new_value = stat_dict[key] + 1
|
||||||
|
stat_dict.update({key: new_value})
|
||||||
|
|
||||||
except ProcessLookupError:
|
except ProcessLookupError:
|
||||||
response_time = time() - time0
|
response_time = time() - time0
|
||||||
send_result = 'no such process; response time: {} ms'.format(
|
send_result = 'no such process; response time: {} ms'.format(
|
||||||
round(response_time * 1000))
|
round(response_time * 1000))
|
||||||
|
|
||||||
|
|
||||||
|
# update stat_dict
|
||||||
|
key = 'The victim died in the search process'
|
||||||
|
if key not in stat_dict:
|
||||||
|
stat_dict.update({key: 1})
|
||||||
|
else:
|
||||||
|
new_value = stat_dict[key] + 1
|
||||||
|
stat_dict.update({key: new_value})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
preventing_oom_message = '{}' \
|
preventing_oom_message = '{}' \
|
||||||
'\n\033[4mImplement a corrective action:\033[0m\n ' \
|
'\n\033[4mImplement a corrective action:\033[0m\n ' \
|
||||||
'Sending \033[4m{}\033[0m to the victim; {}'.format(
|
'Sending \033[4m{}\033[0m to the victim; {}'.format(
|
||||||
|
Loading…
Reference in New Issue
Block a user