fix readme

This commit is contained in:
Alexey Avramov 2018-12-16 02:39:16 +09:00
parent c0fd46440d
commit 911c9e905d
4 changed files with 12 additions and 9 deletions

View File

@ -50,7 +50,7 @@ For basic usage:
To show GUI notifications:
- `libnotify` (Fedora, Arch Linux) or `libnotify-bin` (Debian GNU/Linux, Ubuntu)
- `sudo` and `procps` if nohang is started as root
- `sudo` if nohang is with UID=0
## Memory and CPU usage

4
nohang
View File

@ -23,7 +23,7 @@ nc = nm + 1
self_uid = os.geteuid()
self_pid = str(os.getpid())
wait_time = 0.1
wait_time = 2
cache_time = 30
cache_path = '/dev/shm/nohang_env_cache'
@ -348,7 +348,7 @@ def send_notify(signal, name, pid):
Popen(['notify-send', '--icon=dialog-warning',
'{}'.format(title), '{}'.format(body)]).wait(wait_time)
except TimeoutExpired:
print('BAAAR')
print('TimeoutExpired: ' + 'notify send signal')
def send_notify_etc(pid, name, command):
"""

View File

@ -15,8 +15,11 @@
2. The frequency of checking the level of available memory
(and CPU usage)
3. The prevention of killing innocent victims
4. Impact on the badness of processes via matching their names,
cmdlines and UIDs with regular expressions
4. Impact on the badness of processes via matching their
- names,
- cmdlines and
- UIDs
with regular expressions
5. The execution of a specific command instead of sending the
SIGTERM signal
6. GUI notifications:
@ -292,7 +295,7 @@ niceness = -9
Valid values are integers from the range [-1000; 1000].
Setting the values to -1000 will prohibit suicide.
oom_score_adj = -50
oom_score_adj = -10
Read `man ionice` to understand the following parameters.
Setting the True value requires the root privileges.
@ -315,12 +318,12 @@ realtime_ionice_classdata = 4
print_config = False
Print memory check results or not print.
Print memory check results.
Valid values are True and False.
print_mem_check_results = False
Print sleep periods between memory checks or not print.
Print sleep periods between memory checks.
Valid values are True and False.
print_sleep_periods = False

View File

@ -14,7 +14,7 @@ from argparse import ArgumentParser
from os import listdir
from subprocess import Popen, TimeoutExpired
wait_time = 0.1
wait_time = 2
parser = ArgumentParser()