.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.11. .TH CGM "1" "August 2019" "cgm 0.29" "User Commands" .SH NAME cgm \- a client script for cgmanager .SH DESCRIPTION cgm is a client script to simplify making requests of the cgroup manager. It simply calls dbus\-send to send requests to the running cgmanager or cgproxy. .PP Usage: .PP cgm ping .PP cgm create .PP cgm chown uid gid .PP cgm chmod mode .PP cgm chmodfile file mode .PP cgm remove [0|1] .PP cgm getpidcgroup pid .PP cgm getpidcgroupabs pid .PP cgm movepid pid .PP cgm movepidabs pid .PP cgm getvalue file .PP cgm setvalue file value .PP cgm gettasks .PP cgm gettasksrecursive .PP cgm listchildren .PP cgm removeonempty .PP cgm prune .PP cgm listcontrollers .PP cgm listkeys .PP cgm apiversion .IP Replace '' with the desired controller, i.e. memory, and '' with the desired cgroup, i.e. x1. For create, chown, chmod, remove, prune, remove_on_empty, gettasksrecursive and movepid, may be "all" or a comma\-separated set of cgroups. Remove by default is recursive, but adding '0' as the last argument will perforn non\-recursive deletion. Adding '1' is supported for legacy reasons. .IP To refer to the current cgroup, use ''. .SH NOTES In order to protect the host from root in containers, cgmanager locks prevents tasks from administering cgroups which are not under their own. The exceptions are that root in a container may escape up to the cgroup of its cgproxy, and root on the host may escape to the root cgroup. This means that a user in freezer cgroup /foo cannot list cgroups in /. However, as root he can use movepidabs to escape to /, then list cgroups in /. .SH EXAMPLES .P To create a new cgroup called foo and move your shell into it, you could do: .P .br sudo cgm create all foo .br sudo cgm chown all foo $(id \-u) $(id \-g) .br cgm movepid all foo $$ .br .P Then to freeze that cgroup, .P .br cgm setvalue freezer foo freezer.state FROZEN .SH "SEE ALSO" cgmanager(8)