chrt
Manipulate real-time scheduling attributes of processes
TLDR
Display scheduling attributes of a process
SYNOPSIS
chrt [options] priority command [argument...]
chrt [options] -p [priority] PID
DESCRIPTION
chrt sets or retrieves the real-time scheduling attributes of an existing process, or runs a command with specified scheduling attributes. It supports various Linux scheduling policies including FIFO, round-robin, batch, idle, and deadline.
Real-time scheduling policies (SCHEDFIFO, SCHEDRR) give processes priority over normal tasks, which is critical for time-sensitive applications like audio processing, industrial control, and high-frequency trading. Non-real-time policies (SCHEDBATCH, SCHEDIDLE) are useful for background workloads that should yield to interactive processes.
The tool is part of the util-linux package and operates via the sched_setscheduler(2) and sched_setattr(2) system calls.
PARAMETERS
-p, --pid
Operate on an existing PID without launching a new task-a, --all-tasks
Set or retrieve scheduling attributes for all threads of a PID-m, --max
Show minimum and maximum valid priorities for each policy-v, --verbose
Show status information-R, --reset-on-fork
Children do not inherit privileged scheduling policies-o, --other
Set SCHED_OTHER policy (default Linux time-sharing)-f, --fifo
Set SCHED_FIFO policy (first in-first out)-r, --rr
Set SCHED_RR policy (round-robin, default when no policy given)-b, --batch
Set SCHED_BATCH policy for batch processing (priority must be 0)-i, --idle
Set SCHED_IDLE policy for very low priority tasks (priority must be 0)-d, --deadline
Set SCHED_DEADLINE policy for sporadic deadline scheduling (priority must be 0)
CAVEATS
Users require CAPSYSNICE capability to modify scheduling attributes. SCHEDBATCH, SCHEDIDLE, and SCHEDDEADLINE policies require priority 0. Only SCHEDFIFO, SCHEDOTHER, and SCHEDRR are part of POSIX 1003.1b.
HISTORY
chrt is part of the util-linux package, providing real-time process scheduling control since Linux 2.6.
