NAME
taskpolicy —
execute a program with an altered I/O
or scheduling policy or change settings of already running
process
SYNOPSIS
taskpolicy |
[-d policy]
[-g policy]
[-c clamp]
[-b] [-t
thruput_tier] [-l
latency_tier] [-a]
[-s] [-S
shims] [-m
limit] [-j
pri] program
[arg1 [...]] |
taskpolicy |
[-b|-B] [-t
thruput_tier] [-l
latency_tier] [-p
pid] |
DESCRIPTION
The taskpolicy program uses the
setiopolicy_np(3) and
setpriority(2) APIs to execute a program with altered I/O or
scheduling policies. All children of the specified program also inherit
these policies.
taskpolicy accepts the following flags and
arguments:
-dpolicy- Run the program after calling setiopolicy_np(3) with an iotype of IOPOL_TYPE_DISK, a scope of IOPOL_SCOPE_PROCESS, and the specified policy. The argument can either be an integer, or a symbolic string like "default" or "throttle", which is interpreted case-insensitively.
-gpolicy- Run the program after calling
setiopolicy_np(3) with an iotype of IOPOL_TYPE_DISK, a
scope of IOPOL_SCOPE_DARWIN_BG, and the specified policy. The argument is
interpreted in the same manner as
-d. -cclamp- Run the program using the specified QoS clamp. The argument can be either "utility", "background", or "maintenance", which is interpreted case-insensitively.
-ppid- Change settings for the process specified by pid.
-mlimit- Run the program with specified memory limit (in MiB).
-jpri- Run the program at the specified jetsam priority.
-Ppcontrol- Run the program with the specified process control action, which may be invoked by the system upon resource exhaustion. Valid options include "kill", "throttle", and "suspend".
-Sshims- Run the program with security transition shims in effect.
-b- Run the program after calling setpriority(2) with a priority of PRIO_DARWIN_BG.
-B- Move target process out of PRIO_DARWIN_BG.
-t- Set throughput tier of the process to thruput_tier.
-l- Set latency tier of the process to latency_tier.
-a- Run the program with the resource management policies given to applications.
-s- Run the program with an initial suspended state by calling posix_spawnattr_setflags(3) with POSIX_SPAWN_START_SUSPENDED.
-x- Run the program with a process-scoped iopolicy that requests filesystems to perform case-sensitive path lookups.
-X- Run the program with a process-scoped iopolicy that restores the default
case-sensitivity behavior for supported filesystems. This can be used to
undo the effects of
-x.
SEE ALSO
setpriority(2), posix_spawnattr_setflags(3), setiopolicy_np(3)