Oracle® Solaris 11.2 Programming Interfaces Guide

Exit Print View

Updated: July 2014
 
 

priocntl Usage

The priocntl(1) utility performs four different control interfaces on the scheduling of a process:

priocntl -l

Displays configuration information

priocntl -d

Displays the scheduling parameters of processes

priocntl -s

Sets the scheduling parameters of processes

priocntl -e

Executes a command with the specified scheduling parameters

The following examples demonstrate the use of priocntl(1).

  • The -l option for the default configuration produces the following output:

    $ priocntl -l
    CONFIGURED CLASSES
    ==================
    
    SYS (System Class)
    
    TS (Time Sharing)
    Configured TS User Priority Range -60 through 60
    
    RT (Real Time)
    Maximum Configured RT Priority: 59
  • To display information on all processes, do the following:

    $ priocntl -d -i all
  • To display information on all time-sharing processes:

    $ priocntl -d -i class TS
  • To display information on all processes with user ID 103 or 6626, do the following:

    $ priocntl -d -i uid 103 6626
  • To make the process with ID 24668 a real-time process with default parameters, do the following:

    $ priocntl -s -c RT -i pid 24668
  • To make 3608 RT with priority 55 and a one-fifth second time slice:

    $ priocntl -s -c RT -p 55 -t 1 -r 5 -i pid 3608
  • To change all processes into time-sharing processes, do the following:

    $ priocntl -s -c TS -i all
  • To reduce TS user priority and user priority limit to -10 for uid 1122:

    $ priocntl -s -c TS -p -10 -m -10 -i uid 1122
  • To start a real-time shell with default real-time priority, do the following:

    $ priocntl -e -c RT /bin/sh
  • To run make with a time-sharing user priority of -10, do the following:

    $ priocntl -e -c TS -p -10 make bigprog

priocntl(1) includes the interface of nice(1). nice works only on time-sharing processes and uses higher numbers to assign lower priorities. The previous example is equivalent to using nice(1) to set an increment of 10:

$ nice -10 make bigprog