1994-05-27 12:33:43 +00:00
|
|
|
.\" Copyright (c) 1980, 1990, 1993
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" @(#)nice.1 8.1 (Berkeley) 6/6/93
|
1999-08-28 01:08:13 +00:00
|
|
|
.\" $FreeBSD$
|
1994-05-27 12:33:43 +00:00
|
|
|
.\"
|
2011-02-24 16:13:33 +00:00
|
|
|
.Dd February 24, 2011
|
1994-05-27 12:33:43 +00:00
|
|
|
.Dt NICE 1
|
2001-07-10 14:16:33 +00:00
|
|
|
.Os
|
1994-05-27 12:33:43 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm nice
|
2002-05-12 22:49:48 +00:00
|
|
|
.Nd execute a utility at an altered scheduling priority
|
1994-05-27 12:33:43 +00:00
|
|
|
.Sh SYNOPSIS
|
1998-03-23 07:45:40 +00:00
|
|
|
.Nm
|
2002-05-12 22:49:48 +00:00
|
|
|
.Op Fl n Ar increment
|
|
|
|
.Ar utility
|
|
|
|
.Op Ar argument ...
|
1994-05-27 12:33:43 +00:00
|
|
|
.Sh DESCRIPTION
|
2002-04-20 12:18:28 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility runs
|
2002-05-12 22:49:48 +00:00
|
|
|
.Ar utility
|
|
|
|
at an altered scheduling priority, by incrementing its
|
|
|
|
.Dq nice
|
|
|
|
value by the specified
|
|
|
|
.Ar increment ,
|
|
|
|
or a default value of 10.
|
|
|
|
The lower the nice value of a process, the higher its scheduling priority.
|
|
|
|
.Pp
|
|
|
|
The superuser may specify a negative increment in order to run a utility
|
2002-12-27 12:15:40 +00:00
|
|
|
with a higher scheduling priority.
|
1994-05-27 12:33:43 +00:00
|
|
|
.Pp
|
1999-09-08 15:40:46 +00:00
|
|
|
Some shells may provide a builtin
|
|
|
|
.Nm
|
1999-09-14 11:46:04 +00:00
|
|
|
command which is similar or identical to this utility.
|
|
|
|
Consult the
|
1999-09-08 15:40:46 +00:00
|
|
|
.Xr builtin 1
|
|
|
|
manual page.
|
2002-06-23 11:49:08 +00:00
|
|
|
.Sh ENVIRONMENT
|
|
|
|
The
|
|
|
|
.Ev PATH
|
|
|
|
environment variable is used to locate the requested
|
|
|
|
.Ar utility
|
|
|
|
if the name contains no
|
|
|
|
.Ql /
|
|
|
|
characters.
|
2005-01-17 07:44:44 +00:00
|
|
|
.Sh EXIT STATUS
|
2002-05-10 06:39:16 +00:00
|
|
|
If
|
2002-05-12 22:49:48 +00:00
|
|
|
.Ar utility
|
2002-05-10 06:39:16 +00:00
|
|
|
is invoked, the exit status of
|
|
|
|
.Nm
|
|
|
|
is the exit status of
|
2002-05-12 22:49:48 +00:00
|
|
|
.Ar utility .
|
2002-05-10 06:39:16 +00:00
|
|
|
.Pp
|
|
|
|
An exit status of 126 indicates
|
2002-05-12 22:49:48 +00:00
|
|
|
.Ar utility
|
2002-05-10 06:39:16 +00:00
|
|
|
was found, but could not be executed.
|
|
|
|
An exit status of 127 indicates
|
2002-05-12 22:49:48 +00:00
|
|
|
.Ar utility
|
2002-05-10 06:39:16 +00:00
|
|
|
could not be found.
|
2005-01-18 13:43:56 +00:00
|
|
|
.Sh EXAMPLES
|
|
|
|
Execute utility
|
|
|
|
.Sq date
|
|
|
|
at priority 5 assuming the priority of the
|
|
|
|
shell is 0:
|
|
|
|
.Pp
|
|
|
|
.Dl "nice -n 5 date"
|
|
|
|
.Pp
|
|
|
|
Execute utility
|
|
|
|
.Sq date
|
|
|
|
at priority -19 assuming the priority of the
|
|
|
|
shell is 0 and you are the super-user:
|
|
|
|
.Pp
|
|
|
|
.Dl "nice -n 16 nice -n -35 date"
|
|
|
|
.Sh COMPATIBILITY
|
|
|
|
The traditional
|
|
|
|
.Fl Ns Ar increment
|
|
|
|
option has been deprecated but is still supported.
|
1994-05-27 12:33:43 +00:00
|
|
|
.Sh SEE ALSO
|
1999-09-08 15:40:46 +00:00
|
|
|
.Xr builtin 1 ,
|
1997-01-15 23:25:55 +00:00
|
|
|
.Xr csh 1 ,
|
1997-07-21 23:05:06 +00:00
|
|
|
.Xr idprio 1 ,
|
1999-08-15 08:25:34 +00:00
|
|
|
.Xr rtprio 1 ,
|
1996-11-02 22:02:32 +00:00
|
|
|
.Xr getpriority 2 ,
|
|
|
|
.Xr setpriority 2 ,
|
1999-08-15 08:25:34 +00:00
|
|
|
.Xr renice 8
|
2002-05-12 22:49:48 +00:00
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility conforms to
|
|
|
|
.St -p1003.1-2001 .
|
1994-05-27 12:33:43 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
A
|
1998-03-23 07:45:40 +00:00
|
|
|
.Nm
|
2002-05-12 22:49:48 +00:00
|
|
|
utility appeared in
|
2002-06-03 14:56:57 +00:00
|
|
|
.At v4 .
|