Skip to content

Commit

Permalink
MANPAGE: explain that regexes match against /proc/pid/comm
Browse files Browse the repository at this point in the history
Fixes #311
  • Loading branch information
rfjakob committed Apr 7, 2024
1 parent 93b947a commit c2be924
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions MANPAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,23 @@ Be sure to check how your environment behaves beforehand. Use
to show all processes with the PGID in brackets.

#### \-\-prefer REGEX
prefer killing processes matching REGEX (adds 300 to oom_score)
Prefer killing processes whose `comm` name matches REGEX (adds 300 to oom_score).

The `comm` name is the string in `/proc/pid/comm`. It is the first 15 bytes of the
process name. Longer names are truncated to 15 bytes.

The `comm` name is also what `top`, `pstree`, `ps -e` show. Use any of these tools
to find the proper `comm` name.

Example: You want to match `gnome-control-center`, which is longer than 15 bytes:

earlyoom --prefer '^gnome-control-c$'

#### \-\-avoid REGEX
avoid killing processes matching REGEX (subtracts 300 from oom_score)
avoid killing processes whose `comm` name matches REGEX (subtracts 300 from oom_score).

#### \-\-ignore REGEX
ignore processes matching REGEX.
ignore processes whose `comm` name matches REGEX.

Unlike the \-\-avoid option, this option disables any potential killing of the matched processes
that might have occurred due to the processes attaining a high oom_score.
Expand Down

0 comments on commit c2be924

Please sign in to comment.