Commit | Line | Data |
---|---|---|
b42074ab | 1 | .\" Copyright (c) 1983, 1991 The Regents of the University of California. |
f56e8d15 | 2 | .\" All rights reserved. |
c229b29d | 3 | .\" |
c45a9e4d | 4 | .\" %sccs.include.redist.man% |
c229b29d | 5 | .\" |
b42074ab | 6 | .\" @(#)renice.8 6.5 (Berkeley) %G% |
f56e8d15 | 7 | .\" |
b42074ab CL |
8 | .Dd |
9 | .Dt RENICE 8 | |
10 | .Os BSD 4 | |
11 | .Sh NAME | |
12 | .Nm renice | |
13 | .Nd alter priority of running processes | |
14 | .Sh SYNOPSIS | |
15 | .Nm renice | |
16 | .Ar priority | |
17 | .Oo | |
18 | .Op Fl p | |
19 | .Ar pid ... | |
20 | .Oc | |
21 | .Oo | |
22 | .Op Fl g | |
23 | .Ar pgrp ... | |
24 | .Oc | |
25 | .Oo | |
26 | .Op Fl u | |
27 | .Ar user ... | |
28 | .Oc | |
29 | .Sh DESCRIPTION | |
30 | .Nm Renice | |
8d36c088 KM |
31 | alters the |
32 | scheduling priority of one or more running processes. | |
b42074ab CL |
33 | The following |
34 | .Ar who | |
8d36c088 KM |
35 | parameters are interpreted as process ID's, process group |
36 | ID's, or user names. | |
b42074ab | 37 | .Nm Renice Ns 'ing |
8d36c088 KM |
38 | a process group causes all processes in the process group |
39 | to have their scheduling priority altered. | |
b42074ab | 40 | .Nm Renice Ns 'ing |
8d36c088 KM |
41 | a user causes all processes owned by the user to have |
42 | their scheduling priority altered. | |
43 | By default, the processes to be affected are specified by | |
b42074ab CL |
44 | their process ID's. |
45 | .Pp | |
46 | Options supported by | |
47 | .Nm renice : | |
48 | .Bl -tag -width Ds | |
49 | .It Fl g | |
50 | Force | |
51 | .Ar who | |
52 | parameters to be interpreted as process group ID's. | |
53 | .It Fl u | |
54 | Force the | |
55 | .Ar who | |
56 | parameters to be interpreted as user names. | |
57 | .It Fl p | |
58 | Resets the | |
59 | .Ar who | |
8d36c088 | 60 | interpretation to be (the default) process ID's. |
b42074ab CL |
61 | .El |
62 | .Pp | |
8d36c088 | 63 | For example, |
b42074ab CL |
64 | .Bd -literal -offset |
65 | renice +1 987 -u daemon root -p 32 | |
66 | .Ed | |
67 | .Pp | |
8d36c088 KM |
68 | would change the priority of process ID's 987 and 32, and |
69 | all processes owned by users daemon and root. | |
b42074ab | 70 | .Pp |
8d36c088 KM |
71 | Users other than the super-user may only alter the priority of |
72 | processes they own, | |
73 | and can only monotonically increase their ``nice value'' | |
b42074ab CL |
74 | within the range 0 to |
75 | .Dv PRIO_MAX | |
76 | (20). | |
8d36c088 KM |
77 | (This prevents overriding administrative fiats.) |
78 | The super-user | |
79 | may alter the priority of any process | |
b42074ab CL |
80 | and set the priority to any value in the range |
81 | .Dv PRIO_MIN | |
82 | (\-20) | |
83 | to | |
84 | .Dv PRIO_MAX . | |
8d36c088 | 85 | Useful priorities are: |
2b0388bc | 86 | 20 (the affected processes will run only when nothing else |
8d36c088 KM |
87 | in the system wants to), |
88 | 0 (the ``base'' scheduling priority), | |
89 | anything negative (to make things go very fast). | |
b42074ab CL |
90 | .Sh FILES |
91 | .Bl -tag -width /etc/passwd -compact | |
92 | .It Pa /etc/passwd | |
93 | to map user names to user ID's | |
94 | .El | |
95 | .Sh SEE ALSO | |
96 | .Xr getpriority 2 , | |
97 | .Xr setpriority 2 | |
98 | .Sh BUGS | |
8d36c088 KM |
99 | Non super-users can not increase scheduling priorities of their own processes, |
100 | even if they were the ones that decreased the priorities in the first place. | |
b42074ab CL |
101 | .Sh HISTORY |
102 | The | |
103 | .Nm | |
104 | command appeared in | |
105 | .Bx 4.0 . |