Update and View Statistic Values
Run the application:
$ ./util1
List the new statistics. The sstore
command lists them in alphabetical order:
$ sstore list //:class.app/util1//:stat.*
IDENTIFIER
//:class.app/util1//:stat.errors
//:class.app/util1//:stat.reads
//:class.app/util1//:stat.writes
Show metadata for the new statistics:
$ sstore info //:class.app/util1//:stat.*
Identifier: //:class.app/util1//:stat.errors
$schema: //:stat
description: errors
id: //:class.app/util1//:stat.errors
stability: stable
units: errors
type: counter
Identifier: //:class.app/util1//:stat.reads
$schema: //:stat
description: reads
id: //:class.app/util1//:stat.reads
stability: stable
units: operations
type: counter
Identifier: //:class.app/util1//:stat.writes
$schema: //:stat
description: writes
id: //:class.app/util1//:stat.writes
stability: stable
units: operations
type: counter
Record values. If the program has finished running, you only see the last value that was recorded in the shared memory space.
$ sstore capture //:class.app/util1//:stat.*
TIME VALUE IDENTIFIER
2016-06-01T16:04:14 252 //:class.app/util1//:stat.errors
2016-06-01T16:04:14 1191 //:class.app/util1//:stat.reads
2016-06-01T16:04:14 959 //:class.app/util1//:stat.writes
2016-06-01T16:04:14 252 //:class.app/util1//:stat.errors
2016-06-01T16:04:14 1191 //:class.app/util1//:stat.reads
2016-06-01T16:04:14 959 //:class.app/util1//:stat.writes
^C
Re-run the program, and record the values while the program is running:
$ ./util1 & $ sstore capture //:class.app/util1//:stat.* TIME VALUE IDENTIFIER 2016-06-01T14:36:54 2 //:class.app/util1//:stat.errors 2016-06-01T14:36:54 3 //:class.app/util1//:stat.reads 2016-06-01T14:36:54 4 //:class.app/util1//:stat.writes 2016-06-01T14:36:54 2 //:class.app/util1//:stat.errors 2016-06-01T14:36:54 3 //:class.app/util1//:stat.reads 2016-06-01T14:36:54 8 //:class.app/util1//:stat.writes 2016-06-01T14:36:55 3 //:class.app/util1//:stat.errors 2016-06-01T14:36:55 3 //:class.app/util1//:stat.reads 2016-06-01T14:36:55 12 //:class.app/util1//:stat.writes ^C
The export
command can show values that were recorded in the past. The export
command prints all the requested values for one statistic and then all the values for the next statistic:
$ sstore export -t 2016-06-01T16:58:20 -p 3 //:class.app/util1//:stat.*
TIME VALUE IDENTIFIER
2016-06-01T16:58:20 244 //:class.app/util1//:stat.errors
2016-06-01T16:58:21 245 //:class.app/util1//:stat.errors
2016-06-01T16:58:22 246 //:class.app/util1//:stat.errors
2016-06-01T16:58:20 1144 //:class.app/util1//:stat.reads
2016-06-01T16:58:21 1148 //:class.app/util1//:stat.reads
2016-06-01T16:58:22 1152 //:class.app/util1//:stat.reads
2016-06-01T16:58:20 712 //:class.app/util1//:stat.writes
2016-06-01T16:58:21 715 //:class.app/util1//:stat.writes
2016-06-01T16:58:22 717 //:class.app/util1//:stat.writes