|
|
The priocntl command comes in four forms:
$ priocntl -l CONFIGURED CLASSES ==================SYS (System Class)
FC (Time sharing) Configured FC User Priority Range: -30 through 30
TS (Time Sharing) Configured TS User Priority Range: -20 through 20
FP (Fixed Priority) Maximum Configured FP Priority: 59
priocntl -d -i idtype idlistidtype tells what kind of IDs are in idlist. idlist is a list of IDs separated by white space. Here are the valid values for idtype and their corresponding ID types in idlist:
idtype | idlist |
---|---|
lwpid | LWP IDs |
pid | process IDs |
ppid | parent process IDs |
pgid | process group IDs |
sid | session IDs |
class | class names (TS or FP) |
uid | effective user IDs |
gid | effective group IDs |
all |
Here are some examples of the -d option of priocntl:
$ # display info on all processes and LWPs $ priocntl -d -i all . . . $ # display info on all time-sharing processes and LWPs: $ priocntl -d -i class TS . . . $ # display info on all processes and LWPs with user ID 103 or 6626 $ priocntl -d -i uid 103 6626 . . .
priocntl -s -c class class_options -i idtype islistidtype and idlist are the same as for the -d option described above.
class is TS for time-sharing or FP for fixed priority. You must have appropriate privilege to create a fixed priority process or LWP, to raise a time-sharing user priority above a per-process or LWP limit, or to raise the per-process or LWP limit above zero. Class options are class-specific:
Class-specific options for priocntl
Class | -c class | Options | Meaning |
---|---|---|---|
fixed priority | FP |
-p pri
-t tslc -r res |
priority
time slice resolution |
time-sharing | TS |
-p upri
-m uprilim |
user priority
user priority limit |
fixed class | FC |
-p upri
-m uprilim |
user priority
user priority limit |
For a fixed priority process or LWP you may assign a priority and a time slice.
If you change a time-sharing process or LWP into a fixed priority process or LWP, it gets a default priority and time slice if you do not specify one. If you want to change only the priority of a fixed priority process or LWP and leave its time slice unchanged, omit the -t option. If you want to change only the time slice of a fixed priority process or LWP and leave its priority unchanged, omit the -p option.
For a time-sharing process or LWP you may assign a user priority and a user priority limit.
Both the user priority and the user priority limit must be within the user priority range reported by the priocntl -l command. The default range is -20 to +20.
There is no limit for the number of times a process or LWP may lower and raise its user priority, as long as the value is below its user priority limit. As a courtesy to other users, lower your user priority for big chunks of low-priority work. However, remember that if you lower your user priority limit, you must have appropriate privilege to raise it. A typical use of the user priority limit is to reduce permanently the priority of child processes or LWPs, or another set of low-priority processes or LWPs.
The user priority can never be greater than the user priority limit. If you set the user priority limit below the user priority, the user priority is lowered to the new user priority limit. If you attempt to set the user priority above the user priority limit, the user priority is set to the user priority limit.
Here are some examples of the -s option of priocntl:
# # make process with ID 24668 a fixed priority process with default parameters: # priocntl -s -c FP -i pid 24668# # make 3608 FP with priority 55 and a one-fifth second time slice: # priocntl -s -c FP -p 55 -t 1 -r 5 -i pid 3608
# # change all processes or LWPs into time-sharing processes or LWPs: # priocntl -s -c TS -i all
# # for uid 1122, reduce TS user priority and user priority limit to -10: # priocntl -s -c TS -p -10 -m -10 -i uid 1122
priocntl -e -c class class_options command [command arguments]The class and class options are the same as for the -s option described above.
# # start a fixed priority shell with default fixed priority: # priocntl -e -c FP /bin/sh$ # run make with a time-sharing user priority of -10: $ priocntl -e -c TS -p -10 make bigprog
The priocntl command subsumes the function of nice, which continues to work as in previous releases. nice works only on time-sharing processes and LWPs and uses higher numbers to assign lower priorities. The final example above is equivalent to using nice to set an ``increment'' of 10:
nice -10 make bigprog