rtsched
Purpose:
- Set the real-time scheduling policy and priority for a specified process or for a new command to be executed.
Enter:
-
rtsched <-s scheduler> <-p priority> command [arguments]
or
rtsched <-s scheduler> <-p priority> <-P pid>
Where:
-
-s scheduler
Specify one of the following scheduler policies:
- SCHED_FIFO
- SCHED_RR
- SCHED_OTHER
-p priority
Specify the task priority.
command [arguments]
Specify the command and its optional arguments to run with the specified scheduling.
-P pid Specify a currently executing process ID to set the scheduling for.
Example:
-
rtsched -s SCHED_FIFO -p 10 a.outThe above example executes file a.out with SCHED_FIFO at a priority of 10.
rtsched -s SCHED_RR -p 10 -P 23131
The above example executes the task corresponding to pid 23131 with SCHED_RR at a priority of 10.
Notes:
-
This program must run as root.