summaryrefslogtreecommitdiffstats
path: root/sys-utils/prlimit.1
diff options
context:
space:
mode:
authorDavidlohr Bueso2011-10-19 22:02:35 +0200
committerKarel Zak2011-10-21 23:19:51 +0200
commit6bac2825af7216c5471148e219dbcf62ec5ede84 (patch)
tree61f329f0fe199c861dddcef25603c49d9a5f63df /sys-utils/prlimit.1
parentblkid: print ID_PART_ENTRY_* for small devices (diff)
downloadkernel-qcow2-util-linux-6bac2825af7216c5471148e219dbcf62ec5ede84.tar.gz
kernel-qcow2-util-linux-6bac2825af7216c5471148e219dbcf62ec5ede84.tar.xz
kernel-qcow2-util-linux-6bac2825af7216c5471148e219dbcf62ec5ede84.zip
prlimit: new command
This program uses the prlimit() system call to get and/or set resource limits for a given process. [kzak@redhat,com: - improve <soft:hard> parsing, - use short cmdline options compatible with ulimits - add --verbose mode - fix gcc warnings] Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/prlimit.1')
-rw-r--r--sys-utils/prlimit.1108
1 files changed, 108 insertions, 0 deletions
diff --git a/sys-utils/prlimit.1 b/sys-utils/prlimit.1
new file mode 100644
index 000000000..5c2001200
--- /dev/null
+++ b/sys-utils/prlimit.1
@@ -0,0 +1,108 @@
+.\" prlimit.1 --
+.\" Copyright 2011 Davidlohr Bueso <dave@gnu.org>
+.\" May be distributed under the GNU General Public License
+
+.TH PRLIMIT 1 "October 2011" "util-linux" "User Commands"
+.SH NAME
+prlimit \-
+get and set a process resource limits.
+.SH SYNOPSIS
+.B prlimit
+.RB [options]
+.RB [ \-\-{resource_name}[=limits] ]
+
+.SH DESCRIPTION
+Given a process id and one or more resources, \fBprlimit\fP tries to retrieve
+and/or modify the limits.
+
+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
+is not used, then the existing one will be used. To specify the unlimited or
+infinity limit (RLIM_INFINITY), the -1 or 'unlimited' string can be passed.
+
+Because of the nature of limits, the soft value must be lower or equal to the
+high limit. To see all the available resource limits, refer to the RESOURCE
+OPTIONS section.
+
+.IP "\fB<soft>:<hard>\fP Specify both limits"
+.IP "\fB<soft>:\fP Specify only the soft limit"
+.IP "\fB:<hard>\fP Specify only the hard limit"
+.IP "\fB<value>\fP Specify both soft and hard limits to the same value"
+
+.SH GENERAL OPTIONS
+.IP "\fB\-p, \-\-pid\fP"
+Specify the process id, if none is given, it will use the running process.
+.IP "\fB\-o, \-\-output \fIlist\fP"
+Define the output columns to use. If no output arrangement is specified, then a default set is used.
+Use \fB\-\-help\fP to get list of all supported columns.
+.IP "\fB\-V, \-\-version\fP"
+Output version information and exit.
+.IP "\fB\-v, \-\-verbose\fP"
+Vebose mode.
+.IP "\fB\-h, \-\-help\fP"
+Print a help text and exit.
+
+.SH RESOURCE OPTIONS
+.IP "\fB\-c, \-\-core\fP[=limits]"
+Maximum size of a core file.
+.IP "\fB\-d, \-\-data\fP[=limits]"
+Maximum data size.
+.IP "\fB\-e, \-\-nice\fP[=limits]"
+Maximum nice priority allowed to raise.
+.IP "\fB\-f, \-\-fsize\fP[=limits]"
+Maximum file size.
+.IP "\fB\-i, \-\-sigpending\fP[=limits]"
+Maximum amount of pending signals.
+.IP "\fB\-l, \-\-memlock\fP[=limits]"
+Maximum locked-in-memory address space.
+.IP "\fB\-m, \-\-rss\fP[=limits]"
+Maximum Resident Set Size (RSS).
+.IP "\fB\-n, \-\-nofile\fP[=limits]"
+Maximum amount of open files.
+.IP "\fB\-q, \-\-msgqueue\fP[=limits]"
+Maximum amount of bytes in POSIX message queues.
+.IP "\fB\-r, \-\-rtprio\fP[=limits]"
+Maximum real-time priority.
+.IP "\fB\-s, \-\-stack\fP[=limits]"
+Maximum size of the stack.
+.IP "\fB\-t, \-\-cpu\fP[=limits]"
+CPU time, in seconds.
+.IP "\fB\-u, \-\-nproc\fP[=limits]"
+Maximum amount of processes.
+.IP "\fB\-v, \-\-as\fP[=limits]"
+Address space limit.
+.IP "\fB\-x, \-\-locks\fP[=limits]"
+Maximum amount of file locks held.
+.IP "\fB\-y, \-\-rttime\fP[=limits]"
+Timeout for real-time tasks.
+
+.RE
+.SH EXAMPLES
+.IP "\fBprlimit \-\-pid 13134\fP"
+Display limit values for all current resources.
+.IP "\fBprlimit \-\-pid 13134 \--rss --nofile=1024:4095\fP"
+Display the limits of the RSS and set the soft and hard limits for the amount
+of open files to 1024 and 4095, respectively.
+.IP "\fBprlimit \-\-pid 13134 --nproc=512:\fP"
+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.
+
+.SH "SEE ALSO"
+.BR prlimit (2),
+.BR ulimit (1)
+
+.SH NOTES
+.nf
+The prlimit system call is supported since Linux 2.6.36, previous kernels will
+break this program.
+.fi
+
+.SH AUTHORS
+.nf
+Davidlohr Bueso <dave@gnu.org> - In memory of Dennis M. Ritchie.
+.fi
+.SH AVAILABILITY
+The prlimit command is part of the util-linux package and is available from
+ftp://ftp.kernel.org/pub/linux/utils/util-linux/.