Go to main content

Using Oracle® Solaris 11.4 StatsStore and System Web Interface

Exit Print View

Updated: November 2020
 
 

Displaying Resource and Statistic Slices

Wildcards and slice notation enable you to specify multiple resources or statistics in one SSID.

Displaying Multiple Resources Using Wildcards and Slice Notation

To specify multiple resources with one SSID, use the * wildcard or the s (slice) keyword. Both of the following commands show the same result:

$ sstore list //:class.cpu//:res.id/*
$ sstore list //:class.cpu//:res.id//:s.[*]
IDENTIFIER
//:class.cpu//:res.id/0
//:class.cpu//:res.id/1
//:class.cpu//:res.id/2
//:class.cpu//:res.id/3

The following command selects a subset of resources:

$ sstore list //:class.cpu//:res.id///:s.[1,3]
IDENTIFIER
//:class.cpu//:res.id/1
//:class.cpu//:res.id/3

The slice notation is particularly helpful if the resource namespace is numeric and sequential. The following command selects a range of resources:

$ sstore list //:class.cpu//:res.id///:s.[1:3]
IDENTIFIER
//:class.cpu//:res.id/1
//:class.cpu//:res.id/2
//:class.cpu//:res.id/3

The following command shows resources with non-numeric names:

$ sstore list //:class.disk//:res.name/*
IDENTIFIER
//:class.disk//:res.name/sd0
//:class.disk//:res.name/sd1
//:class.disk//:res.name/sd10
//:class.disk//:res.name/sd11
...

The following command selects a subset of resources with non-numeric names:

$ sstore list //:class.disk//:res.name///:s.[sd2*,sd7*]
IDENTIFIER
//:class.disk//:res.name/sd2
//:class.disk//:res.name/sd20
...
//:class.disk//:res.name/sd29
//:class.disk//:res.name/sd7

A range cannot specify non-numeric resource names:

$ sstore list //:class.disk//:res.name///:s.[sd2:sd7]
Warning (//:class.disk//:res.name/sd2:sd5) - lookup error: no matches found

Displaying Multiple Statistics Using Wildcards and Slice Notation

Similar to resources, you can specify multiple statistics with one SSID by using the * wildcard or the s (slice) keyword. Statistic slice notation is useful for specifying the arguments for an operation as shown in Performing Operations on Statistic Values.

The following example lists all statistics that have block in their name:

$ sstore list //:class.fs//:res.mountpoint//var/share//:stat.*block*
IDENTIFIER
//:class.fs//:res.mountpoint//var/share//:stat.available-blocks
//:class.fs//:res.mountpoint//var/share//:stat.block-size
//:class.fs//:res.mountpoint//var/share//:stat.free-blocks
//:class.fs//:res.mountpoint//var/share//:stat.total-blocks

The following example specifies statistic slices:

$ sstore list \
> //:class.fs//:res.mountpoint//var/share//:stat.//:s.[block-size,free-blocks]
IDENTIFIER
//:class.fs//:res.mountpoint//var/share//:stat.block-size
//:class.fs//:res.mountpoint//var/share//:stat.free-blocks

Displaying Values of Statistic Slices

The following sstore capture command shows the current value of the in-bytes and out-bytes statistics for the net0 resource:

$ sstore capture //:class.link/phys//:res.name/net0//:stat.//:s.[in-bytes,out-bytes] 1 1
TIME                VALUE     IDENTIFIER
2020-08-04T20:45:44 120744284 //:class.link/phys//:res.name/net0//:stat.in-bytes
2020-08-04T20:45:44 14960822  //:class.link/phys//:res.name/net0//:stat.out-bytes

Though the previous capture command only shows one data point, as requested, additional values are recorded. After data recording starts (by using the capture command or the BUI, for example), recording continues for several minutes.

The following sstore export command requests data values at 60-second intervals over a two-minute period:

$ sstore export -t 2020-08-04T20:46:00 -e 2020-08-04T20:48:00 -i 60 \
> //:class.link/phys//:res.name/net0//:stat.//:s.[in-bytes,out-bytes]
TIME                VALUE       IDENTIFIER
2020-08-04T20:46:00 132264022.0 //:class.link/phys//:res.name/net0//:stat.in-bytes
2020-08-04T20:47:00 166141381.0 //:class.link/phys//:res.name/net0//:stat.in-bytes
2020-08-04T20:48:00 166147907.0 //:class.link/phys//:res.name/net0//:stat.in-bytes
2020-08-04T20:46:00 15581480.0  //:class.link/phys//:res.name/net0//:stat.out-bytes
2020-08-04T20:47:00 17407359.0  //:class.link/phys//:res.name/net0//:stat.out-bytes
2020-08-04T20:48:00 17415231.0  //:class.link/phys//:res.name/net0//:stat.out-bytes

If you use the -p option to specify a number of data points, you get the specified number of consecutive data points that were recorded from the specified start time.

$ sstore export -t 2020-08-04T20:46:00 -p 3 \
> //:class.link/phys//:res.name/net0//:stat.//:s.[in-bytes,out-bytes]
TIME                VALUE     IDENTIFIER
2020-08-04T20:46:00 132264022 //:class.link/phys//:res.name/net0//:stat.in-bytes
2020-08-04T20:46:01 132828645 //:class.link/phys//:res.name/net0//:stat.in-bytes
2020-08-04T20:46:02 133476528 //:class.link/phys//:res.name/net0//:stat.in-bytes
2020-08-04T20:46:00 15581480  //:class.link/phys//:res.name/net0//:stat.out-bytes
2020-08-04T20:46:01 15611793  //:class.link/phys//:res.name/net0//:stat.out-bytes
2020-08-04T20:46:02 15942307  //:class.link/phys//:res.name/net0//:stat.out-bytes

If you use the -p option with a negative argument, you get the specified number of consecutive data points that were recorded prior to the specified start time.

$ sstore export -t 2020-08-04T20:46:00 -p -3 \
> //:class.link/phys//:res.name/net0//:stat.//:s.[in-bytes,out-bytes]

For data of type counter (the most common type), if values are recorded for several minutes, then recording is stopped, and then recording is started again, sstore export shows interpolated values for the period when no data was recorded.