Lines Matching refs:pids
18 In order to use the `pids` controller, set the maximum number of tasks in
19 pids.max (this is not available in the root cgroup for obvious reasons). The
20 number of processes currently in the cgroup is given by pids.current.
23 to have pids.current > pids.max. This can be done by either setting the limit to
24 be smaller than pids.current, or attaching enough processes to the cgroup such
25 that pids.current > pids.max. However, it is not possible to violate a cgroup
29 To set a cgroup to have no limit, set pids.max to "max". This is the default for
33 pids.current tracks all child cgroup hierarchies, so parent/pids.current is a
34 superset of parent/child/pids.current.
39 First, we mount the pids controller:
40 # mkdir -p /sys/fs/cgroup/pids
41 # mount -t cgroup -o pids none /sys/fs/cgroup/pids
44 # mkdir -p /sys/fs/cgroup/pids/parent/child
45 # echo 2 > /sys/fs/cgroup/pids/parent/pids.max
46 # echo $$ > /sys/fs/cgroup/pids/parent/cgroup.procs
47 # cat /sys/fs/cgroup/pids/parent/pids.current
54 # cat /sys/fs/cgroup/pids/parent/pids.current
64 # echo $$ > /sys/fs/cgroup/pids/parent/child/cgroup.procs
65 # cat /sys/fs/cgroup/pids/parent/pids.current
67 # cat /sys/fs/cgroup/pids/parent/child/pids.current
69 # cat /sys/fs/cgroup/pids/parent/child/pids.max
75 We can set a limit that is smaller than pids.current, which will stop any new
77 pids.current):
79 # echo 1 > /sys/fs/cgroup/pids/parent/pids.max
82 # echo 0 > /sys/fs/cgroup/pids/parent/pids.max