Go to main content

Using Oracle® Solaris 11.4 StatsStore and System Web Interface

Exit Print View

Updated: February 2019
 
 

Representing Statistics

A statistic is a piece of information about a resource or class. A statistic SSID includes a class component and a statistic component and usually includes a resource (class instance) component. A statistic SSID has the following format:

//:class.class-name//:res.resource-instance//:stat.statistic

The following example shows a statistic with no resource:

//:class.system//:stat.available-memory

The following example shows a statistic for a particular resource:

//:class.cpu//:res.id/0//:stat.usage

Resource Identifiers

A resource-instance is a specific object within a class-name class. The resource-instance includes the resource type and the name of the specific resource.

In the following SSID that identifies CPU instance 0, id/0 is the resource-instance, id is the resource type, and 0 is the name of the specific cpu resource:

//:class.cpu//:res.id/0

If class-name is svc, resource-instance is a service instance FMRI. The following SSID identifies the system/identity:node SMF service instance, where fmri is the resource type, and system/identity:node is the name of the specific svc resource:

//:class.svc//:res.fmri/system/identity:node

If class-name is app, resource-instance is a running instance of the application.

Both class and res components are required to identify any system resource. Identical resource names can identify completely different resources and are differentiated by class. For example, in //:class.cpu//:res.id/0, id/0 is CPU 0; in //:class.lgroup//:res.id/0, id/0 is locality group 0; in //:class.pset//:res.id/0, id/0 is processor set 0; and in //:class.zone//:res.id/0, id/0 is non-global zone 0. The following command shows that the statistics available for each of these identically-named resources are completely different because the resources are not the same kind (class) of object:

$ sstore list //:class.*//:res.id/0//:stat.*
IDENTIFIER
//:class.cpu//:res.id/0//:stat.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.lgroup//:res.id/0//:stat.available-memory-pages
//:class.lgroup//:res.id/0//:stat.free-memory-pages
//:class.lgroup//:res.id/0//:stat.load-average
//:class.lgroup//:res.id/0//:stat.thread-migrations
//:class.lgroup//:res.id/0//:stat.total-cpus
//:class.lgroup//:res.id/0//:stat.total-memory-pages
//:class.pset//:res.id/0//:stat.runnable-threads
//:class.pset//:res.id/0//:stat.waiting-threads

As much as possible, resource names are the same as names used in the related administrative commands. The following example shows that the names of resources for io class objects match the names of the devices in iostat output:

$ iostat -x
                    extended device statistics
device    r/s    w/s   kr/s   kw/s wait actv wsvc_t asvc_t  %w  %b
lofi1     0.0    0.0    0.0    0.0  0.0  0.0    0.0    0.0   0   0
sd9       3.2   14.5   38.7  195.7  0.0  0.0    1.2    1.9   1   2
nfs1      0.0    0.0    0.0    0.0  0.0  0.0    0.0    0.0   0   0
$ sstore list //:class.io//:*
IDENTIFIER
//:class.io//:res.name/lofi1
//:class.io//:res.name/nfs1
//:class.io//:res.name/sd9

The SSID component that follows the res component is usually a statistic (stat). This component could also be class or event, as shown in the following example.

$ sstore list //:class.cpu//:res.id/0//:*
IDENTIFIER
//:class.cpu//:res.id/0//:class.chip
//:class.cpu//:res.id/0//:class.core
//:class.cpu//:res.id/0//:class.pset
//:class.cpu//:res.id/0//:event.adm-action
//:class.cpu//:res.id/0//:event.alert
//:class.cpu//:res.id/0//:event.fault
//:class.cpu//:res.id/0//:stat.usage
//:class.cpu//:res.id/0//:stat.interrupt-count
//:class.cpu//:res.id/0//:stat.interrupt-time
//:class.cpu//:res.id/0//:stat.xcalls

A single system resource can be available through multiple names in the same class as shown in the following example for disk 0:

//:class.disk//:res.dev/sd0
//:class.disk//:res.name/sd0

A single system resource also can be available through multiple classes as discussed in Using Statistics Store Identifier Aliases.

On a particular system, some classes might have no resources.

Statistic Identifiers

A statistic can be information about a class or about a resource (a class, res pair). The most common statistic type is a counter.

The following resource statistic SSID holds the cumulative interrupt count for CPU instance 0:

//:class.cpu//:res.id/0//:stat.interrupt-count

To specify multiple statistics with one SSID, use the * wildcard as shown in the following example, or use the s (slice) keyword as shown in Displaying Resource and Statistic Slices.

The following command lists all statistics available for each CPU resource:

$ sstore list //:class.cpu//:res.id/0//:stat.*
IDENTIFIER
//:class.cpu//:res.id/0//:stat.usage
//:class.cpu//:res.id/0//:stat.interrupt-count
//:class.cpu//:res.id/0//:stat.interrupt-time
//:class.cpu//:res.id/0//:stat.xcalls

Only statistics can be partitioned. See Displaying Values of Statistic Partitions for examples.

Only statistic values can be used in mathematical operations. Mathematical operations are expressed as a component of the SSID. See Performing Operations on Statistic Values for examples.