housekeeping: Add systemd OOM notification module#454
Open
Fantu wants to merge 1 commit into
Open
Conversation
Notify the user when systemd kills a unit (scope/service) due to an
out-of-memory event. The notification reports the application name when
the desktop entry can be resolved from the cgroup unit name, with a
generic fallback for virtual terminals and unknown units.
Note that we only notify if a unit (scope/service) is actually stopped
due to OOM. This will not catch certain other cases where e.g. a
delegated cgroup receives an OOM event.
Ported from gnome-settings-daemon, squashing the following upstream
commits:
d1fe7167 housekeeping: Add systemd OOM notification module
fb4edd88 housekeeping: fix capitalization of systemd notifications
e6c41410 Use the proper hint for setting images for notifications
dfb7aeab housekeeping: Fix wording in the OOM kill message
79d4fc90 housekeeping: Fix systemd OOM notifications
(call org.freedesktop.systemd1.Manager.Subscribe so that
PropertiesChanged signals are actually emitted)
Adaptations vs. upstream:
- Renamed symbols/files to the cinnamon-settings-daemon prefixes
(gsd -> csd, Gsd -> Csd, GSD -> CSD).
- The new CsdSystemdNotify instance is held in the private struct
CsdHousekeepingManagerPrivate, since CsdHousekeepingManager still
uses g_type_class_add_private rather than inline struct fields like
the upstream GsdHousekeepingManager.
Contributor
Author
|
I think is useful for users that want use systemd-oomd and for distro that use it by default like Fedora and Ubuntu. I haven't tested it yet, and I probably won't have time to do so until next weekend. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Notify the user when systemd kills a unit (scope/service) due to an out-of-memory event. The notification reports the application name when the desktop entry can be resolved from the cgroup unit name, with a generic fallback for virtual terminals and unknown units.
Note that we only notify if a unit (scope/service) is actually stopped due to OOM. This will not catch certain other cases where e.g. a delegated cgroup receives an OOM event.
Ported from gnome-settings-daemon, squashing the following upstream commits:
d1fe7167 housekeeping: Add systemd OOM notification module
fb4edd88 housekeeping: fix capitalization of systemd notifications
e6c41410 Use the proper hint for setting images for notifications
dfb7aeab housekeeping: Fix wording in the OOM kill message
79d4fc90 housekeeping: Fix systemd OOM notifications
(call org.freedesktop.systemd1.Manager.Subscribe so that
PropertiesChanged signals are actually emitted)
Adaptations vs. upstream: