Fun with realtime scheduler (1)

Things used to be complicated with regard to setting realtime permissions on Linux (realtime-lsm and /etc/security/limits.conf). Not any more it seems!

Using chrt

If your user is in the ‘audio’ group, on 2.6.28 (or earlier) you can use this command to set or view the realtime properties of a command (it can be found int he debian util-linux package). Example: run process with SCHED_FIFO and prio 99:

chrt -f 99 command

Check existing process properties:

benjamin@laptop:~/$ chrt -p 4609
pid 4609's current scheduling policy: SCHED_FIFO
pid 4609's current scheduling priority: 99