chrt command

Sets scheduler policy and priority for a running process or new command

Typical usage: system administration

Introduction into chrt

The chrt command can be used to change the policy and priority for the Linux scheduler that is applied to a running process or set it when running a new command. The command can also be used to display the current policy and priority.

Installation

When chrt is not installed by default, it can be added to the system using the relevant software package.

Package information for chrt

Operating systemPackage nameInstallation
AlmaLinuxutil-linux-core
dnf install util-linux-core
Arch Linuxutil-linux
pacman -S util-linux
Debianutil-linux
apt install util-linux
Fedorautil-linux-core
dnf install util-linux-core
Red Hat Enterprise Linuxutil-linux-core
dnf install util-linux-core
Rocky Linuxutil-linux-core
dnf install util-linux-core
openSUSEutil-linux
zypper install util-linux
Ubuntuutil-linux
apt install util-linux

Your Linux distribution using a different package? Share your feedback.

Usage

Available options

Long optionShort optionDescription
--batch-bUse SCHED_BATCH policy, scheduling for batch processes
--fifo-fUse SCHED_FIFO policy (first in, first out)
--idle-iUse SCHED_IDLE policy, for very low priority jobs
--other-oUse SCHED_NORMAL (SCHED_OTHER) policy, default time-sharing for Linux
--rr-rUse SCHED_RR, round-robin scheduling

Missing an option in this overview? Share your feedback.

Examples using chrt

Show the assigned policy and priority for process ID 1234

chrt --pid 1234

Runs a command with a fairly low priority as a batch task (SCHED_BATCH)

chrt --batch 0 ls -l

Assign SCHED_OTHER policy with priority 0 for process ID 1234

chrt --other --pid 0 1234

Frequently Asked Questions

What is the chrt command and its purpose?

The chrt command is a command-line tool on Linux to set or change the scheduler policy and priority.

Which package provides the chrt command?

The command chrt is provided by the util-linux or util-linux-core package.

Related and similar commands

Linux has a lot of tools and commands available and sometimes you just need that little other tool. Here is a list of commands that are similar or related to chrt:

Related and similar commands to chrt
CommandCategorySummary
basenamefilesStrips directory and file name suffix from a given path
capshcapabilitiesLinux capabilities testing and debugging tool
captestcapabilitiesCapabilities and privilege escalation testing tool
dmesgloggingShows kernel log messages
filecapcapabilitiesDisplay of Linux capabilities set on binaries in paths
firejailsandboxingSandboxing tool for Linux
getcapcapabilitiesShow file capabilities
getpcapscapabilitiesShow process capabilities
killprocessesSending signals to processes
lsnsnamespacesShows used namespaces
lsusbcapabilitiesShow USB devices
netcapcapabilitiesDisplay available capabilities for running processes using network sockets
niceprocessesRuns commands with specified priority
numactlprocessesControls NUMA policy for processes and shared memory
peekfdprocessesTracks a process and show file descriptor activity
pidofprocessesReturns process IDs for a process name
pidstatmonitoringMonitoring CPU, memory, and disk activity
pidwaitprocessesWait for process to stop
pmapprocessesShows memory mapping of process
prtstatprocessesShows process details for selected process like state, CPU and memory usage
pscapcapabilitiesDisplay available capabilities for running processes
pslogloggingShows which log files a process has opened
pstreeprocessesShow active processes and children like a tree
pwdxprocessesShows current working directory of a process
reniceprocessesChanges the priority of running processes
setcapcapabilitiesAdd or remove Linux capabilities to a file
slabtopmemoryShows slab usage of kernel
smemmemoryShow memory usage including swap
straceprocess inspectionInspects running process
unamesystem informationShows basic system information
unitsdata conversionConverts a unit into another one, like from Celcius to Fahrenheit
watchprocessesMonitors changes in output of specified command