Copyright (c) 1998 by Sun Microsystems, Inc. All rights reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
plimit [-km] pid...
plimit {-cdfnstv} soft,hard... pid...
If one or more of the cdfnstv options is specified, plimit sets the soft (current) limit and/or the hard (maximum) limit of the indicated resource(s) in the processes identified by the process-ID list, pid. Otherwise plimit reports the resource limits of the processes identified by the process-ID list, pid.
Only the owner of a process or the super-user is permitted either to get or to set the resource limits of a process. Only the super-user can increase the hard limit.
The following options are supported: -k
On output, show file sizes in kilobytes (1024 bytes) rather than in 512-byte blocks.
On output, show file and memory sizes in megabytes (1024*1024 bytes).
The remainder of the options are used to change specified resource limits. They each accept an argument of the form:
soft,hard
where soft specifies the soft (current) limit and hard specifies the hard (maximum) limit. If the hard limit is not specified, the comma may be omitted. If the soft limit is an empty string, only the hard limit is set. Each limit is either the literal string unlimited, or a number, with an optional scaling factor, as follows: nk
n kilobytes
n megabytes (minutes for CPU time)
n hours (for CPU time only)
minutes and seconds (for CPU time only)
The soft limit cannot exceed the hard limit. -c soft,hard
Set core file size limits (default unit is 512-byte blocks).
Set data segment (heap) size limits (default unit is kilobytes).
Set file size limits (default unit is 512-byte blocks).
Set file descriptor limits (no default unit).
Set stack segment size limits (default unit is kilobytes).
Set CPU time limits (default unit is seconds).
Set virtual memory size limits (default unit is kilobytes).
The following operands are supported. pid
Process ID list.
plimit returns the exit value zero on success, non-zero on failure (such as no such process, permission denied, or invalid option).
process information and control files
ulimit(1), proc(1), getrlimit(2), setrlimit(2), proc(5), attributes(7),