2

Is there anything like renice for OOM adjust? That is, something that would allow a non-root user to increase (but not decrease) the OOM score adjust of processes they own?

Matthew Cline
  • 691
  • 2
  • 7
  • 19

2 Answers2

1

We have choom now.

tl;dr: choom --adjust -100 myprogram.

The man page has more information.

Frederick Nord
  • 254
  • 2
  • 7
0

There's not anything that does it as a program, but that's when scripting comes in, write a script that finds any PIDs started by their UID, then lets them pick the process, and echoes -1000 (for example) to /proc/<pid>/oom_score_adj.

You can then make it a root only executable, and allow sudo access to the people who need it.

NickW
  • 1,069
  • 5
  • 6
  • I'm already doing that. I'd like to move away from using hand-rolled scripts and sudo authorizations in favor of tools designed for what I want to do. – Matthew Cline Jun 05 '13 at 00:17
  • 1
    About all I can find is something like this.. https://github.com/solarkennedy/oom-tools/blob/master/oom-adjuster.conf it's just one step away from what we're talking about.. – NickW Jun 05 '13 at 08:19