You are not logged in.

#1 2021-06-18 22:48:21

icar
Member
Registered: 2020-07-31
Posts: 562

Get a notification when systemd-oomd kills a process

I'd like to imitate what earlyoom does: generate a desktop notification when a process is killed by the OOM service.
For example, https://imgur.com/a/mWy6ApL

I've looked into systemd-oomd manual and searched a bit with no luck. I honestly have no idea where to begin.

Is it possible somehow? What would be the best way to approach this?

Offline

#2 2021-06-18 23:30:59

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: Get a notification when systemd-oomd kills a process

There is only journal and debug output for now. Fedora lists a point about improving user feedback here: https://fedoraproject.org/wiki/Changes/ … ystemdOomd
(Maybe you could follow/parse the journal as an interim solution)

Last edited by progandy (2021-06-18 23:31:55)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#3 2021-06-18 23:44:03

icar
Member
Registered: 2020-07-31
Posts: 562

Re: Get a notification when systemd-oomd kills a process

Parsing the journal all the time for such an unusual event seems overkill.
I was hoping for some kind of dbus approach, but seeing that it's not implemented and the maintainers don't have near plans to implement this (as read in the link you provided), I'll let it be for the time being.

Offline

Board footer

Powered by FluxBB