Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config file hard to find, so do not know how to exclude app #240

Open
slrslr opened this issue Jan 31, 2021 · 6 comments
Open

Config file hard to find, so do not know how to exclude app #240

slrslr opened this issue Jan 31, 2021 · 6 comments

Comments

@slrslr
Copy link

slrslr commented Jan 31, 2021

Hello,

after installing earlyoom 1.6.2 on Manjaro (Arch based) Linux, i have enabled and started the service (systemctl enable earlyoom && systemctl start earlyoom).
It then killed some apps i have not wanted to be killed, so i was looking at "earlyoom --help" and a quick look on manual page.
I do not see how to exclude app. I do not know how regex should look like so i have tried: earlyoom --avoid appname
but that just launches the app, beside the already running earlyoom service(?).

Maybe it can be more intuitive if the command will write to the config file and report the result / or mention config file location on systemctl status and on the bottom of the manual page / relocate conf file to /etc/earlyoom.conf instead of /etc/default/earlyoom

Another whining of the noob would be about not seeing a GUI notification of killing the app, despite i have installed systembus-notify package on my XFCE Manjaro (Arch based) Linux. I have not started systembus-notify as i can not find the service) UPDATE: after reboot, i see it started showing the notifications. Would be nice if reboot not needed.

@jayenashar
Copy link

i believe the config file is distribution-dependent. i don't believe earlyoom supports a config file directly. so, your distribution's package maintainer probably has created /etc/default/earlyoom as well as the service (/etc/init.d/earlyoom on my distribution). you probably have better luck asking @mtorromeo

@mtorromeo
Copy link

The service arguments are defined in /etc/default/earlyoom just like @jayenashar guessed.

You will find the regular expression to edit for the avoid argument there. You then have to restart the service.

@mtorromeo
Copy link

Also systembus-notify should just autostart via the /etc/xdg/autostart/systembus-notify.desktop file (if you installed the package) but that might also depend on your desktop environment.

@hakavlad
Copy link
Contributor

hakavlad commented Feb 7, 2021

I do not know how regex should look

To decrease badness of the App (full matching with name):

--avoid "^App Name$"

To find names of running processes:

ps -eo pid,comm

Output like follow:

  PID COMMAND
    1 systemd
    2 kthreadd
    3 rcu_gp
    4 rcu_par_gp
    6 kworker/0:0H-kb
    8 mm_percpu_wq
...

COMMAND in this output is actually Name of the process.

Note that one App may start processes with various names. For example,

  • firefox is name of the main process;
  • Web Content, file:// Content, Privileged Cont are firefox children.

For example, prefer firefox tabs:

--prefer "^(Web Content|Privileged Cont|file:// Content)$"

@hakavlad
Copy link
Contributor

hakavlad commented Feb 7, 2021

The earlyoom configuration file in Fedora 32 looked like this:

EARLYOOM_ARGS="-r 0 -m 4 -M 409600 --prefer '^Web Content$' --avoid '^(dnf|packagekitd|gnome-shell|gnome-session-c|gnome-session-b|lightdm|sddm|sddm-helper|gdm|gdm-wayland-ses|gdm-session-wor|gdm-x-session|Xorg|Xwayland|systemd|systemd-logind|dbus-daemon|dbus-broker|cinnamon|cinnamon-sessio|kwin_x11|kwin_wayland|plasmashell|ksmserver|plasma_session|startplasma-way|xfce4-session|mate-session|marco|lxqt-session|openbox)$'"

This config provides protection of various important processes.

@arch-user-france1
Copy link

arch-user-france1 commented Aug 23, 2021

config file path is in the README / manual

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants