plimit - 実行中のプロセスのリソース制限の取得または設定
plimit [-hkm] [--scale[=item1,,item2,...]] pid...
plimit {-cdfnstv [soft][,hard]}... pid...
cdfnstv オプションが 1 つ以上指定された場合、plimit は、プロセス ID リスト pid によって識別されるプロセスの指定されたリソースのソフト (現在値) 制限およびハード (最大値) 制限を設定します。Otherwise plimit reports the resource limits of the processes identified by the process-ID list, pid.
The owner of a process is permitted to either get or set the resource limits of a process, unless the process has the {PRIV_PROC_SENSITIVE} flag set (see the getpflags(2) man page).The {PRIV_PROC_OWNER} privilege is required to get or set the resource limits of a process which is either owned by another uid or has the {PRIV_PROC_SENSITIVE} flag set.The {PRIV_SYS_RESOURCE} privilege is required to increase a hard limit.
サポートしているオプションは、次のとおりです。
On output, file and memory sizes are scaled to a human readable format.The –h option is equivalent to using the –scale=max,1024 option.
ファイルサイズを 512 バイトブロックではなくキロバイト (1024 バイト) で出力に表示します。
ファイルサイズとメモリーサイズをメガバイト (1024*1024 バイト) で出力に表示します。
On output, file and memory sizes are scaled to a human readable format, for example, 14K, 234M, 2.7G, or 3.0T.Scaling is done by repetitively dividing by 1024, unless otherwise specified.
–scale specified without arguments enables default scaled output, and is equivalent to –scale=max,1024.
–scale can be specified with the following arguments.
Scaling is done by repetitively dividing by a scale factor of 1024.The use of binary scaling is indicated by the addition of an 'i' modifier to the suffix (Ki, Mi, Gi, ...).
Values are scaled to the largest unit for which the result retains a non-zero integer part.Up to 2 decimal places of fractional output may be shown.
Values are scaled to the smallest unit capable of showing the full value within the allotted space of 5 columns, and displayed without the use of fractional output.
Values are scaled to the smallest unit capable of showing the full value within the allotted space of 8 columns, and displayed without the use of fractional output.
Scaling is done by repetitively dividing by a scale factor of 1000.
Scaling is done by repetitively dividing by a scale factor of 1024.
使用法に関するメッセージを出力したあと、すぐに終了します。
残りのオプションは、指定されたリソース制限を変更するために使用します。これらは次の形式の引数を受け入れます。
soft,hard
ここで、soft は弱い (現在値) 制限、hard は強い (最大値) 制限を指定します。強い制限を指定しない場合は、コンマを省略できます。弱い制限が空の文字列である場合は、強い制限のみが設定されます。Each limit can have one of the following forms:
The literal string unlimited indicates that no limit applies to the given resource.
A plain number, with an optional fraction and scale factor.When specifying CPU time, the h or m scale factors can be applied, indicating hours or minutes respectively.When specifying file or memory sizes, the k, m, g, t, p, and e scale factors can be specified, denoting kilobytes, megabytes, gigabytes, terabytes, petabytes, or exabytes, respectively.
Minutes and seconds (for CPU time only).
弱い制限は強い制限を超えることができません。
コアファイルサイズの制限を設定します (デフォルトの単位は 512 バイトブロック)。
データセグメント (ヒープ) サイズの制限を設定します (デフォルトの単位はキロバイト)。
ファイルサイズの制限を設定します (デフォルトの単位は 512 バイトブロック)。
ファイル記述子の制限を設定します (デフォルトの単位はありません)。
スタックセグメントのサイズの制限を設定します (デフォルトの単位はキロバイト)。
CPU 時間の制限を設定します (デフォルトの単位は秒)。
仮想メモリーサイズの制限を設定します (デフォルトの単位はキロバイト)。
次のオペランドがサポートされています。
Process ID list.May be specified as a numeric id or /proc/pid.
The following example sets the file descriptor soft limit to 1024 and does not change the hard limit, for process id 5114:
$ plimit -n 1024 5114
Note that some programs do not check if the number of file descriptors they can use has changed while running and may continue to use to the number they had at startup.
使用例 2 Setting a limit for all running processesThe following example sets the maximum core dump size (both soft and hard limits) to zero bytes for all processes running on the system:
# plimit -c 0,0 /proc/*
plimit は、成功した場合はゼロ、失敗した場合 (該当するプロセスがない、アクセス権が拒否された、オプションが無効など) はゼロ以外の終了値を返します。
プロセス情報および制御ファイル
属性についての詳細は、マニュアルページの attributes(7) を参照してください。
|
proc(1), ulimit(1), getpflags(2), getrlimit(2), setrlimit(2), proc(5), attributes(7), privileges(7)
The –h and –-scale options were added in Oracle Solaris 11.4.42.
The plimit command was added in Solaris 7.