rfjakob / earlyoom

earlyoom - Early OOM Daemon for Linux
MIT License
2.96k stars 157 forks source link

add --prefer-only option to only kill processes matching --prefer #310

Open chombourger opened 8 months ago

chombourger commented 8 months ago

While --avoid exists to list processes that should not be killed, it may be desirable to have earlyoom simply ignore any processes that do not match the regex specified in --prefer. It should be noted that the Linux kernel may still opt to kill other processes if earlyoom did not free up enough memory to prevent an oom.

rfjakob commented 7 months ago

Looks good, please rename the flag to --only.