Is there a way to be notified of oomd getting ready to kill things before it does it?

I went looking and found psi-notify which seems to be exactly what I’m looking for.

Available in the repos:

So that answers part 2, still looking for an answer for question 1.

I also saw that one can modify oomd settings to prevent certain cgroups/slices from being killed:

https://fedoraproject.org/wiki/Changes/EnableSystemdOomd#How_to_test

systemd-cgls shows me that gnome-terminal has a slice for it, so I’ll try tweaking the settings for it so that oomd “avoids” killing it.

3 Likes