rctl.8 (a5615c90442b10b0d286b8fcf2cfdcc1c2958d58) rctl.8 (85a2f1b4f240d671dbc127daf344f75ca00cbe2e)
1.\"-
2.\" Copyright (c) 2009 Edward Tomasz Napierala
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24.\" POSSIBILITY OF SUCH DAMAGE.
25.\"
26.\" $FreeBSD$
27.\"
1.\"-
2.\" Copyright (c) 2009 Edward Tomasz Napierala
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24.\" POSSIBILITY OF SUCH DAMAGE.
25.\"
26.\" $FreeBSD$
27.\"
28.Dd May 26, 2011
28.Dd July 14, 2011
29.Dt RCTL 8
30.Os
31.Sh NAME
32.Nm rctl
33.Nd display and update resource limits database
34.Sh SYNOPSIS
35.Nm
36.Op Fl h

--- 79 unchanged lines hidden (view full) ---

116A filter is a rule for which one of more fields other than per is left empty.
117For example, a filter that matches every rule could be written as ":::=/",
118or, in short, ":".
119A filter that matches all the login classes would be "loginclass:".
120A filter that matches all defined rules for nproc resource would be
121"::nproc".
122.Pp
123.Sh RESOURCES
29.Dt RCTL 8
30.Os
31.Sh NAME
32.Nm rctl
33.Nd display and update resource limits database
34.Sh SYNOPSIS
35.Nm
36.Op Fl h

--- 79 unchanged lines hidden (view full) ---

116A filter is a rule for which one of more fields other than per is left empty.
117For example, a filter that matches every rule could be written as ":::=/",
118or, in short, ":".
119A filter that matches all the login classes would be "loginclass:".
120A filter that matches all defined rules for nproc resource would be
121"::nproc".
122.Pp
123.Sh RESOURCES
124.Bl -column -offset 3n "msgqqueued"
125.It cpu CPU time, in milliseconds
126.It data data size, in bytes
127.It stack stack size, in bytes
128.It core core dump size, in bytes
129.It rss resident set size, in bytes
130.It memlock locked memory, in bytes
131.It nproc number of processes
132.It nofile file descriptor table size
133.It vmem address space limit, in bytes
134.It npts number of PTYs
135.It swap swap usage, in bytes
136.It nthr number of threads
137.It msgqqueued number of queued SysV messages
138.It msgqsize SysV message queue size, in bytes
139.It nmsgq number of SysV message queues
140.It nsem number of SysV semaphores
141.It nsemop number of SysV semaphores modified in a single semop(2) call
142.It nshm number of SysV shared memory segments
143.It shmsize SysV shared memory size, in bytes
144.It wallclock wallclock time, in milliseconds
145.It pctcpu %cpu time
124.Bl -column -offset 3n "pseudoterminals"
125.It cputime CPU time, in seconds
126.It datasize data size, in bytes
127.It stacksize stack size, in bytes
128.It coredumpsize core dump size, in bytes
129.It memoryuse resident set size, in bytes
130.It memorylocked locked memory, in bytes
131.It maxproc number of processes
132.It openfiles file descriptor table size
133.It vmemoryuse address space limit, in bytes
134.It pseudoterminals number of PTYs
135.It swapuse swap usage, in bytes
136.It nthr number of threads
137.It msgqqueued number of queued SysV messages
138.It msgqsize SysV message queue size, in bytes
139.It nmsgq number of SysV message queues
140.It nsem number of SysV semaphores
141.It nsemop number of SysV semaphores modified in a single semop(2) call
142.It nshm number of SysV shared memory segments
143.It shmsize SysV shared memory size, in bytes
144.It wallclock wallclock time, in seconds
146.El
147.Pp
148.Sh ACTIONS
145.El
146.Pp
147.Sh ACTIONS
149.Bl -column -offset 3n "msgqqueued"
148.Bl -column -offset 3n "pseudoterminals"
150.It deny deny the allocation; not supported for cpu and wallclock
151.It log log a warning to the console
152.It devctl send notification to
153.Xr devd 8
154.It sig* e.g. sigterm; send a signal to the offending process
155.El
156.Pp
157See

--- 4 unchanged lines hidden (view full) ---

162Attempt to add rule with action not supported by a given resouce will result
163in error.
164.Pp
165Note that limiting RSS may kill the machine due to thrashing.
166.Pp
167.Sh EXIT STATUS
168.Ex -std
169.Sh EXAMPLES
149.It deny deny the allocation; not supported for cpu and wallclock
150.It log log a warning to the console
151.It devctl send notification to
152.Xr devd 8
153.It sig* e.g. sigterm; send a signal to the offending process
154.El
155.Pp
156See

--- 4 unchanged lines hidden (view full) ---

161Attempt to add rule with action not supported by a given resouce will result
162in error.
163.Pp
164Note that limiting RSS may kill the machine due to thrashing.
165.Pp
166.Sh EXIT STATUS
167.Ex -std
168.Sh EXAMPLES
170.Dl rctl -a user:joe:vmem:deny=1g
169.Dl rctl -a user:joe:vmemoryuse:deny=1g
171.Pp
172Prevent user "joe" from allocating more than 1GB of virtual memory.
173.Pp
174.Dl rctl -r :
175.Pp
176Remove all RCTL rules.
177.Pp
178.Dl rctl -hu jail:www

--- 21 unchanged lines hidden ---
170.Pp
171Prevent user "joe" from allocating more than 1GB of virtual memory.
172.Pp
173.Dl rctl -r :
174.Pp
175Remove all RCTL rules.
176.Pp
177.Dl rctl -hu jail:www

--- 21 unchanged lines hidden ---