mtimeout.1: Use correct dash for number ranges.
[misc] / mprlimit.1
CommitLineData
2e169b7e
MW
1.ie t .ds o \(bu
2.el .ds o o
3.de hP
4.IP
5\h'-\w'\fB\\$1\ \fP'u'\fB\\$1\ \fP\c
6..
7.TH "prlimit" 1 "1 September 2011" "Mark Wooding" "Toys"
8.SH NAME
9prlimit \- read and set processes' resource limits
10.SH SYNOPSIS
11.B prlimit
12.B \-l
13.br
14.B prlimit
15{
16.B soft
17|
18.B hard
19|
20.B both
21|
22.IR resource [ \fB= value ]
23|
24.I pid
25} ...
26.SH DESCRIPTION
27The
28.B prlimit
29program reads or sets resource limits on other processes (or itself, but
30that's not usually very useful).
31.PP
32The command-line options available are as follows.
33.TP
34.B "\-h, \-\-help"
35Write a full help message to standard output and exit with status zero.
36.TP
37.B "\-v, \-\-version"
38Write
39.BR prlimit 's
40version number to standard output and exit with status zero.
41.TP
42.B "\-u, \-\-usage"
43Write a short usage synopsis to standard output and exit with status
44zero.
45.TP
46.B "\-l, \-\-list"
47List the names of the recognized resource limits to standard output, one
48per line, and exit with status zero.
49.PP
50In the absence of any options, the command line arguments are
51processed. Each argument may be one of the following.
52.hP \*o
53A numeric
54.IR "process-id" .
55The
56.B prlimit
57program will read and/or set resource limits on the processes whose ids
58are listed on the command line. Process-ids can be interspersed with
59resource assignments and queries in any order: all of the assignments
60and queries are applied to all of the processes.
61.hP \*o
62A
63.I "resource assignment"
64of the form
65.IB resource = value \fR.
66Sets the resource limit for the named
67.I resource
68to
69.I value
70in each of the listed processes. The
71.I value
72may be
73.B inf
74to indicate that the named
75.I resource
76shouldn't be limited, or it may be a number optionally suffixed by one
77of
78.RB ` k ',
79.RB ` M ',
80.RB ` G ',
81or
82.RB ` T '
83(case insensitive) to scale the value by successive powers of 1024.
84.PP
85.hP \*o
86A
87.I "resource query"
88of the form
89.IR resource .
90For each listed process, a line is printed to standard output with the
91following form.
92.RS
93.PP
94\h'4n'\c
95.I pid
96.B soft
97.IB resource = soft-limit
98.B hard
99.IB resource = hard-limit
100.PP
101showing the process's hard and soft limits in a form which can be passed
102back to
103.B prlimit
104later to restore the process's limits to their current values. The
105.I value
106is scaled and suffixed as described above if and only if this can be
107done without loss of precision.
108.RE
109.hP \*o
110One of the strings
111.BR hard ,
112.BR soft ,
113or
114.BR both .
115These control whether subsequent resource assignments affect processes'
116hard or soft limits:
117.B both
118means that both limits should be set to the same value. The default is
119to set both limits.
120.SH BUGS
121The
122.B prlimit
123program only works on Linux, because it depends on a Linux-specific
124system call to do its work.
125.SH SEE ALSO
126.BR prlimit (2).
127.SH AUTHOR
128Mark Wooding, <mdw@distorted.org.uk>