[BACK]Return to renice.8 CVS log [TXT][DIR] Up to [local] / src / usr.bin / renice

Annotation of src/usr.bin/renice/renice.8, Revision 1.22

1.22    ! jmc         1: .\"    $OpenBSD: renice.8,v 1.21 2009/02/09 17:15:44 jmc Exp $
1.10      aaron       2: .\"
1.6       millert     3: .\" Copyright (c) 1983, 1991, 1993
                      4: .\"    The Regents of the University of California.  All rights reserved.
1.1       deraadt     5: .\"
                      6: .\" Redistribution and use in source and binary forms, with or without
                      7: .\" modification, are permitted provided that the following conditions
                      8: .\" are met:
                      9: .\" 1. Redistributions of source code must retain the above copyright
                     10: .\"    notice, this list of conditions and the following disclaimer.
                     11: .\" 2. Redistributions in binary form must reproduce the above copyright
                     12: .\"    notice, this list of conditions and the following disclaimer in the
                     13: .\"    documentation and/or other materials provided with the distribution.
1.14      millert    14: .\" 3. Neither the name of the University nor the names of its contributors
1.1       deraadt    15: .\"    may be used to endorse or promote products derived from this software
                     16: .\"    without specific prior written permission.
                     17: .\"
                     18: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     19: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     20: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     21: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     22: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     23: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     24: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     25: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     26: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     27: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     28: .\" SUCH DAMAGE.
                     29: .\"
1.6       millert    30: .\"     from: @(#)renice.8     8.1 (Berkeley) 6/9/93
1.1       deraadt    31: .\"
1.22    ! jmc        32: .Dd $Mdocdate: February 9 2009 $
1.1       deraadt    33: .Dt RENICE 8
1.7       aaron      34: .Os
1.1       deraadt    35: .Sh NAME
                     36: .Nm renice
                     37: .Nd alter priority of running processes
                     38: .Sh SYNOPSIS
                     39: .Nm renice
1.18      millert    40: .Fl n Ar increment
1.1       deraadt    41: .Oo
1.15      jmc        42: .Op Fl g
                     43: .Ar pgrp ...
                     44: .Oc
                     45: .Oo
1.1       deraadt    46: .Op Fl p
                     47: .Ar pid ...
                     48: .Oc
                     49: .Oo
                     50: .Op Fl u
                     51: .Ar user ...
                     52: .Oc
                     53: .Sh DESCRIPTION
1.8       aaron      54: .Nm
1.18      millert    55: alters the scheduling priority of one or more running processes by
                     56: .Ar increment .
1.15      jmc        57: Processes may be selected using the parameters
                     58: .Ar pid
                     59: (process ID),
                     60: .Ar pgrp
                     61: (process group ID),
                     62: and
                     63: .Ar user
1.18      millert    64: (user name or ID).
1.15      jmc        65: If no flag is specified,
                     66: the default is to select by process ID.
1.1       deraadt    67: .Pp
1.11      aaron      68: Users other than the superuser may only alter the priority of
1.1       deraadt    69: processes they own,
1.10      aaron      70: and can only monotonically increase their
                     71: .Dq nice value
1.1       deraadt    72: within the range 0 to
                     73: .Dv PRIO_MAX
                     74: (20).
                     75: (This prevents overriding administrative fiats.)
1.11      aaron      76: The superuser
1.1       deraadt    77: may alter the priority of any process
                     78: and set the priority to any value in the range
                     79: .Dv PRIO_MIN
                     80: (\-20)
                     81: to
                     82: .Dv PRIO_MAX .
1.15      jmc        83: .Pp
1.1       deraadt    84: Useful priorities are:
                     85: 20 (the affected processes will run only when nothing else
                     86: in the system wants to),
1.10      aaron      87: 0 (the
                     88: .Dq base
                     89: scheduling priority),
1.1       deraadt    90: anything negative (to make things go very fast).
1.15      jmc        91: .Pp
                     92: The options are as follows:
                     93: .Bl -tag -width Ds
1.19      sobrado    94: .It Fl g Ar pgrp ...
1.15      jmc        95: Alter the scheduling priority of all processes in process group
                     96: .Ar pgrp .
1.18      millert    97: .It Fl n Ar increment
                     98: A positive or negative decimal integer used to modify the
                     99: scheduling priority.
1.19      sobrado   100: .It Fl p Ar pid ...
1.15      jmc       101: Alter the scheduling priority of process
                    102: .Ar pid .
1.19      sobrado   103: .It Fl u Ar user ...
1.18      millert   104: Alter the scheduling priority of all processes belonging to
                    105: .Ar user ,
                    106: which may be a user name or ID.
1.15      jmc       107: .El
1.1       deraadt   108: .Sh FILES
                    109: .Bl -tag -width /etc/passwd -compact
                    110: .It Pa /etc/passwd
1.9       aaron     111: for mapping user names to user IDs
1.1       deraadt   112: .El
1.22    ! jmc       113: .Sh EXIT STATUS
        !           114: .Ex -std renice
1.15      jmc       115: .Sh EXAMPLES
                    116: The following example
                    117: changes the priority of process IDs 987 and 32,
                    118: and all processes owned by users daemon and root:
                    119: .Bd -literal -offset indent
1.18      millert   120: # renice -n +1 987 -u daemon root -p 32
1.15      jmc       121: .Ed
1.1       deraadt   122: .Sh SEE ALSO
1.4       deraadt   123: .Xr nice 1 ,
1.1       deraadt   124: .Xr getpriority 2 ,
                    125: .Xr setpriority 2
1.16      jmc       126: .Sh STANDARDS
                    127: The
                    128: .Nm
                    129: utility is compliant with the
1.20      jmc       130: .St -p1003.1-2008
1.21      jmc       131: specification.
1.18      millert   132: .Pp
                    133: The historical behavior of passing the increment as the first
                    134: argument is supported for backwards compatibility.
1.16      jmc       135: .Pp
                    136: The arguments to flags
                    137: .Op Fl gpu
                    138: are extensions to that specification.
1.1       deraadt   139: .Sh HISTORY
                    140: The
                    141: .Nm
                    142: command appeared in
                    143: .Bx 4.0 .
1.12      aaron     144: .Sh BUGS
                    145: Non-superusers cannot increase scheduling priorities of their own processes,
                    146: even if they were the ones that decreased the priorities in the first place.