Skip to content
Gerardwx edited this page Oct 24, 2023 · 4 revisions

From http://man7.org/linux/man-pages/man5/proc.5.html :

   Mount options
       The proc filesystem supports the following mount options:

       hidepid=n (since Linux 3.3)
              This option controls who can access the information in
              /proc/[pid] directories.

If you use hidepid=1 or hidepid=2 for your /proc filesystem, earlyoom running as a normal user can no longer see (hidepid=2) or look at the memory usage (hidepid=1) of running processes.

To make it work, you can either run earlyoom as root, or do this (from https://github.com/rfjakob/earlyoom/issues/161):

Mount proc with hidepid=2,gid=adm and set SupplementaryGroups=adm in the unit, and it works well with systemd 232.

To override the default settings, create file /etc/systemd/system/earlyoom.service.d/override.conf and change service. For example, to run as root, override.conf should contain:

[Service]
DynamicUser=false
Clone this wiki locally