Remove transient control groups

To remove transient control groups (cgroups) when they are no longer needed, use the systemd system and service manager.

About this task

Transient cgroups are automatically released when all the processes that a service or a scope unit contains finish.

Procedure

  • To stop the service unit with all its processes, enter:
    # systemctl stop <name>.service
  • To terminate one or more of the unit processes, enter:
    # systemctl kill <name>.service --kill-who=PID,…​ --signal=<signal>

    The command uses the --kill-who option to select process(es) from the control group you want to terminate. To kill multiple processes at the same time, pass a comma-separated list of PIDs. The --signal option determines the type of POSIX signal to be sent to the specified processes. The default signal is SIGTERM.