priocntl
瑞兹 发表于 2020-11-14 02:15浏览次数:
在Solaris操作系统上,priocntl命令显示或设置指定进程的调度参数。
On the Solaris operating system, the priocntl command displays or sets the scheduling parameters of the specified processes.
目录:
1 priocntl 运行系统环境
2 priocntl 语法
3 priocntl 例子
priocntl 运行系统环境
priocntl 语法
priocntl [-l] [-d] [-s] [-e] [-i idType] [idlist] [-c class]
[class-specific-options] [arguments]
-l
|
显示系统中当前配置的类的列表以及有关每个类的类特定信息。下面说明显示的班级特定信息的格式。
|
-d
|
显示与一组流程关联的调度参数。
|
-s
|
设置与一组流程关联的调度参数。
|
-e
|
使用与一组进程关联的类和调度参数执行指定的命令。
|
-i idType
|
此选项与idlist参数(如果有)一起指定priocntl命令将应用于的一个或多个进程。的解释IDLIST取决于价值idType。有效idType参数和相应的解释IDLIST如下:
-i pid
|
idlist是进程ID的列表。的priocntl命令适用于指定的过程。
|
-i ppid
|
idlist是父进程ID的列表。的priocntl命令适用于一个父进程ID的所有进程。
|
-i pgid
|
idlist是进程组ID的列表。的priocntl命令适用于在指定的进程组中的所有过程。
|
-i sid
|
idlist是会话ID的列表。该priocntl命令适用于指定会话的所有进程。
|
-i class
|
idlist由一个单一的类名组成(RT表示实时,TS表示分时,IA表示交互)。该priocntl命令适用于指定类的所有进程。
|
-i uid
|
idlist是用户ID的列表。的priocntl命令适用于所有进程与有效用户ID等于从列表的ID。
|
-i gid
|
idlist是组ID的列表。的priocntl命令适用于所有进程与有效组ID等于从列表的ID。
|
-i all
|
该priocntl命令适用于所有现有的流程。没有IDLIST应指定(如果是被忽略)。下文所述的权限限制仍然适用。
|
如果在使用-d或-s选项时省略了-i idType选项,则默认为pid的idType。
|
-c class
|
指定要设置的类。(有效的类参数是RT(用于实时)或TS(用于分时)或IA(用于交互)。)如果尚未配置指定的类,则将自动对其进行配置。
|
class-specific-options
|
设置实时参数的特定于类的有效选项为:
-p rtpri
|
将指定进程的实时优先级设置为rtpri。
|
-t tqntm [ -r res ]
|
将指定进程的时间量设置为tqntm。您可以选择指定分辨率,如下所述。
|
设置分时参数的有效的特定于类的选项是:
-m tsuprilim
|
将指定进程的用户优先级限制设置为tsuprilim。
|
-p tsupri
|
将指定进程的用户优先级设置为tsupri。
|
用于设置交互参数的特定于类的有效选项是:
-m iauprilim
|
将指定进程的用户优先级限制设置为iauprilim。
|
-p iaupri
|
将指定进程的用户优先级设置为iaupri。
|
|
arguments
|
priocntl命令的其他参数。
|
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 along 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 will automatically be configured.
|
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.
|
priocntl 例子
priocntl -s -c RT -t 1 -r 10 -i idType idlist
设置类通过选择任何非实时进程的idType和IDLIST实时,将它们的实时优先默认值0。
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.