2 .\" Copyright (c) 2010 The DragonFly Project. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" 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
12 .\" the documentation and/or other materials provided with the
14 .\" 3. Neither the name of The DragonFly Project nor the names of its
15 .\" contributors may be used to endorse or promote products derived
16 .\" from this software without specific, prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
28 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 .Nd get/set the I/O priority
43 .Fn ioprio_get "int which" "int who"
45 .Fn ioprio_set "int which" "int who" "int prio"
51 functions get and set the I/O scheduler priority of a process, process group
52 or all processes of a user.
56 argument specifies what type of resource's priority is to be modified.
57 It can have the following values (as defined in
58 .In sys/resource.h ) :
59 .Bl -tag -width ".Dv PRIO_PROCESS"
65 All processes of a user
70 argument specifies, depending on the
72 argument, either the process ID (if
76 the process group ID (if
84 A value of 0 specifies either the current process, the current process group,
91 argument specifies the priority to be set.
92 It can range from 1 to 10, with higher numbers indicating a higher priority.
94 .Rv -std ioprio_get ioprio_set
98 function will fail if:
99 .Bl -tag -width ".Bq Er EINVAL"
101 An invalid value was specified for the
105 No corresponding process, process group or user could be found for the ID
112 function will fail if:
113 .Bl -tag -width ".Bq Er EACCES"
115 The caller isn't allowed to access the I/O priority
117 An invalid value was specified for the
121 The caller doesn't own the specified process or processes
123 No corresponding process, process group or user could be found for the ID
134 function calls first appeared in