1renice(1) User Commands renice(1)
2
3
4
6 renice - alter priority of running processes
7
9 renice [-n increment] [-i idtype] ID...
10
11
12 renice [-n increment] [-g | -p | -u] ID...
13
14
15 renice priority [-p] pid... [-g gid]... [-p pid]...
16 [-u user]...
17
18
19 renice priority -g gid... [-g gid]... [-p pid]...
20 [-u user]...
21
22
23 renice priority -u user... [-g gid]... [-p pid]...
24 [-u user]...
25
26
28 The renice command alters the scheduling priority of one or more run‐
29 ning processes. By default, the processes to be affected are specified
30 by their process IDs.
31
32
33 If the first operand is a number within the valid range of priorities
34 (−20 to 20), renice will treat it as a priority (as in all but the
35 first synopsis form). Otherwise, renice will treat it as an ID (as in
36 the first synopsis form).
37
38 Altering Process Priority
39 Users other than the privileged user may only alter the priority of
40 processes they own, and can only monotonically increase their "nice
41 value" within the range 0 to 19. This prevents overriding administra‐
42 tive fiats. The privileged user may alter the priority of any process
43 and set the priority to any value in the range −20 to 19. Useful prior‐
44 ities are: 19 (the affected processes will run only when nothing else
45 in the system wants to); 0 (the "base" scheduling priority),; and any
46 negative value (to make things go very fast). 20 is an acceptable nice
47 value, but will be rounded down to 19.
48
50 renice supports the following option features:
51
52 o The first operand, priority, must precede the options and
53 can have the appearance of a multi-digit option.
54
55 o The -g, -p, and -u options can each take multiple option-
56 arguments.
57
58 o The pid option-argument can be used without its -p option.
59
60 o The -i option can be used to specify the ID type for the ID
61 list. This is preferred in specifying ID type over the use
62 of the -g | -p | -u syntax, which is now obsolete. See
63 NOTES.
64
65
66 The following options are supported:
67
68 -g Interprets all operands or just the gid arguments as
69 unsigned decimal integer process group IDs.
70
71
72 -i This option, together with the ID list arguments, spec‐
73 ifies a class of processes to which the renice command
74 is to apply. The interpretation of the ID list depends
75 on the value of idtype. The valid idtype arguments are:
76 pid, pgid, uid, gid, sid, taskid, projid, and zoneid.
77
78
79 -n increment Specifies how the system scheduling priority of the
80 specified process or processes is to be adjusted. The
81 increment option-argument is a positive or negative
82 decimal integer that will be used to modify the system
83 scheduling priority of the specified process or pro‐
84 cesses. Positive increment values cause a lower system
85 scheduling priority. Negative increment values may
86 require appropriate privileges and will cause a higher
87 system scheduling priority.
88
89
90 -p Interprets all operands or just the pid arguments as
91 unsigned decimal integer process IDs. The -p option is
92 the default if no options are specified.
93
94
95 -u Interprets all operands or just the user argument as
96 users. If a user exists with a user name equal to the
97 operand, then the user ID of that user will be used in
98 further processing. Otherwise, if the operand repre‐
99 sents an unsigned decimal integer, it will be used as
100 the numeric user ID of the user.
101
102
104 The following operands are supported:
105
106 ID A process ID, process group ID, or user name/user ID,
107 depending on the option selected.
108
109
110 priority The value specified is taken as the actual system schedul‐
111 ing priority, rather than as an increment to the existing
112 system scheduling priority. Specifying a scheduling prior‐
113 ity higher than that of the existing process may require
114 appropriate privileges.
115
116
118 Example 1 Adjusting the scheduling priority of process IDs
119
120
121 Adjust the system scheduling priority so that process IDs 987 and 32
122 would have a lower scheduling priority:
123
124
125 example% renice -n 5 -p 987 32
126
127
128
129 Example 2 Adjusting the scheduling priority of group IDs
130
131
132 Adjust the system scheduling priority so that group IDs 324 and 76
133 would have a higher scheduling priority, if the user has the appropri‐
134 ate privileges to do so:
135
136
137 example% renice -n -4 -g 324 76
138
139
140
141 Example 3 Adjusting the scheduling priority of a user ID and user name
142
143
144 Adjust the system scheduling priority so that numeric user ID 8 and
145 user sas would have a lower scheduling priority:
146
147
148 example% renice -n 4 -u 8 sas
149
150
151
153 See environ(5) for descriptions of the following environment variables
154 that affect the execution of renice: LANG, LC_ALL, LC_CTYPE, LC_MES‐
155 SAGES, and NLSPATH.
156
158 The following exit values are returned:
159
160 0 Successful completion.
161
162
163 >0 An error occurred.
164
165
167 /etc/passwd map user names to user IDs
168
169
171 See attributes(5) for descriptions of the following attributes:
172
173
174
175
176 ┌─────────────────────────────┬─────────────────────────────┐
177 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
178 ├─────────────────────────────┼─────────────────────────────┤
179 │Availability │SUNWcsu │
180 ├─────────────────────────────┼─────────────────────────────┤
181 │Interface Stability │Standard │
182 └─────────────────────────────┴─────────────────────────────┘
183
185 nice(1), passwd(1), priocntl(1), attributes(5), environ(5), stan‐
186 dards(5)
187
189 The renice syntax
190
191 renice [-n increment] [-i idtype] ID ...
192
193
194
195
196 is preferred over the old syntax
197
198 renice [-n increment] [-g | -p| -u] ID ...
199
200
201
202
203 which is now obsolete.
204
205
206 If you make the priority very negative, then the process cannot be
207 interrupted.
208
209
210 To regain control you must make the priority greater than 0.
211
212
213 Users other than the privileged user cannot increase scheduling priori‐
214 ties of their own processes, even if they were the ones that decreased
215 the priorities in the first place.
216
217
218 The priocntl command subsumes the function of renice.
219
220
221
222SunOS 5.11 9 Jan 2004 renice(1)