summaryrefslogtreecommitdiffstats
path: root/usr.bin/limits/limits.1
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>2000-03-26 14:37:47 +0000
committercharnier <charnier@FreeBSD.org>2000-03-26 14:37:47 +0000
commit4f71f300d3e81a0d58ce6e4c28ad25e45b5bf185 (patch)
tree13de7a4b387b7137a5ba243e979e22e97ad88c97 /usr.bin/limits/limits.1
parent1006ba9553954a499bd5843aeddafd7933542b85 (diff)
downloadFreeBSD-src-4f71f300d3e81a0d58ce6e4c28ad25e45b5bf185.zip
FreeBSD-src-4f71f300d3e81a0d58ce6e4c28ad25e45b5bf185.tar.gz
Properly use .Nm, .Em, .Pa etc. Make usage() a simplier function.
Diffstat (limited to 'usr.bin/limits/limits.1')
-rw-r--r--usr.bin/limits/limits.176
1 files changed, 46 insertions, 30 deletions
diff --git a/usr.bin/limits/limits.1 b/usr.bin/limits/limits.1
index e0f0492..35dc52d 100644
--- a/usr.bin/limits/limits.1
+++ b/usr.bin/limits/limits.1
@@ -57,7 +57,7 @@ environment variables like
.Xr env 1
and run a program with the selected resources.
Three uses of the
-.Nm limits
+.Nm
command are possible:
.Pp
.Bl -hang -width indent
@@ -99,9 +99,9 @@ format, suitable for the calling shell.
The calling shell is determined by examining the entries in the
.Pa /proc
filesystem for the parent process.
-If the shell is known (ie. it is one of sh, csh, bash, tcsh, ksh,
+If the shell is known (i.e. it is one of sh, csh, bash, tcsh, ksh,
pdksh or rc),
-.Nm limits
+.Nm
emits 'limit' or 'ulimit' commands in the format understood by
that shell.
If the name of the shell cannot be determined, then the 'ulimit'
@@ -116,13 +116,13 @@ global configuration of maximum resource usage by maintaining a
central database of settings in the login class database.
.Pp
Within a shell script,
-.Nm limits
+.Nm
will normally be used with eval within backticks as follows:
.Pp
.Dl eval `limits -e -C daemon`
.Pp
which causes the output of
-.Nm limits
+.Nm
to be evaluated and set by the current shell.
.El
.Pp
@@ -140,7 +140,7 @@ If the user does not belong to a class, then the resource capabilities
for the "default" class are used, if it exists, or the "root" class if
the user is a superuser account.
.It Fl S
-Selects display or setting of "soft" (or current) resource limits.
+Select display or setting of "soft" (or current) resource limits.
If specific limits settings follow this switch, only soft limits are
affected unless overridden later with either the
.Fl H
@@ -148,7 +148,7 @@ or
.Fl B
flags.
.It Fl H
-Selects display or setting of "hard" (or maximum) resource limits.
+Select display or setting of "hard" (or maximum) resource limits.
If specific limits settings follow this switch, only hard limits are
affected until overridden later with either the
.Fl S
@@ -156,7 +156,7 @@ or
.Fl B
flags.
.It Fl B
-Selects display or setting of both "soft" (current) or "hard" (maximum)
+Select display or setting of both "soft" (current) or "hard" (maximum)
resource limits.
If specific limits settings follow this switch, both soft and hard
limits are affected until overridden later with either the
@@ -165,40 +165,40 @@ or
.Fl H
flags.
.Fl e
-Selects "eval mode" formatting for output.
+Select "eval mode" formatting for output.
This is valid only on display mode and cannot be used when running a
command.
The exact syntax used for output depends upon the type of shell from
which
-.Nm limits
+.Nm
is invoked.
.It Fl b Op Ar limit
Selects or sets the
.Em sbsize
resource limit.
.It Fl c Op Ar limit
-Selects or sets (if 'limit' is specified) the
+Select or set (if 'limit' is specified) the
.Em coredumpsize
resource limit.
A value of 0 disables core dumps.
.It Fl d Op Ar limit
-Selects or sets (if 'limit' is specified) the
+Select or set (if 'limit' is specified) the
.Em datasize
resource limit.
.It Fl f Op Ar limit
-Selects or sets the
+Select or set the
.Em filesize
resource limit.
.It Fl l Op Ar limit
-Selects or sets the
+Select or set the
.Em memorylocked
resource limit.
.It Fl m Op Ar limit
-Selects or sets the
+Select or set the
.Em memoryuse
size limit.
.It Fl n Op Ar limit
-Selects or sets the
+Select or set the
.Em openfiles
resource limit. The system-wide limit on the maximum number of
open files per process can be viewed using the 'sysctl kern.maxfilesperproc'
@@ -206,15 +206,15 @@ command. The total number of simultaneously open files in the entire
system is limited to the value displayed by the 'sysctl kern.maxfiles'
command.
.It Fl s Op Ar limit
-Selects or sets the
+Select or set the
.Em stacksize
resource limit.
.It Fl t Op Ar limit
-Selects or sets the
+Select or set the
.Em cputime
resource limit.
.It Fl u Op Ar limit
-Selects or sets the
+Select or set the
.Em maxproc
resource limit. The system-wide limit on the maximum number of processes
allowed per UID can be viewed using the 'sysctl kern.maxprocperuid' command.
@@ -222,8 +222,16 @@ The maximum number of processes that can be running simultaneously
in the entire system is limited to the value given by
the 'sysctl kern.maxproc' command.
.Pp
-Valid values for 'limit' in the above set of flags consist of either the
-string 'infinity' or 'inf' for an infinite (or kernel-defined maximum)
+Valid values for
+.Ar limit
+in the above set of flags consist of either the
+string
+.Em infinity ,
+.Em inf ,
+.Em unlimited
+or
+.Em unlimit
+for an infinite (or kernel-defined maximum)
limit, or a numeric value maybe followed by a suffix.
Values which relate to size default to a value in bytes, or one of the
following suffixes may be used as a multiplier:
@@ -265,7 +273,7 @@ weeks.
The option
.Sq Fl E
causes
-.Nm limits
+.Nm
to completely ignore the environment it inherits.
.It Fl a
This option forces all resource settings to be displayed even if
@@ -282,17 +290,17 @@ call, only the superuser may raise process "hard" resource limits.
Non-root users may, however, lower them or change "soft" resource limits
within to any value below the hard limit.
When invoked to execute a program, the failure of
-.Nm limits
+.Nm
to raise a hard limit is considered a fatal error.
.El
.Sh DIAGNOSTICS
.Nm Limits
-exits with EXIT_FAILURE if usage is incorrect in any way; ie. an invalid
+exits with EXIT_FAILURE if usage is incorrect in any way; i.e. an invalid
option, or set/display options are selected in the same invocation,
.Fl e
is used when running a program, etc.
When run in display or eval mode,
-.Nm limits
+.Nm
exits with a status of EXIT_SUCCESS.
When run in command mode and execution of the command succeeds, the exit status
will be whatever the executed program returns.
@@ -311,18 +319,26 @@ will be whatever the executed program returns.
does not handle commands with equal (``='') signs in their
names, for obvious reasons.
.Pp
-When eval output is selected, the /proc filesystem must be installed
+When eval output is selected, the
+.Pa /proc
+filesystem must be installed
and mounted for the shell to be correctly determined, and therefore
output syntax correct for the running shell.
-The default output is valid for /bin/sh, so this means that any
+The default output is valid for
+.Pa /bin/sh ,
+so this means that any
usage of
-.Nm limits
-in eval mode prior mounting /proc may only occur in standard bourne
+.Nm
+in eval mode prior mounting
+.Pa /proc
+may only occur in standard bourne
shell scripts.
.Pp
.Nm Limits
makes no effort to ensure that resource settings emitted or displayed
are valid and settable by the current user.
Only a superuser account may raise hard limits, and when doing so
-the FreeBSD kernel will silently lower limits to values less than
+the
+.Fx
+kernel will silently lower limits to values less than
specified if the values given are too high.
OpenPOWER on IntegriCloud