Go to main content

Using Oracle® Solaris 11.4 StatsStore and System Web Interface

Exit Print View

Updated: February 2019
 
 

Sum, Difference, Product, and Quotient

The op.sum, op.difference, op.product, and op.quotient operations provide arithmetic operations across different SSIDs. Time stamps in the different SSIDs are matched. The first SSID in the set is reported as the result SSID.

The following example sums the number of interrupts for CPUs 0 and 2 at the specified time, and saves the result in id/0:

$ sstore export -t 2016-03-10T23:03:40 -p 1 //:class.cpu//:res.id/*//:stat.interrupt-count
TIME                VALUE IDENTIFIER
2016-03-10T23:03:40 56409717.0 //:class.cpu//:res.id/0//:stat.interrupt-count
2016-03-10T23:03:40 35839679.0 //:class.cpu//:res.id/1//:stat.interrupt-count
2016-03-10T23:03:40 35913257.0 //:class.cpu//:res.id/2//:stat.interrupt-count
2016-03-10T23:03:40 177732121.0 //:class.cpu//:res.id/3//:stat.interrupt-count
$ sstore export -t 2016-03-10T23:03:40 -p 1 \
> //:class.cpu//:res.id///:s.[0,2]//:stat.interrupt-count//:op.sum
TIME                VALUE IDENTIFIER
2016-03-10T23:03:40 92322974.0 //:class.cpu//:res.id/0//:stat.interrupt-count//:op.sum

Different parts of a single partition are not multiple identifiers. The following commands have the same result: The user and kernel values of the single statistic (CPU 1 usage) are not summed when op.sum is specified in the second command.

$ sstore export -t 2016-03-10T22:47:30 -p 1 \
> //:class.cpu//:res.id/1//:stat.usage//:part.mode(user,kernel)
TIME                VALUE IDENTIFIER
2016-03-10T22:47:30  //:class.cpu//:res.id/1//:stat.usage//:part.mode(user,kernel)
                    user: 2473322.339453
                    kernel: 2196570.543618
$ sstore export -t 2016-03-10T22:47:30 -p 1 \
> //:class.cpu//:res.id/1//:stat.usage//:part.mode(user,kernel)//:op.sum
TIME                VALUE IDENTIFIER
2016-03-10T22:47:30  //:class.cpu//:res.id/1//:stat.usage//:part.mode(user,kernel)//:op.sum
                    user: 2473322.339453
                    kernel: 2196570.543618

The op.difference and op.quotient operations operate on the same statistic for exactly two different resources. The order of the resource operands matters.

$ sstore export -t 2016-03-10T23:03:40 -p 1 \
> //:class.cpu//:res.id///:s.[0,2]//:stat.interrupt-count//:op.difference
TIME                VALUE IDENTIFIER
2016-03-10T23:03:40 20496460.0 //:class.cpu//:res.id/0//:stat.interrupt-count//:op.difference
$ sstore export -t 2016-03-10T23:03:40 -p 1 \
> //:class.cpu//:res.id///:s.[2,0]//:stat.interrupt-count//:op.difference
TIME                VALUE IDENTIFIER
2016-03-10T23:03:40 -20496460.0 //:class.cpu//:res.id/2//:stat.interrupt-count//:op.difference