File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 325325\item The priority class and nice value of a given process can be displayed with
326326the \texttt {-l } option of the \texttt {ps } command or by explicitly specifying
327327the fields to be printed out (see the \texttt {-o } option).
328- \item Example: priority values have different scales on different systems. E.g.
329- on macOS~10.9 a process that had the priority value 30 will have the value
330- decremented to 21 after increasing the nice value :
328+ \item The \texttt { renice } command can be used to manipulate the priority/nice
329+ value. Non privileged users can only increase the nice value (example from
330+ mac OS 10.13) :
331331\begin {verbatim }
332- $ sleep 200 &
332+ $ /bin/ sleep 200 & # use /bin/sleep to avoid invoking shell built-in
333333[1] 36877
334334$ ps -O pri,nice -p $!
335335 PID PRI NI TT STAT TIME COMMAND
33633636877 31 0 s003 S 0:00.00 sleep 200
337337$ renice 10 -p $!
338338$ ps -O pri,nice -p $!
339339 PID PRI NI TT STAT TIME COMMAND
340- 36877 21 10 s003 SN 0:00.00 sleep 200
340+ 36877 31 10 s003 SN 0:00.00 sleep 200
341341\end {verbatim }
342342
343- With Linux kernel 3.10 it will look differently -- the priority value will be
344- increased after a nice value increases. However, that means the process will be
345- running with a smaller priority.
343+ On Linux (kernel 5.10) this will look differently - after the \texttt {renice }
344+ is run, the priority will be increased by the nice value.
346345\end {itemize }
347346
348347% %%%%
You can’t perform that action at this time.
0 commit comments