Changeset View
Changeset View
Standalone View
Standalone View
head/usr.bin/limits/limits.1
Show All 13 Lines | |||||
.\" is permitted provided this notation is included. | .\" is permitted provided this notation is included. | ||||
.\" 4. Absolutely no warranty of function or purpose is made by the author | .\" 4. Absolutely no warranty of function or purpose is made by the author | ||||
.\" David Nugent. | .\" David Nugent. | ||||
.\" 5. Modifications may be freely made to this file providing the above | .\" 5. Modifications may be freely made to this file providing the above | ||||
.\" conditions are met. | .\" conditions are met. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd May 26, 2020 | .Dd June 25, 2020 | ||||
.Dt LIMITS 1 | .Dt LIMITS 1 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm limits | .Nm limits | ||||
.Nd set or display process resource limits | .Nd set or display process resource limits | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Nm | .Nm | ||||
.Op Fl C Ar class | Fl P Ar pid | Fl U Ar user | .Op Fl C Ar class | Fl P Ar pid | Fl U Ar user | ||||
▲ Show 20 Lines • Show All 340 Lines • ▼ Show 20 Lines | |||||
.Fl e | .Fl e | ||||
is used when running a program, etc. | is used when running a program, etc. | ||||
When run in display or eval mode, | When run in display or eval mode, | ||||
.Nm | .Nm | ||||
exits with a status of | exits with a status of | ||||
.Dv EXIT_SUCCESS . | .Dv EXIT_SUCCESS . | ||||
When run in command mode and execution of the command succeeds, the exit status | When run in command mode and execution of the command succeeds, the exit status | ||||
will be whatever the executed program returns. | will be whatever the executed program returns. | ||||
.Sh EXAMPLES | |||||
Show current stack size limit: | |||||
.Bd -literal -offset indent | |||||
$ limits -s | |||||
Resource limits (current): | |||||
stacksize 524288 kB | |||||
.Ed | |||||
.Pp | |||||
Try to run | |||||
.Xr ls 1 | |||||
with 1 byte of | |||||
.Va datasize | |||||
limit: | |||||
.Bd -literal -offset indent | |||||
$ limits -d 1b ls | |||||
Data segment size exceeds process limit | |||||
Abort trap | |||||
.Ed | |||||
.Pp | |||||
Produce | |||||
.Ql eval mode | |||||
output to limit | |||||
.Va sbsize | |||||
to 1 byte. | |||||
Output obtained when command is run from | |||||
.Xr sh 1 : | |||||
.Bd -literal -offset indent | |||||
$ limits -e -b 1b | |||||
ulimit -b 512; | |||||
.Ed | |||||
.Pp | |||||
Same as above from | |||||
.Xr csh 1 | |||||
.Bd -literal -offset indent | |||||
% limits -e -b 1b | |||||
limit -h sbsize 512; | |||||
limit sbsize 512; | |||||
.Ed | |||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr csh 1 , | .Xr csh 1 , | ||||
.Xr env 1 , | .Xr env 1 , | ||||
.Xr limit 1 , | .Xr limit 1 , | ||||
.Xr sh 1 , | .Xr sh 1 , | ||||
.Xr getrlimit 2 , | .Xr getrlimit 2 , | ||||
.Xr setrlimit 2 , | .Xr setrlimit 2 , | ||||
.Xr login_cap 3 , | .Xr login_cap 3 , | ||||
.Xr login.conf 5 , | .Xr login.conf 5 , | ||||
.Xr rctl 8 , | .Xr rctl 8 , | ||||
.Xr sysctl 8 | .Xr sysctl 8 | ||||
.Sh HISTORY | .Sh HISTORY | ||||
The | The | ||||
.Nm | .Nm | ||||
utility first appeared in | utility first appeared in | ||||
.Fx 2.1.7 . | .Fx 2.1.7 . | ||||
.Sh AUTHORS | .Sh AUTHORS | ||||
The | The | ||||
.Nm | .Nm | ||||
utility was written by | utility was written by | ||||
.An David Nugent Aq Mt davidn@FreeBSD.org . | .An David Nugent Aq Mt davidn@FreeBSD.org . | ||||
.Sh BUGS | .Sh BUGS | ||||
The | The | ||||
.Nm | .Nm | ||||
utility does not handle commands with equal | utility does not handle commands with equal | ||||
.Pq Ql = | .Pq Ql = | ||||
signs in their | signs in their | ||||
names, for obvious reasons. | names, for obvious reasons. | ||||
.Pp | .Pp | ||||
Show All 9 Lines |