-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to get warning notifications #100
Comments
This is the problem. Warnings happens if both MemAvailable and SwapFree thresholds are exceeded. |
If you set warning_threshold_min_swap = 100 % |
Now it works. This is a really yummy software if you get it working. I hate that I chosen a laptop with 16 GB RAM to avoid running out of RAM and I can still freeze the machine with ease. Kernel OOM is a joke, it is not worth anything for an average user. I am not against software with minimal documentation, but there were two things why I bang my head to the wall after some time:
"If you set warning_threshold_min_swap = 100 % You should add some additional comment to the config file to highlight the logic between these conditions since it is quite black box now. Otherwise you can close this issue. |
An additional comment. I don't know how much my use case is unique, but I prefer to kill sacrificable applications (e.g. code editors, chrome instances) on time to avoid any longer freezing. The swap level does not mean too much in my case because the normal RAM gets full suddenly and I don't want to wait for 10-60 minutes to get back my computer. I follow the RAM usage on my panel in KDE, but I still can get unwanted freezes time-to-time. So it can be a quite common use case when people want early intervention with this daemon and having the killing decisions based on purely the actual remaining RAM. Now I have these min_swap options raised to 100 % for all warning/soft/hard thresholds and it works nicely. The RAM trigger levels are 20-15-10 %. Maybe that is the problem of the user in #98, the expectations were earlier kickin. |
Thanks for the feedback! I know the documentation is terrible.
This is described in the second line of the config:
Is this not enough? |
It is enough, but 9x % of the users will not read it, including me. When the config file is opened, the numbered list of options is eye-catching and the attention quickly shifts to the individual options inside the file to crunch them. The first lines are missed. I am not aware of any Linux daemon which uses white space as comment in the config file inside /etc, but I remember config files with white spaces before the options and they are omitted. Average Linux user speaks from inside, I expect what is the de-facto standard for config files on Linux. If you want to stick to your custom format, put some "WARNING !!!" before and after the explanation in the header to catch the attention. |
e6f5363 Done. |
PSI can help you. It can allow you to use swap space if swapping is not too aggressive, but the offender will be terminated if swapping will be to aggressive and prolonged (aggressiveness and duration can be adjusted). Of course, the settings you use with the prohibition of swapping are much more aggressive. PSI can help you to suppress only pathological swapping, and let you to use swapping if it is not pathological. |
I will use PSI once I switch to Ubuntu 20.04 later. If you add something additional info about the trigger logic to the "4. Warnings and notifications", this issue can be closed. |
Thanks, I had installed nohang a while ago and tried getting notifications working and read through the readme a few times too but gave up, and only many months later, today, did I give it another try. I edited I think it would be good to put this as a troubleshooting step in the notifications section on the README, I can make a PR if you like. So thank you for this tip!! If you throw a Sponsor link up on the repo I'd be happy to throw in some cash, this project has saved me real time in my life and I really appreciate it! |
The warning system only works with local users right? What about a warning system using |
@alexmyczko See
However, this only works for hard threshold. For soft threshold:
This command will be executed instead of sending SIGTERM. |
I set in nohang-desktop.conf:
Warnings enabled:
Restarting the daemon:
Pushing the system below this threshold:
...and nothing happens. No desktop notification or indication in the log. I tried to set warning_exe in the config, but it does not change anything.
The text was updated successfully, but these errors were encountered: