Using Collections

A collection is a convenient way to show multiple statistics using one SSID, as described in Representing Sets of Statistics and Events, and to record all these statistics persistently.

Oracle Solaris includes several collections, which are owned by root. The following command lists all collections on this system that are owned by the user that issued the command, which is root in this case:

root# sstore list //:class.collection//:collection.*
IDENTIFIER
//:class.collection//:collection.name/root/apache-stats
//:class.collection//:collection.name/root/compliance-stat
//:class.collection//:collection.name/root/cpu-stats
//:class.collection//:collection.name/root/network-stats
//:class.collection//:collection.name/root/solaris-dashboard
//:class.collection//:collection.name/root/system

The same command issued by a different user, user1 in this case, gives different results:

user1$ sstore list //:class.collection//:collection.*
IDENTIFIER
//:class.collection//:collection.name/user1/my-stats

You cannot use a wildcard in the name position, but you can see the collection if you specify the name explicitly. The following command issued by user1 lists all collections on this system that are owned by root because root is named in the collection SSID:

user1$ sstore list //:class.collection//:collection.name/root/*
IDENTIFIER
//:class.collection//:collection.name/root/apache-stats
//:class.collection//:collection.name/root/compliance-stat
//:class.collection//:collection.name/root/cpu-stats
//:class.collection//:collection.name/root/network-stats
//:class.collection//:collection.name/root/solaris-dashboard
//:class.collection//:collection.name/root/system

You can use a wildcard in the uuid position to list all collections on the system. The UUID is the most reliable identifier. The collection name could be changed by an authorized user; the UUID remains constant through collection name changes.

user1$ sstore list //:class.collection//:collection.uuid/*
IDENTIFIER
//:class.collection//:collection.uuid/0ae3fbf0-927a-4f07-a569-c64f9b4bd769
//:class.collection//:collection.uuid/3999ac1f-7cce-4d9d-b1ae-b32525b61f43
//:class.collection//:collection.uuid/724adf52-57b0-430e-9c9a-8d21056c3a33
//:class.collection//:collection.uuid/7bdd7228-1d72-47f6-8d96-fa659d57ed2d
//:class.collection//:collection.uuid/8f174784-3613-4371-ad54-ff0c258e3671
//:class.collection//:collection.uuid/dd19683a-88b3-47c3-beff-c2c5d0e7e83f
//:class.collection//:collection.uuid/f465bec7-a20a-4b78-b5ed-fedb0610473e
//:class.collection//:collection.uuid/f615ff30-4e1c-41e1-91f7-b0e58651cde5

You cannot use the sstore list command to list the statistics that belong to the collection. Use the sstore info command instead.

$ sstore list //:class.collection//:collection.name/root/network-stats//:*
Warning (//:class.collection//:collection.name/root/network-stats//:*) - 
Collection name network-stats//:* cannot have '/'

The sstore info command shows you which statistics and events are included in the collection, whether the collection is enabled, and the UUID, owner, and name of the collection. All of the following commands display the same output except for the value of Identifier. The user name is needed only if you are not the owner of the collection or if two users create collections with the same name (cname).

root# sstore info //:class.collection//:collection.name/network-stats
user1$ sstore info //:class.collection//:collection.name/root/network-stats
user1$ sstore info \
> //:class.collection//:collection.uuid/cd9df265-7f50-414f-b8b6-d70352d16092
Identifier: //:class.collection//:collection.uuid/0ae3fbf0-927a-4f07-a569-c64f9b4bd769
  ssid: //:class.link/phys//:stat.in-bytes
  ssid: //:class.link/phys//:stat.out-bytes
  ssid: //:class.link/phys//:stat.speed
 state: disabled
  uuid: 0ae3fbf0-927a-4f07-a569-c64f9b4bd769
 owner: root
 cname: network-stats
crtime: 1480351396984968

The following command lists more than 20 statistics in the //:class.link/phys class:

$ sstore list -a //:class.link/phys//:stat.*

The network-stats collection includes only three of these statistics, as shown in the preceding sstore info example. Using a collection is a convenient way to record the statistics that interest you most. Though the statistics in the network-stats collection are not being recorded persistently (the collection state is disabled), you can conveniently use the single collection SSID to record these statistics on demand using the System Web Interface, the CLI, or APIs, as in the following example:

$ sstore capture //:class.collection//:collection.name/root/network-stats

To create your own collection, see Creating a Collection in Adding Custom Data to the Oracle Solaris 11.4 StatsStore and System Web Interface.

When a collection is enabled (see the state in the sstore info output), the statistics in the collection are recorded persistently. When a collection is disabled, the statistics in the collection are not being recorded unless they are being recorded in some other way, such as by the sstore capture command or by displaying those statistics in the System Web Interface.

Two of the collections shown in this section are enabled by default: system and solaris-dashboard.

  • The basic system configuration collection (system) includes all //:class.system//:* statistics.

  • The Dashboard collection (solaris-dashboard) records statistics and events from eight different classes, including all events and all //:class.system//:* statistics. The solaris-dashboard collection provides a good example of the convenience of using a collection to access a set of data from different classes.

The following output shows the statistics that are in the solaris-dashboard collection:

$ sstore info //:class.collection//:collection.name/root/solaris-dashboard
Identifier: //:class.collection//:collection.name/root/solaris-dashboard
  ssid: //:class.cpu//:event.*
  ssid: //:class.cpu//:stat.integer-pipe-usage
  ssid: //:class.cpu//:stat.usage
  ssid: //:class.disk//:stat.read-bytes
  ssid: //:class.disk//:stat.write-bytes
  ssid: //:class.event//:event.*
  ssid: //:class.link/phys//:stat.in-bytes
  ssid: //:class.link/phys//:stat.in-discards
  ssid: //:class.link/phys//:stat.in-drops
  ssid: //:class.link/phys//:stat.in-errors
  ssid: //:class.link/phys//:stat.out-bytes
  ssid: //:class.link/phys//:stat.out-discards
  ssid: //:class.link/phys//:stat.out-drops
  ssid: //:class.link/phys//:stat.out-errors
  ssid: //:class.link/phys//:stat.out-overflows
  ssid: //:class.link/phys//:stat.out-underflows
  ssid: //:class.nfs/client//:stat.calls
  ssid: //:class.nfs/server//:stat.calls
  ssid: //:class.system//:stat.*
  ssid: //:class.zpool//:res.name/*//:stat.capacity
 state: enabled
  uuid: e34d4d00-9c04-426a-8058-bf1a085c132f
 owner: root
 cname: solaris-dashboard
crtime: 1597081754855017

Instead of specifying each SSID separately, you can use the single collection SSID to examine the data. The following command uses the single collection SSID to show the current values of each of the statistics from several different classes:

$ sstore export -t now -p -1 \
> //:class.collection//:collection.name/root/solaris-dashboard

The following table describes the system (//:class.system//:*) statistics. This information is from the description metadata that you can see by using sstore info.

Table 3-1 Statistics in the Basic System Configuration Collection

Identifier //:class.system//:* Description

stat.available-memory

Available system memory

stat.available-memory-pages

Memory pages not currently in use by this system

stat.disk-swapspace

Disk-based swap utilization

stat.fqdn

Host name and default domain name of this system

stat.last-boot

Time since this system was last booted, in seconds since epoch

stat.load-average

System load average

stat.memory-page-size

System memory page size

stat.memory-reservation

Physical memory reservations

stat.memory-reservation-failures

Count of failed attempts to reserve physical memory

//:class.system//:stat.nodename

System node name (uname -n)

//:class.system//:stat.operatingsystem

The operating system running in this image

stat.page-ins

Page ins

stat.page-outs

Page outs

stat.physical-memory

Physical memory usage

stat.pkg-version

Version of pkg:/entire installed in this image

//:class.system//:stat.platform

Name of the platform that the sstored daemon is running on (uname -i)

//:class.system//:stat.processor

Name of the processor or ISA that the sstored daemon is running on (uname -p)

stat.processor-display-name

Display model name of the processor that the sstored daemon is running on

//:class.system//:stat.processors-physical

Number of physical processors in this system

//:class.system//:stat.processors-virtual

Number of virtual processors in this system

//:class.system//:stat.product

System product name

//:class.system//:stat.serial

System serial number (only for physical systems, not for virtual systems)

//:class.system//:stat.swap-allocated

Swap space allocated

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

Swap space available

//:class.system//:stat.swap-reserved

Swap space reserved

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

Total system memory

//:class.system//:stat.total-memory-pages

Number of memory pages in this system

//:class.system//:stat.uptime

System uptime in seconds

//:class.system//:stat.virtual

Type of virtualization, or physical

stat.virtual-memory

Total virtual memory usage

stat.virtual-memory-reservation-failures

Count of failed attempts to reserve virtual memory

stat.virtual-memory-zone-usage

Zones virtual memory usage