1 # SPDX-License-Identifier: LGPL-2.1-or-later
3 # This file is part of systemd.
5 # systemd is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation; either version 2.1 of the License, or
8 # (at your option) any later version.
11 Description=Userspace Out-Of-Memory (OOM) Killer
12 Documentation=man:systemd-oomd.service(8)
13 Documentation=man:org.freedesktop.oom1(5)
14 DefaultDependencies=no
15 Before=multi-user.target shutdown.target
16 Conflicts=shutdown.target
17 ConditionControlGroupController=v2
18 ConditionControlGroupController=memory
19 ConditionPathExists=/proc/pressure/cpu
20 ConditionPathExists=/proc/pressure/io
21 ConditionPathExists=/proc/pressure/memory
22 Requires=systemd-oomd.socket
23 After=systemd-oomd.socket
26 AmbientCapabilities=CAP_KILL CAP_DAC_OVERRIDE
27 BusName=org.freedesktop.oom1
28 CapabilityBoundingSet=CAP_KILL CAP_DAC_OVERRIDE
29 ExecStart={{ROOTLIBEXECDIR}}/systemd-oomd
32 MemoryDenyWriteExecute=yes
33 # Reserve some minimum amount of memory so that systemd-oomd can continue to
34 # run in resource starved scenarios.
45 ProtectKernelModules=yes
46 ProtectKernelTunables=yes
49 RestrictAddressFamilies=AF_UNIX
50 RestrictNamespaces=yes
53 SystemCallArchitectures=native
54 SystemCallErrorNumber=EPERM
55 SystemCallFilter=@system-service
61 WantedBy=multi-user.target
62 Alias=dbus-org.freedesktop.oom1.service