Go to main content

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

印刷ビューの終了

更新: 2022年7月27日
 
 

sstore(1)

名前

sstore - 統計情報ストア管理ユーティリティー

形式

/usr/bin/sstore [-?]

/usr/bin/sstore help [subcommand]

/usr/bin/sstore capture [-aH]
	 [statid ... | -f ssid_file |
	 [interval [count]]

/usr/bin/sstore export [-F format] [-aH]
	 [[[-t start-time] [-e end-time] [-i step]] |
	 [[-t start-time] [-i step] [-p relative-pts]]]
	 [statid ... | -f ssid_file]

/usr/bin/sstore list [-F format] [-aH]
	 [[[-t start-time] [-e end-time]] |
	 [[-t start-time] [-p relative-pts]]]
	 [statid ... | -f ssid_file]

/usr/bin/sstore info [-F format] [-a]
	 [[[-t start-time] [-e end-time]] |
	 [[-t start-time] [-p relative-pts]]]
	 [statid ... | -f ssid_file]

説明

sstore コマンドは、統計情報リポジトリに格納されている統計情報およびイベント情報をキャプチャー、エクスポート、および表示する機能を提供します。

オプション

次のオプションがサポートされています。

-?

使用方法に関するメッセージを表示します。

Common Sub-Command Options

特に指定がないかぎり、すべてのサブコマンドで次のオプションがサポートされています。

–F format

代替出力形式を指定します。The value of format can be tsv (Tab Separated Values), csv (Comma Separated Values), or json (JavaScript Object Notation, formatted for readability).csv 形式の出力では、時間範囲 (–t オプションを参照) と秒単位の粒度またはステップをクエリーに含める必要があります。

CSV 出力形式については、sstore.csv(5) のマニュアルページを参照してください。JSON 出力形式については、sstore.json(5) のマニュアルページを参照してください。

–a

Makes wildcards match all entries (unstable and unbrowsable identifiers are hidden by default).The subcommand info, if specified without wildcard will list a detailed information of each identifier in the sstore.However, the subcommands export and capture strictly expect a wildcard or an SSID with this option.Refer to examples for more details on the various subcommands.

–H

出力からヘッダーを省略します。

–f ssid_file

識別子のリスト (1 行に 1 つずつ) を含むファイル、または sstore export コマンドで提供されるものと同じ JSON (JavaScript Object Notation) 形式のファイルを指定します。このオプションに直接識別子指定を組み合わせることはできません。

–t start-time

%Y-%m-%dT%H:%M:%S という書式のタイムスタンプを開始します。詳細は、strftime(3C) のマニュアルページを参照してください。キーワード now は、現在の日時を指定する場合に使用できます。特に注記がないかぎり、このオプションは指定されていなければデフォルトで epoch になります。

時間範囲を指定する方法は 2 つあります。

形式 1: -t start-time -e end-time -i step

–p なしで –t が指定された場合は、常に形式 1 と見なされます。この形式では、開始時間と終了時間を境界とし、最小粒度 step でデータが返されます。

形式 2: -t start-time -p relative-pts

形式 2 では、最大で relative-pts 個のデータポイントが返されます。粒度の保証はありません。正または負の値を指定でき、正の場合は start-time よりあとのポイントが返され、負の場合はその時間より前のポイントが返されます。

Form 3: -t start-time -i step -p relative-pts

Form 3 returns at maximum relative-pts data points with granularity of step seconds.You can specify a positive or negative value for relative-pts, which signifies whether the points returned come after or before start-time respectively.

–e end-time

タイムスタンプを終了します (書式については –t を参照)。–p なしで –t が指定された場合、このオプションは指定されていなければデフォルトで now になります。

–i step

Specifies the interval between timestamps.The step shall be specified as [n] [ns] [nm] [nh] [nd] [nw], where n is the time duration and s, m, h, d and w corresponds to seconds, minutes, hours, days and weeks respectively.For example, 10 or 10s will be 10 seconds, 5h will be 5 hours, 2d will be 2 days and 3w will be interpreted as 3 weeks.For all non-zero specifications of step, the corresponding time interval is taken and the data is interpolated such that the timestamps between points are exactly step apart.

step が 0 または未指定の場合、sstored での初期サンプリングから変更されていないタイムスタンプとともに、データが返されます。デフォルトでは、sstored は毎秒 1 回統計情報をサンプリングしようとしますが、システムの負荷によってはそれに失敗することもあります。sstored(8) のマニュアルページを参照してください。

–p relative-pts

返されるデータポイントの最大数を指定します。この値は 0 以外にする必要があります。start-time をオプションで指定できます。start-time を指定しない場合の開始時間は、デフォルトで now になります。

オペランド

statid

統計ストア識別子 (SSID)。複数の識別子を指定するには、識別子をスペースで区切るか、Using Oracle Solaris 11.4 Analyticsで説明されているワイルドカードまたはスプライスを使用します。

サブコマンド

サポートされているサブコマンドは次のとおりです。

sstore help subcommand

このコマンドは、指定された sstore サブコマンドまたはすべての sstore サブコマンドの、使用法を表示します。

特定のサブコマンドの使用法を表示するには、sstore help コマンドを使用する際に、その特定のサブコマンドを引数として指定します。

sstore help コマンドをオペランドなしで使用した場合、すべての sstore サブコマンドの使用法が表示されます。

sstore capture [–aH] [statid ... | –f ssid_file] [interval [count]]

このサブコマンドでは、プロセスが終了するまで、指定の識別子に関する統計情報およびイベント情報がキャプチャーされ出力されます。

interval を指定すると、Ctrl-C キーを押してプロセスを終了するまで、interval 秒ごとに結果が出力されます。

count を指定すると、プロセスは結果を count 回出力したあとで終了します。


注 - 使用可能なリソース、統計情報、イベント、およびそれらの識別子を表示するには、sstore list コマンドを使用します。
sstore export [–F format] [–aH] [[[–t start-time] [–e end-time] [–i step]] | [[–t start-time] [–i step] [–p relative-pts]]] [statid ... | –f ssid_file]

このサブコマンドでは、指定の時間範囲にわたる、指定の識別子に関する履歴統計情報およびイベント情報が出力されます。

識別子を 1 つ以上指定する必要があります。時間範囲はオプションです。時間範囲を指定しないと、指定の識別子に関するすべてのデータが出力されます。

sstore list [–F format] [–aH] [[[–t start-time] [–e end-time] | [[–t start-time] [–p relative-pts]]] [statid ... | –f ssid_file]

このサブコマンドは、一致する識別子のリストを出力します。

ユーザーが –t を指定しなかった場合、now が開始時間の値とみなされ、sstore list コマンドは現在使用可能な識別子の一覧を出力します。

–t を指定すると、識別子がキャプチャー可能であった時間を示す activity の範囲も出力されます。したがって、–t オプションを使用すると、過去のどの時点でリソースがシステム上で使用可能であったかを表示することもできます。

sstore info [–F format] [–a] [[[–t start-time] [–e end-time] | [[–t start-time] [–p relative-pts]]] [statid ... | –f ssid_file]

このサブコマンドは、ある特定の識別子に関する情報を表示します。

時間範囲指定の動作は、sstore list コマンドの場合と同じです。

//:op および //:fmt の例については、ssid-op(7) のマニュアルページを参照してください。

使用例 1 5 秒ごとに 2 回統計情報を記録する

この例では、CPU の整数パイプラインの使用状況を記録し (2 つのストランドを持つカーネルゾーン内)、現在の stat 値を 5 秒ごとに 2 回表示します。

$ sstore capture '//:class.cpu//:res.id/*//:stat.integer-pipe-usage' 5 2
TIME                VALUE IDENTIFIER
2014-10-08T14:42:06 104501725 //:class.cpu//:res.id/0//:stat.integer-pipe-usage
2014-10-08T14:42:06 110927532 //:class.cpu//:res.id/1//:stat.integer-pipe-usage
2014-10-08T14:42:11 123515733 //:class.cpu//:res.id/0//:stat.integer-pipe-usage
使用例 2 事前にキャプチャーしておいた統計値をエクスポートする

この例では、キャプチャーを有効にした 8 秒後に、データリンク net0 に関する履歴統計情報をエクスポートします。

$ sstore export '//:class.link/phys//:res.name/net0//:stat.//:s.[out-bytes,in-bytes]'
TIME                VALUE IDENTIFIER
2014-10-08T15:13:46 1073914647 //:class.link/phys//:res.name/net0//:stat.out-bytes
2014-10-08T15:13:47 1073915035 //:class.link/phys//:res.name/net0//:stat.out-bytes
2014-10-08T15:13:48 1073915713 //:class.link/phys//:res.name/net0//:stat.out-bytes
2014-10-08T15:13:49 1073916959 //:class.link/phys//:res.name/net0//:stat.out-bytes
2014-10-08T15:13:50 1073917089 //:class.link/phys//:res.name/net0//:stat.out-bytes
2014-10-08T15:13:51 1073920729 //:class.link/phys//:res.name/net0//:stat.out-bytes
2014-10-08T15:13:52 1073922289 //:class.link/phys//:res.name/net0//:stat.out-bytes
2014-10-08T15:13:53 1073923069 //:class.link/phys//:res.name/net0//:stat.out-bytes
2014-10-08T15:13:47 4226366841 //:class.link/phys//:res.name/net0//:stat.in-bytes
2014-10-08T15:13:48 4226367123 //:class.link/phys//:res.name/net0//:stat.in-bytes
2014-10-08T15:13:49 4226367773 //:class.link/phys//:res.name/net0//:stat.in-bytes
2014-10-08T15:13:50 4226368179 //:class.link/phys//:res.name/net0//:stat.in-bytes
2014-10-08T15:13:51 4226372059 //:class.link/phys//:res.name/net0//:stat.in-bytes
2014-10-08T15:13:52 4226373961 //:class.link/phys//:res.name/net0//:stat.in-bytes
2014-10-08T15:13:53 4226375257 //:class.link/phys//:res.name/net0//:stat.in-bytes
使用例 3 Export Statistic Values of previously captured data with 10 second step
$ sstore export -i 10s -t now -e 25 '//:class.link/phys//:res.name/net0//:stat.//:s.[out-bytes,in-bytes]'
TIME                VALUE IDENTIFIER
2020-06-16T11:19:43 150973526.0 //:class.link/phys//:res.name/net0//:stat.out-bytes
2020-06-16T11:19:53 150977726.0 //:class.link/phys//:res.name/net0//:stat.out-bytes
2020-06-16T11:20:03 150981926.0 //:class.link/phys//:res.name/net0//:stat.out-bytes
2020-06-16T11:19:43 46361608.0 //:class.link/phys//:res.name/net0//:stat.in-bytes
2020-06-16T11:19:53 46362448.0 //:class.link/phys//:res.name/net0//:stat.in-bytes
2020-06-16T11:20:03 46363662.0 //:class.link/phys//:res.name/net0//:stat.in-bytes
使用例 4 Export Statistic Values of previously captured data with 1 minute step
$ sstore export -i 1m -t now -e 180 '//:class.link/phys//:res.name/net0//:stat.//:s.[out-bytes,in-bytes]'
TIME                VALUE IDENTIFIER
2020-06-16T11:21:23 150987526.0 //:class.link/phys//:res.name/net0//:stat.out-bytes
2020-06-16T11:22:23 150998000.0 //:class.link/phys//:res.name/net0//:stat.out-bytes
2020-06-16T11:23:23 151023386.0 //:class.link/phys//:res.name/net0//:stat.out-bytes
2020-06-16T11:24:23 151051466.0 //:class.link/phys//:res.name/net0//:stat.out-bytes
2020-06-16T11:21:23 46369071.0 //:class.link/phys//:res.name/net0//:stat.in-bytes
2020-06-16T11:22:23 46373059.0 //:class.link/phys//:res.name/net0//:stat.in-bytes
2020-06-16T11:23:23 46379147.0 //:class.link/phys//:res.name/net0//:stat.in-bytes
2020-06-16T11:24:23 46391989.0 //:class.link/phys//:res.name/net0//:stat.in-bytes
使用例 5 Export Statistic Values of previously captured data of previous 3 data points relative to now with 5 seconds step
$ sstore export -i 5 -p -3 -t now '//:class.kstat//:res.system/cpu/0/sys//:stat.cpu_nsec_idle'
TIME                VALUE IDENTIFIER
2021-05-10T09:44:01 932648728114295 //:class.kstat//:res.system/cpu/0/sys//:stat.cpu_nsec_idle
2021-05-10T09:44:06 932653671291909 //:class.kstat//:res.system/cpu/0/sys//:stat.cpu_nsec_idle
2021-05-10T09:44:11 932658595839475 //:class.kstat//:res.system/cpu/0/sys//:stat.cpu_nsec_idle 
使用例 6 Export Statistic Values of previously captured data of next 3 data points relative to given start-time with 5 seconds step
$ sstore export -i 5 -p 3 -t 2021-05-10T09:35:10 '//:class.kstat//:res.system/cpu/0/sys//:stat.cpu_nsec_idle'
TIME                VALUE IDENTIFIER
2021-05-10T09:35:10 932126235430593 //:class.kstat//:res.system/cpu/0/sys//:stat.cpu_nsec_idle
2021-05-10T09:35:15 932131178062798 //:class.kstat//:res.system/cpu/0/sys//:stat.cpu_nsec_idle
2021-05-10T09:35:20 932136105248117 //:class.kstat//:res.system/cpu/0/sys//:stat.cpu_nsec_idle
使用例 7 Export Statistic Values of previously captured data of previous 3 data points relative to given start-time with 5 seconds step
$ sstore export -i 5 -p -3 -t 2021-05-10T09:35:10 '//:class.kstat//:res.system/cpu/0/sys//:stat.cpu_nsec_idle'
TIME                VALUE IDENTIFIER
2021-05-10T09:34:59 932115382756757 //:class.kstat//:res.system/cpu/0/sys//:stat.cpu_nsec_idle
2021-05-10T09:35:04 932120312981016 //:class.kstat//:res.system/cpu/0/sys//:stat.cpu_nsec_idle
2021-05-10T09:35:09 932125248546632 //:class.kstat//:res.system/cpu/0/sys//:stat.cpu_nsec_idle
使用例 8 Export Statistic Values by matching wildcards

This example exports historical statistics for the Filesystems displaying all the stats which wildcard matches.

$ sstore export -a '//:class.fs//:*'
TIME                VALUE IDENTIFIER
...
2020-06-03T10:04:27 7097594.0 //:class.fs//:stat.access-ops
2020-06-03T10:04:28 7097846.0 //:class.fs//:stat.access-ops
...
2020-06-03T10:04:41 471072.0 //:class.fs//:stat.addmap-ops
2020-06-03T10:04:42 471072.0 //:class.fs//:stat.addmap-ops
...
2020-06-03T10:04:41 0.0 //:class.fs//:stat.async-cancel-ops
2020-06-03T10:04:42 0.0 //:class.fs//:stat.async-cancel-ops
...
使用例 9 使用可能な CPU 統計情報およびイベントを一覧表示する
$ sstore list '//:class.cpu//:res.id/0//://:s.[stat,event].*'
IDENTIFIER            
//:class.cpu//:res.id/0//:stat.usage
//:class.cpu//:res.id/0//:stat.integer-pipe-usage
//:class.cpu//:res.id/0//:stat.interrupt-count
//:class.cpu//:res.id/0//:stat.interrupt-time
//:class.cpu//:res.id/0//:stat.xcalls
//:class.cpu//:res.id/0//:event.adm-action
//:class.cpu//:res.id/0//:event.alert
//:class.cpu//:res.id/0//:event.fault
使用例 10 ネットワーク統計に関する情報を表示する
$ sstore info //:class.link/phys//:res.name/net0//:stat.ifspeed
 Identifier: //:class.link/phys//:res.name/net0//:stat.ifspeed
description: maximum received or transmitted bytes/s
  copyright: Copyright (c) 2014, 2022, Oracle and/or its affiliates.
  stability: stable
   max-rate: //:stat.ifspeed
 multiplier: 8
      units: bytes
    $schema: //:stat
       type: rate
         id: //:class.link/phys//:stat.ifspeed
使用例 11 ネットワークおよび CPU リソースに関する情報を表示する
$ sstore info //:class.link/phys//:res.name/net0 //:class.cpu//:res.id/0   
 Identifier: //:class.link/phys//:res.name/net0
  stability: stable
description: data link instance

 Identifier: //:class.cpu//:res.id/0
  stability: stable
description: cpu instance
使用例 12 Display Information on all the indentifiers that are currently available in sstore.
$ sstore info -a
...
Identifier: //:class.zpool
   $schema: //:class
 copyright: Copyright (c) 2015, 2022, Oracle and/or its affiliates.
   description: ZFS pool statistics
    id: zpool
	instance-metadata: {'description': 'ZFS pool', 'stability': 'stable'}
    namespaces: {'name-type': 'string', 'resource-name': 'name'}
     stability: stable
    stat-names: //:stat.size
    stat-names: //:stat.capacity
    stat-names: //:stat.health
    stat-names: //:stat.guid
    stat-names: //:stat.version
    stat-names: //:stat.available
    stat-names: //:stat.allocated
...
Identifier: //:class.app/solaris/audit/class
   $schema: //:class
 copyright: Copyright (c) 2016, 2022, Oracle and/or its affiliates.
   description: Solaris Audit class statistics
    id: app/solaris/audit/class
    namespaces: {'name-type': 'string', 'resource-name': 'name'}
    sau_read_sensitive_auth: solaris.sstore.audit.read
    stability: stable
    stat-names: //:stat.pass
    stat-names: //:stat.fail
...

終了ステータス

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

0

Command succeeded.

1

エラーが発生しました。

2

無効なコマンド行オプションが指定された。

3

複数の操作が要求されましたが、それらの一部のみが成功しました。

99

予期しないエラーが発生しました。

属性

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

属性タイプ
属性値
使用条件
system/sstore
インタフェースの安定性
不確実

関連項目

libsstore(3LIB), ssid-metadata(7), ssid-op(7), sstoreadm(1), sstored(8)

Using Oracle Solaris 11.4 Analytics