summaryrefslogtreecommitdiffstats
path: root/sys-utils/prlimit.1
diff options
context:
space:
mode:
authorBernhard Voelker2011-11-16 17:57:27 +0100
committerKarel Zak2011-11-23 12:11:46 +0100
commit53e1f461f9a86a4c979b2bd719b8ccd1b608980e (patch)
treebf5b04393c77b622a8a64fd3cf5455f5d283502a /sys-utils/prlimit.1
parentlibblkid: fix mac partition detection (diff)
downloadkernel-qcow2-util-linux-53e1f461f9a86a4c979b2bd719b8ccd1b608980e.tar.gz
kernel-qcow2-util-linux-53e1f461f9a86a4c979b2bd719b8ccd1b608980e.tar.xz
kernel-qcow2-util-linux-53e1f461f9a86a4c979b2bd719b8ccd1b608980e.zip
prlimit: add support for executing a command
prlimit.c: Alternatively to applying the limits to an existing process via the --pid option, allow a command to be executed. Adapted usage() accordingly. prlimit.1: mention new syntax. Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
Diffstat (limited to 'sys-utils/prlimit.1')
-rw-r--r--sys-utils/prlimit.114
1 files changed, 13 insertions, 1 deletions
diff --git a/sys-utils/prlimit.1 b/sys-utils/prlimit.1
index cc40ac4bf..6b912144c 100644
--- a/sys-utils/prlimit.1
+++ b/sys-utils/prlimit.1
@@ -9,12 +9,22 @@ get and set a process resource limits.
.SH SYNOPSIS
.B prlimit
.RB [options]
-.RB [ \-\-{resource_name}[=limits] ]
+.RB [ \-\-{resource_name}[=limits]
+.RB [ \-\-pid\ PID]
+
+.B prlimit
+.RB [options]
+.RB [ \-\-{resource_name}[=limits]]
+.RB "command " [ argument ...]
.SH DESCRIPTION
Given a process id and one or more resources, \fBprlimit\fP tries to retrieve
and/or modify the limits.
+When \fIcommand\fR is given,
+.B prlimit
+will run this command with the given arguments.
+
The \fIlimits\fP format is composed by a soft and a hard (ceiling) value, separated
by a semicolon (:), in order to modify the existing value(s). If no limits are
used, \fBprlimit\fP will only display the current values. If one of the values
@@ -92,6 +102,8 @@ of open files to 1024 and 4095, respectively.
Modify only the soft limit for the amount of processes.
.IP "\fBprlimit \-\-pid $$ --nproc=unlimited\fP"
Set the amount of processes for both soft and ceiling values to unlimited.
+.IP "\fBprlimit --cpu=10 sort -u hugefile\fP"
+Set the soft and hard CPU time limit and run 'sort'.
.SH "SEE ALSO"
.BR prlimit (2),