xref: /csrg-svn/usr.bin/renice/renice.8 (revision 47469)
1*47469Scael.\" Copyright (c) 1983, 1991 The Regents of the University of California.
238662Sbostic.\" All rights reserved.
318911Smckusick.\"
443810Strent.\" %sccs.include.redist.man%
518911Smckusick.\"
6*47469Scael.\"     @(#)renice.8	6.5 (Berkeley) 03/16/91
738662Sbostic.\"
8*47469Scael.Dd
9*47469Scael.Dt RENICE 8
10*47469Scael.Os BSD 4
11*47469Scael.Sh NAME
12*47469Scael.Nm renice
13*47469Scael.Nd alter priority of running processes
14*47469Scael.Sh SYNOPSIS
15*47469Scael.Nm renice
16*47469Scael.Ar priority
17*47469Scael.Oo
18*47469Scael.Op Fl p
19*47469Scael.Ar pid ...
20*47469Scael.Oc
21*47469Scael.Oo
22*47469Scael.Op Fl g
23*47469Scael.Ar pgrp ...
24*47469Scael.Oc
25*47469Scael.Oo
26*47469Scael.Op Fl u
27*47469Scael.Ar user ...
28*47469Scael.Oc
29*47469Scael.Sh DESCRIPTION
30*47469Scael.Nm Renice
3118912Smckusickalters the
3218912Smckusickscheduling priority of one or more running processes.
33*47469ScaelThe following
34*47469Scael.Ar who
3518912Smckusickparameters are interpreted as process ID's, process group
3618912SmckusickID's, or user names.
37*47469Scael.Nm Renice Ns 'ing
3818912Smckusicka process group causes all processes in the process group
3918912Smckusickto have their scheduling priority altered.
40*47469Scael.Nm Renice Ns 'ing
4118912Smckusicka user causes all processes owned by the user to have
4218912Smckusicktheir scheduling priority altered.
4318912SmckusickBy default, the processes to be affected are specified by
44*47469Scaeltheir process ID's.
45*47469Scael.Pp
46*47469ScaelOptions supported by
47*47469Scael.Nm renice :
48*47469Scael.Bl -tag -width Ds
49*47469Scael.It Fl g
50*47469ScaelForce
51*47469Scael.Ar who
52*47469Scaelparameters to be interpreted as process group ID's.
53*47469Scael.It Fl u
54*47469ScaelForce the
55*47469Scael.Ar who
56*47469Scaelparameters to be interpreted as user names.
57*47469Scael.It Fl p
58*47469ScaelResets the
59*47469Scael.Ar who
6018912Smckusickinterpretation to be (the default) process ID's.
61*47469Scael.El
62*47469Scael.Pp
6318912SmckusickFor example,
64*47469Scael.Bd -literal -offset
65*47469Scaelrenice +1 987 -u daemon root -p 32
66*47469Scael.Ed
67*47469Scael.Pp
6818912Smckusickwould change the priority of process ID's 987 and 32, and
6918912Smckusickall processes owned by users daemon and root.
70*47469Scael.Pp
7118912SmckusickUsers other than the super-user may only alter the priority of
7218912Smckusickprocesses they own,
7318912Smckusickand can only monotonically increase their ``nice value''
74*47469Scaelwithin the range 0 to
75*47469Scael.Dv PRIO_MAX
76*47469Scael(20).
7718912Smckusick(This prevents overriding administrative fiats.)
7818912SmckusickThe super-user
7918912Smckusickmay alter the priority of any process
80*47469Scaeland set the priority to any value in the range
81*47469Scael.Dv PRIO_MIN
82*47469Scael(\-20)
83*47469Scaelto
84*47469Scael.Dv PRIO_MAX .
8518912SmckusickUseful priorities are:
8628304Skarels20 (the affected processes will run only when nothing else
8718912Smckusickin the system wants to),
8818912Smckusick0 (the ``base'' scheduling priority),
8918912Smckusickanything negative (to make things go very fast).
90*47469Scael.Sh FILES
91*47469Scael.Bl -tag -width /etc/passwd -compact
92*47469Scael.It Pa /etc/passwd
93*47469Scaelto map user names to user ID's
94*47469Scael.El
95*47469Scael.Sh SEE ALSO
96*47469Scael.Xr getpriority 2 ,
97*47469Scael.Xr setpriority 2
98*47469Scael.Sh BUGS
9918912SmckusickNon super-users can not increase scheduling priorities of their own processes,
10018912Smckusickeven if they were the ones that decreased the priorities in the first place.
101*47469Scael.Sh HISTORY
102*47469ScaelThe
103*47469Scael.Nm
104*47469Scaelcommand appeared in
105*47469Scael.Bx 4.0 .
106