Lines Matching refs:pids
19 In order to use the `pids` controller, set the maximum number of tasks in
20 pids.max (this is not available in the root cgroup for obvious reasons). The
21 number of processes currently in the cgroup is given by pids.current.
24 to have pids.current > pids.max. This can be done by either setting the limit to
25 be smaller than pids.current, or attaching enough processes to the cgroup such
26 that pids.current > pids.max. However, it is not possible to violate a cgroup
30 To set a cgroup to have no limit, set pids.max to "max". This is the default for
34 pids.current tracks all child cgroup hierarchies, so parent/pids.current is a
35 superset of parent/child/pids.current.
37 The pids.events file contains event counters:
44 First, we mount the pids controller::
46 # mkdir -p /sys/fs/cgroup/pids
47 # mount -t cgroup -o pids none /sys/fs/cgroup/pids
51 # mkdir -p /sys/fs/cgroup/pids/parent/child
52 # echo 2 > /sys/fs/cgroup/pids/parent/pids.max
53 # echo $$ > /sys/fs/cgroup/pids/parent/cgroup.procs
54 # cat /sys/fs/cgroup/pids/parent/pids.current
61 # cat /sys/fs/cgroup/pids/parent/pids.current
71 # echo $$ > /sys/fs/cgroup/pids/parent/child/cgroup.procs
72 # cat /sys/fs/cgroup/pids/parent/pids.current
74 # cat /sys/fs/cgroup/pids/parent/child/pids.current
76 # cat /sys/fs/cgroup/pids/parent/child/pids.max
82 We can set a limit that is smaller than pids.current, which will stop any new
84 pids.current)::
86 # echo 1 > /sys/fs/cgroup/pids/parent/pids.max
89 # echo 0 > /sys/fs/cgroup/pids/parent/pids.max