Top Average Values
The proc
class represents process statistics. The op.top
operation is useful for reducing the process data to information about only the most active of
hundreds of processes on the system. The following command lists the five processes that are using
the largest percentage of CPU resources at each one-second interval:
$ sstore capture //:class.proc//:res.*//:stat.cpu-percentage//:op.top
TIME VALUE IDENTIFIER
2020-09-09T15:21:30 3.997802734375 //:class.proc//:res.pkg/18905/root//:stat.cpu-percentage//:op.top
2020-09-09T15:21:30 0.4180908203125 //:class.proc//:res.zpool-rpool/6/root//:stat.cpu-percentage//:op.top
2020-09-09T15:21:30 0.2288818359375 //:class.proc//:res.kmem_task/7/root//:stat.cpu-percentage//:op.top
2020-09-09T15:21:30 0.1556396484375 //:class.proc//:res.sstored/1046/root//:stat.cpu-percentage//:op.top
2020-09-09T15:21:30 0.067138671875 //:class.proc//:res.fsflush/3/root//:stat.cpu-percentage//:op.top
2020-09-09T15:21:31 4.1351318359375 //:class.proc//:res.pkg/18905/root//:stat.cpu-percentage//:op.top
...
The following sstore export
command specifies the start time from the
preceding sstore capture
command and requests two results for each of the top
four SSIDs. The values in the first result (the start time) are exactly the same as the values for
those SSIDs in the preceding sstore capture
example. The values in the second
result are the average of the next 60 values for each SSID; they are not just the values at the end
time.
Notice that if you had requested the top three SSIDs, the kmem_task
process
would not be listed. The kmem_task
process used the third most CPU time at the
start time, but the sstored
process used more CPU time on average over the entire
requested 61-datapoint period than the kmem_task
process used over that same
period. The sstored
process is shown in the third position at both time stamps
because the sstore export
command shows only limit
SSIDs: the top limit SSIDs over all the data points in the entire
requested period, not the top limit SSIDs at each point reported.
$ sstore export -t 2020-09-09T15:21:30 -e 2020-09-09T15:22:30 -i 60 \ > //:class.proc//:res.*//:stat.cpu-percentage//:op.top(4) TIME VALUE IDENTIFIER 2020-09-09T15:21:30 3.997802734375 //:class.proc//:res.pkg/18905/root//:stat.cpu-percentage//:op.top(4) 2020-09-09T15:22:30 3.94287109375 //:class.proc//:res.pkg/18905/root//:stat.cpu-percentage//:op.top(4) 2020-09-09T15:21:30 0.4180908203125 //:class.proc//:res.zpool-rpool/6/root//:stat.cpu-percentage//:op.top(4) 2020-09-09T15:22:30 0.4058837890625 //:class.proc//:res.zpool-rpool/6/root//:stat.cpu-percentage//:op.top(4) 2020-09-09T15:21:30 0.1556396484375 //:class.proc//:res.sstored/1046/root//:stat.cpu-percentage//:op.top(4) 2020-09-09T15:22:30 0.177001953125 //:class.proc//:res.sstored/1046/root//:stat.cpu-percentage//:op.top(4) 2020-09-09T15:21:30 0.2288818359375 //:class.proc//:res.kmem_task/7/root//:stat.cpu-percentage//:op.top(4) 2020-09-09T15:22:30 0.09765625 //:class.proc//:res.kmem_task/7/root//:stat.cpu-percentage//:op.top(4)