19b50d902SRodney W. Grimes.\" Copyright (c) 1983, 1991, 1993 29b50d902SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 39b50d902SRodney W. Grimes.\" 49b50d902SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 59b50d902SRodney W. Grimes.\" modification, are permitted provided that the following conditions 69b50d902SRodney W. Grimes.\" are met: 79b50d902SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 89b50d902SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 99b50d902SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 109b50d902SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 119b50d902SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 12fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors 139b50d902SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 149b50d902SRodney W. Grimes.\" without specific prior written permission. 159b50d902SRodney W. Grimes.\" 169b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 179b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 189b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 199b50d902SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 209b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 219b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 229b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 239b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 249b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 259b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 269b50d902SRodney W. Grimes.\" SUCH DAMAGE. 279b50d902SRodney W. Grimes.\" 28*f8ae041aSFernando Apesteguía.Dd October 27, 2020 299b50d902SRodney W. Grimes.Dt RENICE 8 3062500372SRuslan Ermilov.Os 319b50d902SRodney W. Grimes.Sh NAME 329b50d902SRodney W. Grimes.Nm renice 339b50d902SRodney W. Grimes.Nd alter priority of running processes 349b50d902SRodney W. Grimes.Sh SYNOPSIS 358fe908efSRuslan Ermilov.Nm 36622e8da6SPhilippe Charnier.Ar priority 37*f8ae041aSFernando Apesteguía.Op Oo Fl gpu Oc Ar target 38622e8da6SPhilippe Charnier.Nm 39622e8da6SPhilippe Charnier.Fl n Ar increment 40*f8ae041aSFernando Apesteguía.Op Oo Fl gpu Oc Ar target 419b50d902SRodney W. Grimes.Sh DESCRIPTION 42084e1980SPhilippe CharnierThe 43084e1980SPhilippe Charnier.Nm 44084e1980SPhilippe Charnierutility alters the 459b50d902SRodney W. Grimesscheduling priority of one or more running processes. 469b50d902SRodney W. GrimesThe following 47*f8ae041aSFernando Apesteguía.Ar target 48*f8ae041aSFernando Apesteguíaparameters are interpreted as process ID's (the default), process group 49ae5a6820STim J. RobbinsID's, user ID's or user names. 50084e1980SPhilippe CharnierThe 51084e1980SPhilippe Charnier.Nm Ns 'ing 52084e1980SPhilippe Charnierof a process group causes all processes in the process group 539b50d902SRodney W. Grimesto have their scheduling priority altered. 54084e1980SPhilippe CharnierThe 55084e1980SPhilippe Charnier.Nm Ns 'ing 56084e1980SPhilippe Charnierof a user causes all processes owned by the user to have 579b50d902SRodney W. Grimestheir scheduling priority altered. 589b50d902SRodney W. Grimes.Pp 59084e1980SPhilippe CharnierThe following options are available: 60084e1980SPhilippe Charnier.Bl -tag -width indent 61d006e72aSMaxim Konovalov.It Fl n 62d006e72aSMaxim KonovalovInstead of changing the specified processes to the given priority, 63d006e72aSMaxim Konovalovinterpret the following argument as an increment to be applied to 64d006e72aSMaxim Konovalovthe current priority of each process. 65*f8ae041aSFernando Apesteguía.It Fl g 66*f8ae041aSFernando ApesteguíaInterpret 67*f8ae041aSFernando Apesteguía.Ar target 68*f8ae041aSFernando Apesteguíaparameters as process group ID's. 699b50d902SRodney W. Grimes.It Fl p 70*f8ae041aSFernando ApesteguíaInterpret 71*f8ae041aSFernando Apesteguía.Ar target 72*f8ae041aSFernando Apesteguíaparameters as process ID's (the default). 73*f8ae041aSFernando Apesteguía.It Fl u 74*f8ae041aSFernando ApesteguíaInterpret 75*f8ae041aSFernando Apesteguía.Ar target 76*f8ae041aSFernando Apesteguíaparameters as user names or user ID's. 779b50d902SRodney W. Grimes.El 789b50d902SRodney W. Grimes.Pp 799b50d902SRodney W. GrimesUsers other than the super-user may only alter the priority of 809b50d902SRodney W. Grimesprocesses they own, 819b50d902SRodney W. Grimesand can only monotonically increase their ``nice value'' 829b50d902SRodney W. Grimeswithin the range 0 to 839b50d902SRodney W. Grimes.Dv PRIO_MAX 849b50d902SRodney W. Grimes(20). 859b50d902SRodney W. Grimes(This prevents overriding administrative fiats.) 869b50d902SRodney W. GrimesThe super-user 879b50d902SRodney W. Grimesmay alter the priority of any process 889b50d902SRodney W. Grimesand set the priority to any value in the range 899b50d902SRodney W. Grimes.Dv PRIO_MIN 909b50d902SRodney W. Grimes(\-20) 919b50d902SRodney W. Grimesto 929b50d902SRodney W. Grimes.Dv PRIO_MAX . 939b50d902SRodney W. GrimesUseful priorities are: 949b50d902SRodney W. Grimes20 (the affected processes will run only when nothing else 959b50d902SRodney W. Grimesin the system wants to), 969b50d902SRodney W. Grimes0 (the ``base'' scheduling priority), 979b50d902SRodney W. Grimesanything negative (to make things go very fast). 989b50d902SRodney W. Grimes.Sh FILES 999b50d902SRodney W. Grimes.Bl -tag -width /etc/passwd -compact 1009b50d902SRodney W. Grimes.It Pa /etc/passwd 1019b50d902SRodney W. Grimesto map user names to user ID's 1029b50d902SRodney W. Grimes.El 103d04158c3SJoel Dahl.Sh EXAMPLES 104d04158c3SJoel DahlChange the priority of process ID's 987 and 32, and 105d04158c3SJoel Dahlall processes owned by users daemon and root. 106d04158c3SJoel Dahl.Pp 107d04158c3SJoel Dahl.Dl "renice +1 987 -u daemon root -p 32" 1089b50d902SRodney W. Grimes.Sh SEE ALSO 1096f955dc9SBill Fumerola.Xr nice 1 , 110a4cab7d3SMike Pritchard.Xr rtprio 1 , 1119b50d902SRodney W. Grimes.Xr getpriority 2 , 112a4cab7d3SMike Pritchard.Xr setpriority 2 1137d09396dSTim J. Robbins.Sh STANDARDS 1147d09396dSTim J. RobbinsThe 1157d09396dSTim J. Robbins.Nm 1167d09396dSTim J. Robbinsutility conforms to 1177d09396dSTim J. Robbins.St -p1003.1-2001 . 1189b50d902SRodney W. Grimes.Sh HISTORY 1199b50d902SRodney W. GrimesThe 1209b50d902SRodney W. Grimes.Nm 121084e1980SPhilippe Charnierutility appeared in 1229b50d902SRodney W. Grimes.Bx 4.0 . 1231d600474STim J. Robbins.Sh BUGS 1241d600474STim J. RobbinsNon super-users cannot increase scheduling priorities of their own processes, 1251d600474STim J. Robbinseven if they were the ones that decreased the priorities in the first place. 126