PRIOCNTL(1) | User Commands | PRIOCNTL(1) |
priocntl - process scheduler control
priocntl -l
priocntl -d [-i idtype] [idlist]
priocntl -s [-c class] [c.s.o.]
[-i idtype] [idlist]
priocntl -e [-c class] [c.s.o.]
command [argument(s)]
The priocntl command sets or displays scheduling parameters for a set of processes. Every running process is member of a scheduling class. Standard scheduling classes are:
The process usually requires privilegue to get into one of the real time scheduling classes. If a process tries this but lacks the privilegue, it will be put into the isochronous class instead.
See sched_setscheduler(2) for further detail on scheduling classes.
With the -l option, a list of all available scheduling classes is printed along with the associated parameters for each class.
The -d option causes the current scheduling parameters for a set of processes to be printed.
The -s option allows to alter the scheduling parameters for a set of processes. To change the parameters of the init process (process ID 1), the -i pid option must be specified with 1 appearing in idlist.
If the -e option is used, command is executed with the given scheduling parameters.
The idlist arguments specify the set of processes to be selected for the -d and -s options. They are normally interpreted as process IDs; the -i option can be used to alter their meaning, according to the following arguments:
If an -i option is present but no idlist is specified, the process ID, parent process ID etc. of the priocntl command itself is used.
The -c option allows to select a scheduling class for processes with the -s and -e options (see above for the explanation of valid classes).
The class-specific option is currently -p priority for all scheduling classes; it allows to set the base or scheduling priority for the process, as described above.
nice(1), renice(1), sched_setscheduler(2), setpriority(2)
Due to the lack of a priocntl() system call on Linux and FreeBSD, selection of processes is performed in user space, and there is a time gap between selection and the operation of parameter setting with the -s option. For an idlist of other than a single process id, it is thus possible that the priocntl command misses processes that are created at the time it is running, without being able to inform the user if this has happened.
The batch class and the isochronous class are not available on FreeBSD and are currently not part of the mainline Linux kernel; Con Kolivas' patch set adds support for them.
9/25/04 | Heirloom Toolchest |