Commit | Line | Data |
---|---|---|
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 | |
9 | prlimit \- 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 | |
27 | The | |
28 | .B prlimit | |
29 | program reads or sets resource limits on other processes (or itself, but | |
30 | that's not usually very useful). | |
31 | .PP | |
32 | The command-line options available are as follows. | |
33 | .TP | |
34 | .B "\-h, \-\-help" | |
35 | Write a full help message to standard output and exit with status zero. | |
36 | .TP | |
37 | .B "\-v, \-\-version" | |
38 | Write | |
39 | .BR prlimit 's | |
40 | version number to standard output and exit with status zero. | |
41 | .TP | |
42 | .B "\-u, \-\-usage" | |
43 | Write a short usage synopsis to standard output and exit with status | |
44 | zero. | |
45 | .TP | |
46 | .B "\-l, \-\-list" | |
47 | List the names of the recognized resource limits to standard output, one | |
48 | per line, and exit with status zero. | |
49 | .PP | |
50 | In the absence of any options, the command line arguments are | |
51 | processed. Each argument may be one of the following. | |
52 | .hP \*o | |
53 | A numeric | |
54 | .IR "process-id" . | |
55 | The | |
56 | .B prlimit | |
57 | program will read and/or set resource limits on the processes whose ids | |
58 | are listed on the command line. Process-ids can be interspersed with | |
59 | resource assignments and queries in any order: all of the assignments | |
60 | and queries are applied to all of the processes. | |
61 | .hP \*o | |
62 | A | |
63 | .I "resource assignment" | |
64 | of the form | |
65 | .IB resource = value \fR. | |
66 | Sets the resource limit for the named | |
67 | .I resource | |
68 | to | |
69 | .I value | |
70 | in each of the listed processes. The | |
71 | .I value | |
72 | may be | |
73 | .B inf | |
74 | to indicate that the named | |
75 | .I resource | |
76 | shouldn't be limited, or it may be a number optionally suffixed by one | |
77 | of | |
78 | .RB ` k ', | |
79 | .RB ` M ', | |
80 | .RB ` G ', | |
81 | or | |
82 | .RB ` T ' | |
83 | (case insensitive) to scale the value by successive powers of 1024. | |
84 | .PP | |
85 | .hP \*o | |
86 | A | |
87 | .I "resource query" | |
88 | of the form | |
89 | .IR resource . | |
90 | For each listed process, a line is printed to standard output with the | |
91 | following 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 | |
101 | showing the process's hard and soft limits in a form which can be passed | |
102 | back to | |
103 | .B prlimit | |
104 | later to restore the process's limits to their current values. The | |
105 | .I value | |
106 | is scaled and suffixed as described above if and only if this can be | |
107 | done without loss of precision. | |
108 | .RE | |
109 | .hP \*o | |
110 | One of the strings | |
111 | .BR hard , | |
112 | .BR soft , | |
113 | or | |
114 | .BR both . | |
115 | These control whether subsequent resource assignments affect processes' | |
116 | hard or soft limits: | |
117 | .B both | |
118 | means that both limits should be set to the same value. The default is | |
119 | to set both limits. | |
120 | .SH BUGS | |
121 | The | |
122 | .B prlimit | |
123 | program only works on Linux, because it depends on a Linux-specific | |
124 | system call to do its work. | |
125 | .SH SEE ALSO | |
126 | .BR prlimit (2). | |
127 | .SH AUTHOR | |
128 | Mark Wooding, <mdw@distorted.org.uk> |