fix readme
This commit is contained in:
parent
a154ca038b
commit
f63cd1c8fc
@ -47,16 +47,18 @@ Also look at [Why are low memory conditions handled so badly?](https://www.reddi
|
|||||||
|
|
||||||
For basic usage:
|
For basic usage:
|
||||||
- `Linux` 3.14+ (since `MemAvailable` appeared in `/proc/meminfo`)
|
- `Linux` 3.14+ (since `MemAvailable` appeared in `/proc/meminfo`)
|
||||||
- `Linux` 4.20+ if you want to use `PSI`
|
|
||||||
- `Python` 3.3+ (not tested with previous)
|
- `Python` 3.3+ (not tested with previous)
|
||||||
|
|
||||||
To show GUI notifications:
|
To show GUI notifications:
|
||||||
- `libnotify` (Fedora, Arch Linux) or `libnotify-bin` (Debian GNU/Linux, Ubuntu)
|
- `libnotify` (Fedora, Arch Linux) or `libnotify-bin` (Debian GNU/Linux, Ubuntu)
|
||||||
- `sudo` if nohang started with UID=0
|
- `sudo` if nohang started with UID=0
|
||||||
|
|
||||||
|
To use `PSI` (pressure stall information):
|
||||||
|
- `Linux` 4.20+
|
||||||
|
|
||||||
## Memory and CPU usage
|
## Memory and CPU usage
|
||||||
|
|
||||||
- VmRSS is 10 — 14 MiB depending on the settings (about 10 MiB by default)
|
- VmRSS is 10 — 11 MiB depending on the settings
|
||||||
- CPU usage depends on the level of available memory (the frequency of memory status checks increases as the amount of available memory decreases) and monitoring intensity (can be changed by the user via the config)
|
- CPU usage depends on the level of available memory (the frequency of memory status checks increases as the amount of available memory decreases) and monitoring intensity (can be changed by the user via the config)
|
||||||
|
|
||||||
## Download, install, uninstall
|
## Download, install, uninstall
|
||||||
@ -119,8 +121,7 @@ The program can be configured by editing the [config file](https://github.com/ha
|
|||||||
6. GUI notifications:
|
6. GUI notifications:
|
||||||
- results of preventing OOM
|
- results of preventing OOM
|
||||||
- low memory warnings
|
- low memory warnings
|
||||||
7. Preventing the slowing down of the program
|
7. Output verbosity
|
||||||
8. Output verbosity
|
|
||||||
|
|
||||||
Just read the description of the parameters and edit the values. Please restart nohang to apply changes. Default path to the config after installing is `/etc/nohang/nohang.conf`.
|
Just read the description of the parameters and edit the values. Please restart nohang to apply changes. Default path to the config after installing is `/etc/nohang/nohang.conf`.
|
||||||
|
|
||||||
|
5
nohang
5
nohang
@ -16,9 +16,12 @@ from signal import SIGKILL, SIGTERM
|
|||||||
sig_dict = {SIGKILL: 'SIGKILL',
|
sig_dict = {SIGKILL: 'SIGKILL',
|
||||||
SIGTERM: 'SIGTERM'}
|
SIGTERM: 'SIGTERM'}
|
||||||
|
|
||||||
self_uid = os.geteuid()
|
|
||||||
self_pid = str(os.getpid())
|
self_pid = str(os.getpid())
|
||||||
|
|
||||||
|
self_uid = os.geteuid()
|
||||||
|
if self_uid == 0:
|
||||||
|
root = True
|
||||||
|
|
||||||
wait_time = 2
|
wait_time = 2
|
||||||
cache_time = 30
|
cache_time = 30
|
||||||
cache_path = '/dev/shm/nohang_env_cache'
|
cache_path = '/dev/shm/nohang_env_cache'
|
||||||
|
Loading…
Reference in New Issue
Block a user