fix a bug

This commit is contained in:
Alexey Avramov 2019-02-28 23:46:01 +09:00
parent 9cdf370108
commit 3a85cda784
2 changed files with 6 additions and 5 deletions

View File

@ -69,9 +69,8 @@ To use `PSI` (pressure stall information):
## Memory and CPU usage
- VmRSS is about 10 MiB
- CPU usage depends on the level of available memory and monitoring intensity
![pic](https://i.imgur.com/OWjTrTa.png)
- 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.
## Download, install, uninstall

6
nohang
View File

@ -898,9 +898,11 @@ def implement_corrective_action(signal):
pid, victim_badness, name = find_victim()
victim_info = find_victim_info(pid, victim_badness, name)
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
if signal is SIGTERM:
@ -940,7 +942,7 @@ def implement_corrective_action(signal):
etc_info = '{}' \
'\nImplement a corrective action:\n Run the command: {}' \
'\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,
round(response_time * 1000))