xref: /openbsd-src/usr.bin/nice/nice.1 (revision b2ea75c1b17e1a9a339660e7ed45cd24946b230e)
1.\"	$OpenBSD: nice.1,v 1.10 2000/11/10 05:10:37 aaron Exp $
2.\"	$NetBSD: nice.1,v 1.6 1995/08/31 23:30:57 jtc Exp $
3.\"
4.\" Copyright (c) 1980, 1990, 1993
5.\"	The Regents of the University of California.  All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. All advertising materials mentioning features or use of this software
16.\"    must display the following acknowledgement:
17.\"	This product includes software developed by the University of
18.\"	California, Berkeley and its contributors.
19.\" 4. Neither the name of the University nor the names of its contributors
20.\"    may be used to endorse or promote products derived from this software
21.\"    without specific prior written permission.
22.\"
23.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33.\" SUCH DAMAGE.
34.\"
35.\"	@(#)nice.1	8.1 (Berkeley) 6/6/93
36.\"
37.Dd June 6, 1993
38.Dt NICE 1
39.Os
40.Sh NAME
41.Nm nice
42.Nd execute a utility with an altered scheduling priority
43.Sh SYNOPSIS
44.Nm nice
45.Op Fl n Ar increment
46.Ar utility
47.Op Ar argument ...
48.Sh DESCRIPTION
49.Nm
50runs
51.Ar utility
52at an altered scheduling priority.
53If an
54.Ar increment
55is given, it is used; otherwise
56an increment of 10 is assumed.
57The superuser can run utilities with priorities higher than normal by using
58a negative
59.Ar increment .
60The priority can be adjusted over a
61range of \-20 (the highest) to 20 (the lowest).
62.Pp
63The options are as follows:
64.Bl -tag -width Ds
65.It Fl n Ar increment
66A positive or negative decimal integer used to modify the system scheduling
67priority of
68.Ar utility .
69.El
70.Pp
71The
72.Nm
73utility shall exit with one of the following values:
74.Pp
75.Bl -tag -width indent -offset indent -compact
76.It 1\-125
77An error occurred.
78.It 126
79The
80.Ar utility
81was found but could not be invoked.
82.It 127
83The
84.Ar utility
85could not be found.
86.El
87.Pp
88Otherwise, the exit status of
89.Nm
90shall be that of
91.Ar utility .
92.Sh SEE ALSO
93.Xr csh 1 ,
94.Xr getpriority 2 ,
95.Xr setpriority 2 ,
96.Xr renice 8
97.Sh COMPATIBILITY
98The historic
99.Fl Ns Ar increment
100option has been deprecated but is still supported in this implementation.
101.Sh STANDARDS
102The
103.Nm
104utility conforms to
105.St -p1003.2-92 .
106.Sh HISTORY
107A
108.Nm
109utility appeared in
110.At v6 .
111.Sh BUGS
112.Nm
113is built into
114.Xr csh 1
115with a slightly different syntax than described here.
116The form
117.Ql nice +10
118nices to positive nice, and
119.Ql nice \-10
120can be used
121by the superuser to give a process more of the processor.
122