PRIOCNTL(1)

NAME
priocntl - process scheduler control

SYNOPSIS
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)]

DESCRIPTION
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 time-sharing class (TS), which is usually the default. Processes in this class are scheduled according to a dynamic priority based on the adjustable base priority and fair usage principles. The base priority used with the priocntl command is the negative of the nice value (see nice(1)); higher base priorities mean a higher chance that the process is run. Base priorities range between -19 and 20.

    The real time round-robin (fixed priority) scheduling class (RT or FP). Processes that belong to this class have always a fixed higher priority than processes in the time-sharing class and are scheduled according to a priority value (1 to 99). Each process can run for a maximum time quantum and is placed at the end of the associated priority list if the time quantum is exceeded.

    The real time first in-first out scheduling class (FI), which is similar to the round-robin scheduling class except that no maximum time quantum is applied.

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:

    pid idlist is a set of process IDs (the default).

    ppid
        Causes all processes whose parent process has a process ID present in idlist to be selected.

    pgid
        Selects all processes that belong to a process group id present in idlist.

    sid Selects all processes that belong to a session whose session id is present in idlist.

    class
        idlist is interpreted as a set of scheduling classes; all processes that belong to a given class are selected.

    uid Selects all processes whose (numeric) effective user ID appears in idlist .

    gid Selects all processes whose (numeric) effective group ID appears in idlist .

    all Selects all processes currently running. The idlist arguments are ignored.

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.

SEE ALSO
nice(1), renice(1), sched_setscheduler(2), setpriority(2)

NOTES
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.