fix a bug
This commit is contained in:
parent
9cdf370108
commit
3a85cda784
@ -69,9 +69,8 @@ To use `PSI` (pressure stall information):
|
|||||||
|
|
||||||
## Memory and CPU usage
|
## Memory and CPU usage
|
||||||
|
|
||||||
- VmRSS is about 10 MiB
|
- VmRSS is about 10 - 12 MiB instead of the settings, about 10 MiB by default.
|
||||||
- CPU usage depends on the level of available memory and monitoring intensity
|
- CPU usage depends on the level of available memory and monitoring intensity.
|
||||||

|
|
||||||
|
|
||||||
## Download, install, uninstall
|
## Download, install, uninstall
|
||||||
|
|
||||||
|
6
nohang
6
nohang
@ -898,9 +898,11 @@ def implement_corrective_action(signal):
|
|||||||
|
|
||||||
pid, victim_badness, name = find_victim()
|
pid, victim_badness, name = find_victim()
|
||||||
|
|
||||||
|
victim_info = find_victim_info(pid, victim_badness, name)
|
||||||
|
|
||||||
if victim_badness >= min_badness:
|
if victim_badness >= min_badness:
|
||||||
|
|
||||||
print(find_victim_info(pid, victim_badness, name))
|
print(victim_info)
|
||||||
|
|
||||||
# kill the victim if it doesn't respond to SIGTERM
|
# kill the victim if it doesn't respond to SIGTERM
|
||||||
if signal is SIGTERM:
|
if signal is SIGTERM:
|
||||||
@ -940,7 +942,7 @@ def implement_corrective_action(signal):
|
|||||||
etc_info = '{}' \
|
etc_info = '{}' \
|
||||||
'\nImplement a corrective action:\n Run the command: {}' \
|
'\nImplement a corrective action:\n Run the command: {}' \
|
||||||
'\n Exit status: {}; response time: {} ms'.format(
|
'\n Exit status: {}; response time: {} ms'.format(
|
||||||
victim_info, command.replace(
|
victim_info, command.replace( ############################### victim_info
|
||||||
'$PID', pid).replace('$NAME', pid_to_name(pid)), exit_status,
|
'$PID', pid).replace('$NAME', pid_to_name(pid)), exit_status,
|
||||||
round(response_time * 1000))
|
round(response_time * 1000))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user