ntp.service
2202 /usr/sbin/ntpd -p /var/run/ntp/ntpd.pid -g -u ntp:ntp -c
/etc/ntp.conf
sshd.service
1743 /usr/sbin/sshd -D
See Chapter 10, Kernel Control Groups (↑System Analysis and Tuning Guide) for more
information about cgroups.
8.3.4 Killing Services (Sending Signals)
As explained in Section 8.3.3, “Kernel Control Groups (cgroups)” (page 151), it is not
always possible to assign a process to its parent service process in a SysV init system.
This makes it difcult to terminate a service and all of its children. Child processes that
have not been killed will remain as zombie processes.
systemd's concept of to conne each service into a cgroup makes it possible to
clearly identify all child processes of a service and therefore allows to send a signal to
each of these processes. Use systemctl kill to send signals to services. For a list
of available signals refer to man 7 signals.
Sending SIGTERM to a Service
SIGTERM is the default signal that is sent.
systemctl kill <my_service>.service
Sending SIGNAL to a Service
Use the -s option to specify the signal that should be sent.
systemctl kill -s SIGNAL <my_service>.service
Selecting Processes
By default the kill command send the signal to all processes of the specied
cgroup. You can restrict it to the control or the main process. The latter is for
example useful to force a service to reload its conguration by sending SIGHUP:
systemctl kill -s SIGHUP --kill-who=main <my_service>.service
152 Reference