Linux repositories inspector


Apr 2003


Scripts for controlling scheduling priorities of system threads


rtctl - manipulate real-time attributes for groups of processes


rtctl [--file filename] set groupname prio sched
rtctl [--file filename] reset groupname
rtctl [--file filename] show groupname [ps-fmt]


rtctl(1) sets or shows the real-time scheduling attributes for a group of processes. Processes are grouped together by name as defined in a configuration file. Both policy and priority can be set and retrieved.


--file specifies a configuration file. The default configuration file is /etc/rtgroups. The FILES section describes how to create configuration files targeting specific kernel versions. When no suitable configuration file is found, the default action is to leave the priorities untouched.
specifies the group or processes to operate on. The group names are defined in the configuration file.
prio specifies the process priority.
sched specifies the scheduling policy (one of fifo(SCHED_FIFO), rr(SCHED_RR), batch(SCHED_BATCH),or other(SCHED_OTHER).
ps-fmt specifies the format of the process listing output by the show command. This is the same format used by the ps -o option.


To set real-time attributes of a group of processes:
rtctl [--file filename] set groupname prio sched
To reset real-time attributes of a group of processes to default values:
rtctl [--file filename] reset groupname
To show process listing of a group of processes:
rtctl [--file filename] show groupname [ps-fmt]


A user must possess CAP_SYS_NICE to change the scheduling attributes of a process. Any user can retrieve the scheduling information.


Written by Mark Salter.


Report bugs to <>.


Copyright © 2007 Red Hat, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


The configuration can be defined for a specific kernel or as a default configuration for all kernels. Only one configuration file is used and the priority order is: specific or, if there is no matching kernel version configuration file, default.
In order to create a configuration file that is specific to a given kernel version, the desired version (the result of "uname -r" for that kernel) must be added as a suffix to the /etc/rtgroups file name.
If the kernel in use is kernel-rt-3.10.0-217.rt56.127.el7, the search order would be:


chrt(1) ps(1) rtgroups(5)
See sched_setscheduler(2) for a description of the Linux scheduling scheme.


⇧ Top