2 .\" Copyright (c) 1994, Henrik Vestergaard Draboel
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\" 3. All advertising materials mentioning features or use of this software
14 .\" must display the following acknowledgement:
15 .\" This product includes software developed by Henrik Vestergaard Draboel.
16 .\" 4. The name of the author may not be used to endorse or promote products
17 .\" derived from this software without specific prior written permission.
19 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" $FreeBSD: src/usr.sbin/rtprio/rtprio.1,v 1.19.2.4 2002/06/21 16:42:31 charnier Exp $
32 .\" $DragonFly: src/usr.sbin/rtprio/rtprio.1,v 1.4 2006/02/17 19:40:25 swildner Exp $
40 .Nd execute, examine or modify a utility's or process's realtime
41 or idletime scheduling priority
63 utility is used for controlling realtime process scheduling.
67 utility is used for controlling idletime process scheduling, and can be called
68 with the same options as
71 A process with a realtime priority is not subject to priority
72 degradation, and will only be preempted by another process of equal or
73 higher realtime priority.
75 A process with an idle priority will run only when no other
76 process is runnable and then only if its idle priority is equal or
77 greater than all other runnable idle priority processes.
83 when called without arguments will return the realtime priority
84 of the current process.
88 is called with 1 argument, it will return the realtime priority
89 of the process with the specified
94 is specified, the process or program is run at that realtime priority.
97 is specified, the process or program is run as a normal (non-realtime)
102 is specified, the process with the process identifier
104 will be modified, else if
106 is specified, that program is run with its arguments.
109 is an integer between 0 and RTP_PRIO_MAX (usually 31). 0 is the
113 of 0 means "the current process".
115 Only root is allowed to set realtime or idle priority for a process.
117 To see which realtime priority the current process is at:
118 .Bd -literal -offset indent -compact
122 To see which realtime priority of process
124 .Bd -literal -offset indent -compact
130 at the lowest realtime priority:
131 .Bd -literal -offset indent -compact
135 To change the realtime priority of process
139 .Bd -literal -offset indent -compact
140 .Sy "rtprio 16 -1423"
145 without realtime priority:
146 .Bd -literal -offset indent -compact
147 .Sy "rtprio -t tcpdump"
150 To change the realtime priority of process
154 (non-realtime/normal priority):
155 .Bd -literal -offset indent -compact
156 .Sy "rtprio -t -1423"
159 To make depend while not disturbing other machine usage:
160 .Bd -literal -offset indent -compact
161 .Sy "idprio 31 make depend"
166 execute a command, the exit value is that of the command executed.
169 exits 0 on success, and 1 for all other errors.
182 but is similar to the HP-UX version.
185 .An Henrik Vestergaard Draboel Aq hvd@terry.ping.dk
186 is the original author.
188 implementation was substantially rewritten by
191 You can lock yourself out of the system by placing a cpu-heavy
192 process in a realtime priority.
194 There is no way to set/view the realtime priority of process 0
200 no way to ensure that a process page is present in memory therefore
201 the process may be stopped for pagein (see
207 system calls are currently never preempted, therefore non-realtime
208 processes can starve realtime processes, or idletime processes can
209 starve normal priority processes.