]> git.saurik.com Git - apple/system_cmds.git/blob - taskpolicy.tproj/taskpolicy.8
system_cmds-854.11.2.tar.gz
[apple/system_cmds.git] / taskpolicy.tproj / taskpolicy.8
1 .Dd 2/21/13
2 .Dt taskpolicy 8
3 .Os Darwin
4 .Sh NAME
5 .Nm taskpolicy
6 .Nd execute a program with an altered I/O or scheduling policy or change settings of already running process
7 .Sh SYNOPSIS
8 .Nm
9 .Op Fl d Ar policy
10 .Op Fl g Ar policy
11 .Op Fl c Ar clamp
12 .Op Fl b
13 .Op Fl t Ar thruput_tier
14 .Op Fl l Ar latency_tier
15 .Op Fl a
16 .Ar program
17 .Oo
18 .Ar arg1
19 .Op Ar ...
20 .Oc
21 .Nm
22 .Op Fl b|-B
23 .Op Fl t Ar thruput_tier
24 .Op Fl l Ar latency_tier
25 .Op Fl p Ar pid
26 .Sh DESCRIPTION
27 The
28 .Nm
29 program uses the
30 .Xr setiopolicy_np 3
31 and
32 .Xr setpriority 2
33 APIs to execute a program with altered I/O or scheduling policies. All
34 children of the specified program also inherit these policies.
35 .Pp
36 .Nm
37 accepts the following flags and arguments:
38 .Bl -tag -width "d policy " -offset indent
39 .It Fl d Ar policy
40 Run the program after calling
41 .Xr setiopolicy_np 3
42 with an iotype of IOPOL_TYPE_DISK, a scope of IOPOL_SCOPE_PROCESS, and the
43 specified policy. The argument can either be an integer, or a symbolic string
44 like "default" or "throttle", which is interpreted case-insensitively.
45 .It Fl g Ar policy
46 Run the program after calling
47 .Xr setiopolicy_np 3
48 with an iotype of IOPOL_TYPE_DISK, a scope of IOPOL_SCOPE_DARWIN_BG, and the
49 specified policy. The argument is interpreted in the same manner as
50 .Fl d .
51 .It Fl c Ar clamp
52 Run the program using the specified QoS clamp. The argument can be either
53 "utility", "background", or "maintenance", which is interpreted case-insensitively.
54 .It Fl p Ar pid
55 Change settings for the process specified by
56 .Ar pid .
57 .It Fl b
58 Run the program after calling
59 .Xr setpriority 2
60 with a priority of PRIO_DARWIN_BG.
61 .It Fl B
62 Move target process out of PRIO_DARWIN_BG.
63 .It Fl t
64 Set throughput tier of the process to
65 .Ar thruput_tier .
66 .It Fl l
67 Set latency tier of the process to
68 .Ar latency_tier .
69 .It Fl a
70 Run the program with the resource management policies given to applications.
71 .El
72 .Pp
73 .Sh SEE ALSO
74 .Xr setpriority 2 ,
75 .Xr setiopolicy_np 3