From 53e1f461f9a86a4c979b2bd719b8ccd1b608980e Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Wed, 16 Nov 2011 17:57:27 +0100 Subject: 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 --- sys-utils/prlimit.1 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'sys-utils/prlimit.1') 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), -- cgit v1.2.3-55-g7522