1.\" $OpenBSD: renice.8,v 1.12 2000/11/10 05:10:39 aaron Exp $ 2.\" 3.\" Copyright (c) 1983, 1991, 1993 4.\" The Regents of the University of California. All rights reserved. 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. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by the University of 17.\" California, Berkeley and its contributors. 18.\" 4. Neither the name of the University nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" from: @(#)renice.8 8.1 (Berkeley) 6/9/93 35.\" 36.Dd June 9, 1993 37.Dt RENICE 8 38.Os 39.Sh NAME 40.Nm renice 41.Nd alter priority of running processes 42.Sh SYNOPSIS 43.Nm renice 44.Ar priority 45.Oo 46.Op Fl p 47.Ar pid ... 48.Oc 49.Oo 50.Op Fl g 51.Ar pgrp ... 52.Oc 53.Oo 54.Op Fl u 55.Ar user ... 56.Oc 57.Sh DESCRIPTION 58.Nm 59alters the scheduling 60.Ar priority 61(an integer) of one or more running processes. 62The following 63.Ar who 64parameters (pid, pgrp and user) are interpreted as process IDs, process group 65IDs, or user names. 66.Nm renice Ns ing 67a process group causes all processes in the process group 68to have their scheduling priority altered. 69.Nm renice Ns ing 70a user causes all processes owned by the user to have 71their scheduling priority altered. 72By default, the processes to be affected are specified by 73their process IDs. 74.Pp 75The options are as follows: 76.Bl -tag -width Ds 77.It Fl g 78Force 79.Ar who 80parameters to be interpreted as process group IDs. 81.It Fl u 82Force the 83.Ar who 84parameters to be interpreted as user names. 85.It Fl p 86Resets the 87.Ar who 88interpretation to be (the default) process IDs. 89.El 90.Pp 91For example, 92.Bd -literal -offset 93renice +1 987 -u daemon root -p 32 94.Ed 95.Pp 96would change the priority of process IDs 987 and 32, and 97all processes owned by users daemon and root. 98.Pp 99Users other than the superuser may only alter the priority of 100processes they own, 101and can only monotonically increase their 102.Dq nice value 103within the range 0 to 104.Dv PRIO_MAX 105(20). 106(This prevents overriding administrative fiats.) 107The superuser 108may alter the priority of any process 109and set the priority to any value in the range 110.Dv PRIO_MIN 111(\-20) 112to 113.Dv PRIO_MAX . 114Useful priorities are: 11520 (the affected processes will run only when nothing else 116in the system wants to), 1170 (the 118.Dq base 119scheduling priority), 120anything negative (to make things go very fast). 121.Sh FILES 122.Bl -tag -width /etc/passwd -compact 123.It Pa /etc/passwd 124for mapping user names to user IDs 125.El 126.Sh SEE ALSO 127.Xr nice 1 , 128.Xr getpriority 2 , 129.Xr setpriority 2 130.Sh HISTORY 131The 132.Nm 133command appeared in 134.Bx 4.0 . 135.Sh BUGS 136Non-superusers cannot increase scheduling priorities of their own processes, 137even if they were the ones that decreased the priorities in the first place. 138