Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Thursday, March 14, 2019
 
 

sstore(1)

Name

sstore - Statistics Store management utility

Synopsis

/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] [-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]

Description

The sstore command provides the ability to capture, export, and display statistics and event information contained within a statistics repository.

Options

The following option is supported:

-?

Displays a usage message.

Common Sub-Command Options

The following options are supported for all subcommands unless specified otherwise:

–F format

Specifies an alternative output format. The value of format can be tsv (Tab Separated Values), csv (Comma Separated Values), json (JavaScript Object Notation as a single line), or json-formatted (JavaScript Object Notation, formatted for readability). For csv formatted output, the query must include a time range (see the –t option) and a granularity or step in seconds.

The CSV output format is described in the sstore.csv(5) man page. The JSON output format is described in the sstore.json(5) man page.

–a

Makes wildcards match all entries (unstable and unbrowsable identifiers are hidden by default).

–H

Omits the headers from the output.

–f ssid_file

Specifies a file that contains a list of identifiers (one per line) or in the same JSON (JavaScript Object Notation) format provided by the sstore export command. This option cannot be combined with a direct identifier specification.

–t start-time

Starts a timestamp formatted with %Y-%m-%dT%H:%M:%S. For more information, see the strftime(3C) man page. The keyword now can be used to specify the current time. This option defaults to epoch when not specified, unless otherwise noted.

There are two ways of specifying a time range:

Form 1: -t start-time -e end-time -i step

Form 1 is always assumed if –t is specified without –p. In this form, the data returned is bounded by the start and end times, with a minimum granularity of step.

Form 2: -t start-time -p relative-pts

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

–e end-time

Ends the timestamp (for information on formatting, see –t). This option defaults to now if not present when –t is specified without –p.

–i step

Specifies the distance in seconds between timestamps. For all non-zero specifications of step, data is interpolated such that the timestamps between points are exactly step seconds apart.

If step is zero or not specified, data is returned with timestamps unmodified from the sstored initial sampling. By default, sstored attempts to sample statistics once per second, but can occasionally fail to do so, depending on the load of the system. See the sstored(8) man page.

–p relative-pts

Specifies the maximum number of data points to return. This value must be non-zero. An optional start-time can be specified. If start-time is not specified, then the start time defaults to now.

Operands

statid

A statistics store identifier (SSID). To specify multiple identifiers, separate identifiers with spaces or use wildcards or splices as described in Using Oracle Solaris 11.4 Analytics.

Sub Commands

The following subcommands are supported:

sstore help subcommand

This command displays usage for the specified sstore subcommand or for all sstore subcommands.

To display usage for a specific subcommand, use the sstore help command with that specific subcommand as an operand.

If you use the sstore help command with no operand, usage for all sstore subcommands is displayed.

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

This subcommand captures and prints statistics and event information for the given identifiers until the process terminates.

If you specify interval, the results are printed every interval seconds until the process is terminated by entering Ctrl-C.

If you specify count, the process terminates after printing the results count times.


Note - To display available resources, statistics, events, and their identifiers, use the sstore list command.
sstore export [–F format] [–aH] [[[–t start-time] [–e end-time] [–i step]] | [[–t start-time] [–p relative-pts]]] [statid ... | –f ssid_file]

This subcommand prints the historical statistic and event information for the given identifiers over the given time range.

You must specify at least one identifier. Time ranges are optional. If you do not specify a time range, then all the data for the given identifiers is printed.

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

This subcommand prints the list of matching identifiers.

If you do not specify –t, then now is assumed as the start time value, and the sstore list command prints the list of identifiers that are currently available.

If you specify –t, then the ranges of activity, which indicates the time at which the identifier was available for capture, are also printed. Thus, the –t option can also be used to view when in the past resources were available on the system.

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

This subcommand displays information about a given identifier.

The time range specification behavior is identical to that for the sstore list command.

Examples

See the ssid-op(7) man page for examples of //:op and //:fmt.

Example 1 Record a Statistic Every Five Seconds Twice

This example records CPU integer pipeline usage (in a kernel zone with two strands), displaying the current stat values every five seconds for two iterations.

$ 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
Example 2 Export Statistic Values after Previously Capturing

This example exports historical statistics for the datalink net0 after enabling capture eight seconds previously.

$ 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
Example 3 List Available CPU Statistics and Events
$ 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
Example 4 Display Information about a Network Statistic
$ 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, 2015, Oracle and/or its affiliates. All rights reserved.
  stability: stable
   max-rate: //:stat.ifspeed
 multiplier: 8
      units: bytes
    $schema: //:stat
       type: rate
         id: //:class.link/phys//:stat.ifspeed
Example 5 Display Information about a Network and CPU Resource
$ 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

Exit Status

The following exit values are returned:

0

Command succeeded.

1

An error occurred.

2

Invalid command line options were specified.

3

Multiple operations were requested, but only some of them succeeded.

99

An unanticipated error occurred.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/sstore
Interface Stability
Uncommitted

See Also

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

Using Oracle Solaris 11.4 Analytics