Is there any available software which can be used to set the /proc/<pid>/oom_score_adj of processes after they're created, based upon the executable name and the user/group?

  • 1
    stackoverflow.com/a/8255487/512360 gives an answer how you can be notified on "events in /proc" (including process creation). To my knowledge, there's not ready-made daemon that'll then try post-event to change the OOM score adjustment.
    – FrankH.
    Oct 17 '13 at 15:20

I have created an utility that does it solely based on the executable name, in addition to setting the CPU and I/O priority: https://git.janouch.name/p/desktop-tools/src/branch/master/priod.c

It can be installed with the parent package as per its README. Just copy the example configuration to /etc/priod.conf, change it according to your needs and enable the systemd unit, and it should work. Note that it goes through already existing processes on startup, too.

I hope it will help someone, at least as an example.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.