pmadvise - プロセスへのメモリーに関するアドバイスの適用
pmadvise [-Flv] [-o option[,option] [--scale[=item1,item2,...]] pid...
pmadvise は、指定されたプロセスでのメモリーの使用方法に関するアドバイスを madvise(3C) を使用して適用します。
pmadvise では、特定の時点の特定のサブレンジにアドバイスを適用できます。pmadvise が madv.so.1(1) と異なるのは、madv.so.1(1) はターゲットプログラムを実行している間、指定されたタイプのすべてのセグメントにアドバイスを常時適用する点です。
サポートしているオプションは、次のとおりです。
別のプロセスが制御していても、ターゲットプロセスを捕捉して強制実行します。
–F オプションを使用する場合は注意してください。proc(1) を参照してください。
On verbose output, memory sizes are scaled to a human readable format.The –h option is equivalent to using the –scale=max,1024 option.
未解決の動的リンカーマップ名を表示します。
適用するアドバイスは次の形式で指定します。
private=advice shared=advice heap=advice stack=advice address[:length]=advice
ここで、advice には次のいずれかを指定できます。
normal random sequential willneed dontneed free access_lwp access_many access_many_pset access_default
address と length は、デバイスに適用するサブレンジを指定するために設定できます。デフォルトで、address は 16 進数、length はバイト数になります。
If length is not specified and the starting address refers to the start of a segment, the advice is applied to that segment. length can have a fractional part, and can be qualified with a K, M, G, T, P, or E scale factor, denoting kilobytes, megabytes, gigabytes, terabytes, petabytes, or exabytes respectively.
Print verbose output.pmap(1) と同様に、どのアドバイスがどこに適用されるかを出力に表示します。これは、指定した領域 (たとえば、非公開、共有など) にアドバイスを適用する場合に、アドバイスが実際に適用された場所についてのフィードバックを取得するときに役に立ちます。
On verbose output, 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.
使用法に関するメッセージを出力したあと、すぐに終了します。
pmadvise は、すべての有効なオプションの処理を試みます。不正なアドレスの範囲が指定された場合は、エラーメッセージが出力され、問題のあるオプションがスキップされます。構文エラーがある場合、pmadvise は、どのオプションも処理せずに終了し、使用法に関するメッセージを出力します。
競合するアドバイスが 1 つの領域に指定された場合、優先順位はもっとも限定されているアドバイスからもっとも限定されていない (つまり、もっとも一般的な) アドバイスの順になります。言い換えると、明示的なアドレス範囲に指定されたアドバイスは、ヒープおよびスタックへのアドバイスより優先され、ヒープおよびスタックへのアドバイスは、非公開メモリーおよび共有メモリーへのアドバイスより優先されます。
また、次の各グループに含まれるアドバイスは、同じグループ内のほかのアドバイス規則とは互いに排他的です。
MADV_NORMAL, MADV_RANDOM, MADV_SEQUENTIAL MADV_WILLNEED, MADV_DONTNEED, MADV_FREE MADV_ACCESS_DEFAULT, MADV_ACCESS_LWP, MADV_ACCESS_MANY
次のオペランドがサポートされています。
プロセス ID。
次の例では、指定されたアドレスのセグメントにアドバイスを適用します。
% pmap $$ | grep heap 00000001AEC8C000 8K rw----- [ heap ] % % pmadvise -o 78000=access_lwp $$ %使用例 2 –v オプションを使用する
次の例では、pmadvise の詳細な出力を表示します。簡略化のため、出力の一部を省略しています。
% pmadvise -o heap=access_lwp,stack=access_default -v $$ 0000000100000000 1728K r-x---- [ text ] /usr/bin/sh 00000001001B0000 56K r-x---- [ text ] /usr/bin/sh 00000001002BE000 8K rwx---- [ data ] /usr/bin/sh 00000001002C0000 64K rwx---- [ data ] /usr/bin/sh 00000001002D0000 16K rwx---- [ data ] /usr/bin/sh 0000000100300000 24K rw----- [ bss ] /usr/bin/sh 0000000EEBFC4000 8K rw----- [ heap ] <= access_lwp 0007FCB434C00000 2176K r-x---- [ text ] /lib/sparcv9/libc.so.1 ... 0007FCB435000000 704K r-x---- [ text ] /lib/sparcv9/libm.so.2 ... 0007FCB435200000 256K r-x---- [ text ] /lib/sparcv9/ld.so.1 ... 0007FCB435370000 128K rw----- [ anon ] ... FFFFFCFCE72A0000 64K rw----- [ stack ] <= access_default FFFFFCFCE72B0000 40K rw----- [ stack ] <= access_default
次の終了ステータスが返されます。
正常終了。
エラーが発生しました。
プロセスファイル
proc ツールサポートファイル
属性についての詳細は、マニュアルページの attributes(7) を参照してください。
|
コマンドの構文は「確実」です。出力形式は「不確実」です。