Linux priocntl command

Updated: 05/04/2019 by Computer Hope
priocntl command

On the Solaris operating system, the priocntl command displays or sets the scheduling parameters of the specified processes.

Syntax

priocntl [-l] [-d] [-s] [-e] [-i idType] [idlist] [-c class] 
          [class-specific-options] [arguments]
-l Display a list of the classes currently configured in the system with class-specific information about each class. The format of the class specific information displayed is described below.
-d Display the scheduling parameters associated with a set of processes.
-s Set the scheduling parameters associated with a set of processes.
-e Execute a specified command with the class and scheduling parameters associated with a set of processes.
-i idType This option together with the idlist arguments (if any), specify one or more processes to which the priocntl command is to apply. The interpretation of idlist depends on the value of idType. The valid idType arguments and corresponding interpretations of idlist are as follows:

-i pid idlist is a list of process IDs. The priocntl command applies to the specified processes.
-i ppid idlist is a list of parent process IDs. The priocntl command applies to all processes of a parent process ID.
-i pgid idlist is a list of process group IDs. The priocntl command applies to all processes in the specified process groups.
-i sid idlist is a list of session IDs. The priocntl command applies to all processes in the specified sessions.
-i class idlist consists of a single class name (RT for real-time or TS for time-sharing or IA for inter-active). The priocntl command applies to all processes in the specified class.
-i uid idlist is a list of user IDs. The priocntl command applies to all processes with an effective user ID equal to an ID from the list.
-i gid idlist is a list of group IDs. The priocntl command applies to all processes with an effective group ID equal to an ID from the list.
-i all The priocntl command applies to all existing processes. No idlist should be specified (if one is it is ignored). The permission restrictions described below still apply.

If the -i idType option is omitted when using the -d or -s options the default idType of pid is assumed.

-c class Specifies the class to be set. (The valid class arguments are RT for real-time or TS for time-sharing or IA for interactive.) If the specified class is not already configured, it automatically configures.
class-specific-options The valid class-specific options for setting real-time parameters are:

-p rtpri Set the real-time priority of the specified process(es) to rtpri.
-t tqntm [-r res] Set the time quantum of the specified process(es) to tqntm. You may optionally specify a resolution as explained below.
The valid class-specific options for setting time-sharing parameters are:

-m tsuprilim Set the user priority limit of the specified process(es) to tsuprilim.
-p tsupri Set the user priority of the specified process(es) to tsupri.
The valid class-specific options for setting inter-active parameters are:

-m iauprilim Set the user priority limit of the specified process(es) to iauprilim.
-p iaupri Set the user priority of the specified process(es) to iaupri.
arguments Additional arguments to the priocntl command.

Examples

priocntl -s -c RT -t 1 -r 10 -i idType idlist

Sets the class of any non-real-time processes selected by idType and idlist to real-time and sets their real-time priority to the default value of 0.

nice — Invoke a command with an altered scheduling priority.
ps — Report the status of a process or processes.