blob: ee86055c1dfed052cab7466fbb3b916914654b49 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="color-scheme" content="dark light" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="en" />
<title>s6: the s6-softlimit program</title>
<meta name="Description" content="s6: the s6-softlimit program" />
<meta name="Keywords" content="s6 command s6-softlimit process limits" />
<!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> -->
</head>
<body>
<p>
<a href="index.html">s6</a><br />
<a href="//skarnet.org/software/">Software</a><br />
<a href="//skarnet.org/">skarnet.org</a>
</p>
<h1> The s6-softlimit program </h1>
<p>
s6-softlimit changes its process limits, then executes into another program.
</p>
<h2> Interface </h2>
<pre>
s6-softlimit [ -H | -h ] [ -a <em>allmem</em> ] [ -c <em>core</em> ] [ -d <em>data</em> ] [ -f <em>fsize</em> ] [ -l <em>lock</em> ] [ -m <em>mem</em> ] [ -o <em>ofiles</em> ] [ -P <em>prio</em> ] [ -p <em>proc</em> ] [ -r <em>res</em> ] [ -s <em>stack</em> ] [ -t <em>cpusecs</em> ] <em>prog...</em>
</pre>
<ul>
<li> s6-softlimit parses its options and sets process (soft) resource limits accordingly. </li>
<li> A value of '=' for any option means "set that limit to the hard limit". </li>
<li> Depending on your operating system, an option may do nothing. </li>
<li> When s6-softlimit has modified all the limits successfully, it executes into <em>prog...</em>. </li>
</ul>
<h2> Options </h2>
<h3> Hard limit options </h3>
<ul>
<li> <tt>-H</tt> : set the hard limit (as well as the soft limit). This is only usable by root
if you're raising the limit, and should generally <em>not</em> be used, except once at boot time.
The "hard limit" should be a system-wide setting that is never touched after being set once. </li>
<li> <tt>-h</tt> : set the hard limit, without touching the soft limit.
If you're lowering the hard limit to a value that's lower than the current soft limit, the soft limit
will be lowered to the new value of the hard limit. </li>
</ul>
<h3> Resource selection options </h3>
<ul>
<li> <tt>-a <em>allmem</em></tt> : limit the total available memory to <em>allmem</em> bytes. </li>
<li> <tt>-c <em>core</em></tt> : limit the core file size to <em>core</em> bytes. </li>
<li> <tt>-d <em>data</em></tt> : limit the available heap memory to <em>data</em> bytes. </li>
<li> <tt>-f <em>fsize</em></tt> : limit the file size to <em>fsize</em> bytes. </li>
<li> <tt>-l <em>lock</em></tt> : limit the available locked memory to <em>lock</em> bytes. </li>
<li> <tt>-m <em>mem</em></tt> : limit all types of memory to <em>mem</em> bytes. </li>
<li> <tt>-o <em>ofiles</em></tt> : limit the number of open fds to <em>ofiles</em>. </li>
<li> <tt>-P <em>prio</em></tt> : limit the real-time priority to <em>prio</em>. </li>
<li> <tt>-p <em>proc</em></tt> : limit the number of processes to <em>proc</em> (per user). </li>
<li> <tt>-r <em>res</em></tt> : limit the available physical memory to <em>res</em> bytes. </li>
<li> <tt>-s <em>stack</em></tt> : limit the available stack memory to <em>stack</em> bytes. </li>
<li> <tt>-t <em>cpusecs</em></tt> : limit the available CPU time to <em>cpusecs</em> seconds. </li>
</ul>
</body>
</html>
|