TASKPOLICY(8)
π TASKPOLICY(8) β like, the taskpolicy manual, but make it make sense π
okay bestie, welcome to taskpolicy from the System Manager's Manual section 8 β she's a lil utility with main character energy and she's about to rearrange your process's whole vibe β¨
πΈ NAME πΈ
taskpolicy β run a program with a different I/O or scheduling policy, or tweak the settings on a process that's already running π«Ά
π 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]
Two whole modes, two whole moods, we love a flexible icon π
β¨ DESCRIPTION β¨
So taskpolicy lowkey uses the setiopolicy_np(3) and setpriority(2) APIs to launch a program with altered I/O or scheduling policies. And the nepo-baby energy is real: all children of the specified program also inherit these policies. π§ Whole family gets the same treatment, periodt.
taskpolicy accepts the following flags and arguments:
-d policyβ runs the program after callingsetiopolicy_np(3)with an iotype ofIOPOL_TYPE_DISK, a scope ofIOPOL_SCOPE_PROCESS, and whatever policy you passed. The argument can be an integer, or a symbolic string like"default"or"throttle"β and it's interpreted case-insensitively, so don't stress about your caps lock π-g policyβ runs the program after callingsetiopolicy_np(3)with an iotype ofIOPOL_TYPE_DISK, a scope ofIOPOL_SCOPE_DARWIN_BG, and the policy you specified. Same deal as-dfor the argument, interpreted identically π«-c clampβ runs the program using the specified QoS clamp. The argument can be"utility","background", or"maintenance", interpreted case-insensitively ποΈ-p pidβ changes settings for the process specified by pid. That's the "already running" mode, iykyk π₯-m limitβ runs the program with the specified memory limit (in MiB) π-j priβ runs the program at the specified jetsam priority π-P pcontrolβ runs the program with the specified process control action, which the system may invoke upon resource exhaustion. Valid options include"kill","throttle", and"suspend"β so yeah, pick your fighter π-S shimsβ runs the program with security transition shims in effect π‘οΈ-bβ runs the program after callingsetpriority(2)with a priority ofPRIO_DARWIN_BGπ-Bβ moves the target process out ofPRIO_DARWIN_BG. the glow-up π¦-tβ sets the throughput tier of the process to thruput_tier β‘-lβ sets the latency tier of the process to latency_tier β±οΈ-aβ runs the program with the resource management policies given to applications π-sβ runs the program with an initial suspended state by callingposix_spawnattr_setflags(3)withPOSIX_SPAWN_START_SUSPENDEDπ§
fr fr, every single one of those is a real flag β don't come for me if you skimmed, bestie π
π SEE ALSO π
setpriority(2), posix_spawnattr_setflags(3), setiopolicy_np(3)
and that's the whole page, no cap π this lil legend lives on Darwin, dated February 21, 2013 β vintage but still iconic, and yes she's still TASKPOLICY(8) at the top and bottom of every page, slay πβ¨
π¦ where this page comes from
- nixpkgs unstable: system_cmds 1042.100.6.0.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms