Go to main content

マニュアルページ セクション 1: ユーザーコマンド

印刷ビューの終了

更新: 2022年7月27日
 
 

zonestat(1)

名前

zonestat - アクティブなゾーン統計の報告

形式

zonestat [-z zonelist
] [-r reslist] [
-n namelist] [-T u | d | i]
   [-R reports] [-q] [
-x] [-b brandlist] [-p [-P lines]]
   [-S cols] interval [
duration [report]]

説明

The zonestat utility reports on the CPU, memory, networking, and resource control utilization of the currently running zones.各ゾーンの使用率は、システムのリソースとゾーンの構成済み制限の両方の割合 (パーセント) として報告されます。

zonestat ユーティリティーは、指定された間隔で一連の間隔レポートを出力します。また、指定された間隔で 1 つ以上のサマリーレポートも任意で出力します。

The default output is a summary of CPU, physical and virtual memory, and networking utilization.–r オプションを使用すると、特定のリソースに関する詳細な出力を選択できます。

セキュリティー

非大域ゾーン (NGZ) から実行すると、NGZ から参照可能な pset のみが報告されます。NGZ の出力には、メモリーや制限などのその他のすべてのシステムリソースが含まれます。

For all reported resources, the per-NGZ use is reported.Use of each resource by the system itself, i.e. that cannot be attributed to a particular zone, is reported as [system].

Inside a solaris-kz brand zone, only that zone's resource use is visible.

zonestat ユーティリティーを使用するには、proc_info 特権が必要です。この特権は、基本特権セットのメンバーです。

オプション

サポートしているオプションは、次のとおりです。

–n name[,name]

Specify a list of resource names on which to report.pset リソースでは、これは pset の名前です。physical-memory 、locked-memory、および virtual-memory リソースでは、名前は mem_default および vm_default のみです。ネットワークリソースでは、これはデータリンクの名前です。

Dedicated-cpu psets can be specified by their dedicated-cpu pset name (SYSzone_<zonename>) or by just their zonename.Psets created by psrset can be specified by their psrset pset name (SYSpsrset_<id>), or just by their pset id.See resource-management(7) for more information on existing types of pools and psets.

sysstats および fsstats の場合、それらに属するすべてのリソース名を名前に使用できます。この場合、名前で指定した列だけが出力されます。See example 7.

リソースセットについて報告するときは、コンマ区切りリストに加えて複数の –n オプションを指定できます。

–p

Parsable output.

安定した機械解析可能な形式を使用して出力します。各フィールドはコロン (:) で区切ります。行形式は次のとおりです。

report type:resource:field[:field]*

If the –T is specified, each line is prefixed with a timestamp:

The report types are: report-total, report-average, report-high, and interval.

For the list of existing resource types, see the –r option.

On top of the resource types defined with the –r option, the header resource is a special resource used to start the beginning of an interval or a summary report.All output lines between header resources belong to the same report.The header resource type cannot be used with the –r option.

The remaining fields are resource type specific and, save for exceptions listed below, the ordering of the fields reflects the ordering of columns in the default output for each resource type.詳細は、zonestat ユーティリティーの出力を参照してください。

For the summary resource, the remaining fields are as follows (see the OUTPUT section below for the explanation of the column headings):

line type (see –P):USED CPU:%PART:%CAP:%SHRU:USED PhysMem:
    %USED PhysMem:%CAP PhysMem:USED VirtMem:%USED VirtMem:
    %CAP VirtMem:PBYTE:%PUSE:STLN:%STLN

For the network resource, the remaining fields are as follows, for the default and extended (option –x) output, respectively:

<zone view>:zonename:RBYTE:OBYTE:TOBYTE:MAXBW:%MAXBW:
    PRBYTE:%PRBYTE:POBYTE:%POBYTE

<link view>:linkname:zonename:RBYTE:OBYTE:TOBYTE:MAXBW:%MAXBW:
    PRBYTE:%PRBYTE:POBYTE:%POBYTE

For the processor-set resource, the remaining fields are as follows:

pset type:pset ID:line type (see –P):USED CPU:%USED CPU:CAP:%CAP:
    SHRS:%SHR:%SHRU:USED CPU time [H]H-MM-SS.SS:STLN:%STLN

既存のすべての出力フィールドは安定しています。将来のバージョンでは、新しい報告タイプおよびリソースタイプが導入される可能性があります。Future versions might also add additional new fields to the end of existing output lines.

Running in a global zone, the statistics provided for solaris-kz brand zones are from the host point of view, and may differ from those reported within the zone; see solaris-kz(7).

–P line[,line]

For parsable output, specify lines to output.次の行のタイプから 1 つ以上を選択できます。

header

Each interval and summary report has a header, which prints details such as the interval timestamp, interval number, and the seconds count.If the header line is chosen, each interval is also finalized with a footer.

resource

The lines specifying each resource limit, if applicable.For example, there are no limits specified for resources sysstats and fsstats.

system

システムによる各リソースの使用率。これには、カーネル、および特定のゾーンに関与することのない、すべてのリソース消費が含まれます。zonestat が非大域ゾーン内から実行される場合、この値はシステムおよびその他のすべてのゾーンで消費される総リソースとなります。ネットワークリソースタイプの system 使用率はサポートされていません。

total

各リソースの合計使用率。

zones

各リソースのゾーンごとの使用率を詳細に示す行。

By default, all lines are present in the parsable output.

–q

静寂モード。サマリーレポートのみを出力します (–R オプションが必要)。すべての間隔レポートは省略されます。

–r resource[ ,resource]

報告するリソースタイプを指定します。設定可能なリソースは、physical-memoryvirtual-memorylocked-memoryprocessor-setprocesseslwpsshm-memoryshm-idssem-idsmsg-idslofinetworksysstatsfsstats です。

In particular, sysstats shows number of total syscall, forks, vforks, fork-fails, exec, semops, while fsstats shows number of read calls, write calls, bytes read by rdwr(), bytes written by rdwr(), and the number of pathname lookups.

Additional resource names are available to provide some common resource output combinations:

summary

A summary of CPU, physical-memory, virtual-memory, and network usage is printed.

memory

An alias for "physical-memory,virtual-memory,locked-memory".

psets

Same as processor-set.

default-pset

The default pset only is reported.

limits

An alias for "processes,lwps,lofi".

sysv

An alias for "shm-memory,shm-ids,sem-ids,msg-ids".

all

All resource types.

By default the summary resource is printed.

In addition to a comma-separated list, multiple –r options can be specified to report on a set of resources types.

The system's CPUs can be partitioned into psets.By default, all CPUs are in a single pset named pset_default.

メモリーはセットへのパーティション化には対応していません。The zonestat utility output for these resources shows them as named mem_default and vm_default.

The all resource specifies that all resource types should be reported.

–b brand[,brand]

このオプションで指定されたブランドのみを表示します。

–R report[,report]

サマリーレポートを出力します。サポートされる報告タイプについては、下記を参照してください。In addition to a comma-separated list, multiple –R options can be specified for a set of summary reports.

total

リソースごとに、次の詳細を示すサマリーレポートを出力します。

psets

Total CPU used since start of command invocation.各ゾーンで使用される割合には、ゾーンが実行されていなかった時間も含まれます。For instance, if a zone used 100% of the CPU while it was running, but the zone was halted for half of the intervals, then the summary report shows the zone used 50% of the CPU time.

memory, limits, sysv

コマンド呼び出し以降に報告されたすべての間隔で使用された平均リソース。この平均の計算には、ゾーンが実行されなかった間隔も含まれます。たとえば、ゾーンが実行中に平均で 100M の物理メモリーを使用しても、間隔の半分でしか実行していなかった場合、サマリーレポートにはゾーンが平均で 50M の物理メモリーを使用したことが示されます。

network

物理帯域幅を使用しているすべてのデータリンクによって送受信された全バイト数の合計合計はコマンドの呼び出しが開始されてから計算され、秒あたりのバイト数に標準化されます。使用された割合は、使用可能な合計帯域幅に基づいて計算されます。

sysstats, fsstats

Sum of resources used by all CPUs visible to the zone.

average

total と同様ですが、ゾーンが実行されている間隔のみが計算に含まれます。たとえば、ゾーンが単一の間隔のみで実行されていて、その間隔中にゾーンが 200M の仮想メモリーを使用した場合、サマリーレポート前に報告された間隔の数に関係なく平均仮想メモリーは 200M になります。

high

zonestat ユーティリティー呼び出しの間隔中に、各リソースおよびゾーンの最大使用量を詳細に示すサマリーレポートを出力します。

–S col[,col]

各リソースを利用するゾーンをソートします。

次のソート列を指定できます。

name

ゾーン名で英数字順にソートします。

used

使用されるリソースの数量でソートします。ネットワークリソースでは、これはバイトでソートした場合と同じです。

これはデフォルトです。

cap

構成されている上限でソートします。

pcap

使用されている上限の割合 (パーセント) でソートします。

shr

割り当てられている共有でソートします。

pshru

使用されている共有の割合 (パーセント) でソートします。

bytes

送受信された合計バイト数でネットワークをソートします。

prbyte

有線で受信されたバイト数の割合でネットワークをソートします。

pobyte

有線で送信されたバイト数の割合でネットワークをソートします。

maxbw

使用された帯域幅の割合でネットワークをソートします。

cpu

Sort by CPU usage in the summary output.これはデフォルトです。

physical-memory

Sort by physical memory usage in the summary output.

virtual-memory

Sort by virtual memory usage in the summary output.

network

Sort by network usage in the summary output.

exec, fork, fork-fail, name-lookup, read, readbyte, sema, syscall, vfork, write, writebyte

使用される対応したリソースの数量でソートします。

–T u | d | i

各レポートのタイムスタンプを含みます。次の形式がサポートされています。

d

Standard date format.date(1) を参照してください。–p オプションと同時には使用できません。

i

ISO 8601 に準拠する形式としてフォーマットされた時間。

YYYYMMDDThhmmssZ
u

時間の内部表現の出力表現。See time(2).Unix 時間とも呼ばれます。

–x

拡張表示で詳細情報を表示します。たとえば、ネットワークリソースで使用した場合、拡張表示には各仮想データリンクの詳細が一覧表示されます。

–z zonename[ ,zonename]

報告するゾーンの一覧を指定します。デフォルトでは、すべてのゾーンが報告されます。

ゾーンセットについて報告するときは、コンマ区切りリストに加えて複数の –z オプションを指定できます。出力には、指定されたゾーンで使用されたリソースが含まれます。

オペランド

次のオペランドがサポートされています。

interval

各間隔レポート間で一時停止する長さを秒数で指定します。「デフォルト」の間隔では、ゾーン監視サービスの構成済み間隔が使用されます。zonestatd(8) を参照してください。

interval は必須です。ゼロの間隔は許可されていません。間隔は、10s1m のように、[nh][nm][ns] の形式で指定できます。

duration

報告する間隔の数を指定します。指定しない場合、デフォルトでは infinity に設定されます。コマンド期間は (interval * duration) です。ゼロの期間は無効です。値 inf を指定して、明示的に infinity を選択することもできます。

期間は、[nh][ nm][ns] の形式でも指定できます。この場合、期間は実行時間の期間であると解釈されます。実際の期間は、間隔のもっとも近い倍数に切り上げられます。

report

サマリーレポート期間を指定します。たとえば、4 のレポートでは 4 間隔ごとに報告が生成されます。コマンド期間が報告の倍数ではない場合、最後の報告は残りの間隔に属します。

報告は、[nh][nm][ns] の形式でも指定できます。この場合、レポートは指定された期間に、もっとも近い間隔に切り上げられて出力されます。コマンド期間が報告の倍数ではない場合、最後の報告は残りの間隔に属します。

Requires –R.–R が指定されていても、報告は指定されていない場合、報告期間はコマンド期間全体となり、指定された報告が実行の最後に生成されます。

出力

次の一覧には、コマンド出力の列ヘッダーが定義されています。

SYSTEM-MEMORY

物理ホストで使用可能なメモリーの合計量。

SYSTEM-LIMIT

物理ホストで使用可能なリソースの最大量。

CPUS

The number of CPUs allocated to a pset

ONLINE

Of the CPUs allocated to a pset, the number of CPUs which can execute processes.

MIN/MAX

The minimum and maximum number of CPUs which can be allocated to the pset by the system.

ZONE

リソースを使用しているゾーン。この列には、ゾーン名に加えて次のものを含めることができます。

[total]

システム全体で使用されるリソースの合計数量。

[system]

カーネルで使用されるリソース、または特定のゾーンに関連付けない方法で使用されるリソースの数量。

zonestat が非大域ゾーン内で使用される場合、[system] はシステムおよびその他のすべてのゾーンで使用される総リソースを指定します。

ネットワークリソースの場合、ネットワークのシステム使用量は使用できません。

USED

使用されているリソースの量。

%USED

合計リソースの割合 (パーセント) として使用されているリソースの量。

STLN

The amount of CPU time stolen from the zone.横取りされた時間は、一部のゾーンブランドでのみサポートされます。横取りされた時間の値には、CPU リソースをほかの目的に使用しているホストのためにゾーンを実行できなかった時間が反映されます。横取りされた時間の詳細は、solaris-kz(7) を参照してください。

[system] 行の場合は、現在のシステムの横取りされた時間が報告されます。[total] 行の場合は、現在のシステムとシステム内のすべてのゾーンの横取りされた時間の合計が報告されます。

%STLN

The amount of CPU time stolen as a percent of the total CPU time available.

%PART

The amount of CPU used as a percentage of the total CPU in a processor-set to which the zone is bound.ゾーンが大域ゾーンである場合、または psrset(8) psets が使用されている場合、ゾーンには複数の pset にバインドされたプロセスのみを含めることができます。If multiple binding are found for a zone, its %PART is the fraction used of all bound psets.For [total] and [system], %PART is the percent used of all CPUs on the system.

CAP

特定のリソースに上限を設定するようにゾーンが構成されている場合、この列にその上限が表示されます。

%CAP

ゾーンの構成済み上限の割合として使用されるリソースの量。

SHRS

ゾーンに割り当てられている共有の数。[total] 行では、リソースを共有するすべてのゾーンに割り当てられた共有の合計数です。共有を使用するようにゾーンが構成されていなくても、共有を使用するように構成されているその他のゾーンとリソースを共有している場合、この列にはゾーンの no-fss が含まれます。

%SHRS

ゾーンに割り当てられている合計共有の割合。たとえば、2 つのゾーン (それぞれ 10 共有) が 1 つの pset を共有する場合、各ゾーンの %SHR は 50% になります。

%SHRU

Of the share allocated to the zone, the actual used resource as the fraction of resource 100%.共有はリソースの競合がある場合にのみ強制されるため、ゾーンの %SHRU は 100% を超えることが可能です。

TOBYTE

The total number of bytes transmitted and received by datalinks or virtual links.

PRBYTE

物理帯域幅を消費する受信バイト数。

RBYTE

The number of received bytes.

POBYTE

物理帯域幅を消費する送信バイト数。

OBYTE

The number of transmitted bytes.

%PRBYTE

PRBYTE の受信に使用できる物理帯域幅の割合。

%POBYTE

POBYTE の送信に使用できる物理帯域幅の割合。

PBYTE

The sum of PRBYTE and POBYTE.

%PUSE

PBYTE as a percent of the total available physical bandwidth.

LINK

データリンクの名前。

MAXBW

データリンク上で構成された最大帯域幅

%MAXBW

構成済みの最大帯域幅の割合で表示したすべての送受信バイト数の合計

exec, fork, fork-fail, name-lookup, read, readbyte, sema, syscall, vfork, write, writebyte

各リソース名で使用されるリソースの量。

使用例 1 Using zonestat to display a summary of CPU and memory utilization

The following command shows a summary of CPU and memory utilization every 2 seconds for 100 intervals:

$ zonestat 2 100
Collecting data for first interval...
Interval: 1, Duration: 0:00:02
SUMMARY       Cpus/Online: 56/56    PhysMem: 255G   VirtMem: 259G
          ----------CPU---------- --PhysMem-- --VirtMem-- --PhysNet--
     ZONE  USED %PART  STLN %STLN  USED %USED  USED %USED PBYTE %PUSE
  [total]  3.43 6.13%  0.00 0.00% 30.7G 12.0% 34.0G 13.0% 9937K 0.98%
 [system]  0.03 0.06%  0.00 0.00% 19.5G 7.65% 32.6G 12.5%     -     -
   on-sru  2.54 5.53%  0.00 0.00% 10.0G 3.91% 36.3M 0.01%     0 0.00%
   tzone1  0.54 6.76%     -     -  668M 0.25%  696M 0.26%     0 0.00%
   global  0.30 0.64%     -     -  516M 0.19%  700M 0.26% 9937K 0.98%

Interval: 2, Duration: 0:00:04
SUMMARY       Cpus/Online: 56/56    PhysMem: 255G   VirtMem: 259G
          ----------CPU---------- --PhysMem-- --VirtMem-- --PhysNet--
     ZONE  USED %PART  STLN %STLN  USED %USED  USED %USED PBYTE %PUSE
  [total]  3.64 6.51%  0.00 0.00% 30.7G 12.0% 34.0G 13.0% 14.5M 1.43%
 [system]  0.00 0.00%  0.00 0.00% 19.5G 7.65% 32.5G 12.5%     -     -
   on-sru  2.32 5.05%  0.00 0.00% 10.0G 3.91% 36.3M 0.01%     0 0.00%
   global  0.71 1.48%     -     -  516M 0.19%  700M 0.26% 14.5M 1.43%
   tzone1  0.61 7.62%     -     -  688M 0.26%  716M 0.26%     0 0.00%
<output from other intervals omitted>
使用例 2 Using zonestat to produce parsable output

次のコマンドは、解析可能な出力を生成します。For each zone, it prints a line of output for every pset usable in that zone.It separates each interval by the header and footer lines:

$ zonestat -p -P header,zones -r psets 1 100
<output omitted>
使用例 3 Using zonestat to report on the default pset

次のコマンドは、デフォルトの pset について 1 秒に 1 回、1 分間を対象として報告します。

$ zonestat -r default-pset 1 1m
<output omitted>
使用例 4 Using zonestat to report total and high utilization

次のコマンドは、10 秒に 1 回、24 時間を対象としてメッセージを表示することなく監視し、1 時間ごとに合計および最大の報告を生成します。

$ zonestat -q -R total,high 10s 24h 1h
<output omitted>
使用例 5 Using zonestat to report datalink utilization

次のコマンドは、e1000g0 という名前のデータリンクについて 5 秒間隔で 5 回報告します。

$ zonestat -r network -n net0 5 5
Collecting data for first interval...
Interval: 1, Duration: 0:00:05
NETWORK-DEVICE             SPEED        STATE        TYPE
net0                    1000mbps           up        phys
               ZONE TOBYTE  MAXBW %MAXBW PRBYTE %PRBYTE POBYTE %POBYTE
            [total]  8853K      -      -  8342K   0.26%   507K   0.01%
             global  8758K      -      -  8296K   0.26%   461K   0.01%
             tzone1  93.4K      -      -  46.3K   0.00%  46.5K   0.00%
             on-sru    602      -      -      0   0.00%    346   0.00%
<output from other intervals omitted>
使用例 6 Using zonestat to report on the sysstats resources
$ zonestat -r sysstats 1 1
Collecting data for first interval...
Interval: 1, Duration: 0:00:01
SYSSTATS
	ZONE syscall  fork vfork fork-fail  exec spawn  sema
     [total]    126K   265     0         0   264     0     0
    [system]       0     0     0         0     0     0     0
      global    111K     3     0         0     3     0     0
      on-sru      22     0     0         0     0     0     0
      tzone1   14.1K   262     0         0   261     0     0
使用例 7 Using zonestat to report the number of fork, exec and name-lookup related system calls only
$ zonestat -n fork,exec,name-lookup 1 1
Collecting data for first interval...
Interval: 1, Duration: 0:00:01
SYSSTATS
		ZONE  fork  exec
	     [total]   260   260
	    [system]     0     0
	      global     2     2
	      on-sru     0     0
	      tzone1   258   258
FSSTATS
		ZONE name-lookup
	     [total]        5276
	    [system]           0
	      global          97
	      on-sru           0
	      tzone1        5179

終了ステータス

次の終了ステータスが返されます。

0

正常終了。

1

エラーが発生しました。

2

無効な使用法。

3

svc:system/zones_monitoring: デフォルトで実行なし、または応答なし。

属性

属性についての詳細は、マニュアルページの attributes(7) を参照してください。

属性タイプ
属性値
使用条件
system/zones
インタフェースの安定性
下記を参照。

コマンド呼び出しおよび解析可能な出力は「確実」です。人間が読める形式の出力 (デフォルト出力) は「不確実」です。

関連項目

attributes(7), date(1), pooladm(8), poolcfg(8), prctl(1), privileges(7), psrset(8), rcapadm(8), resource-controls(7), resource-management(7), solaris-kz(7), time(2), timezone(5), zoneadm(8), zonecfg(8), zonestatd(8)

zonestat ユーティリティーは、ゾーン監視サービス svc/system/zonestat:default に依存します。zonestat ユーティリティーの実行中に zonestat サービスが停止した場合、zonestat コマンド呼び出しは追加報告を出力せずに終了します。次の報告期間に達する前に zonestat が (CTRL/c、SIGINT によって) 中断された場合、報告 (–R) が出力されます。