Pruning Data from the StatsStore Repository
The sstored
daemon prunes data by saving fewer and fewer samples of older
data. The same set of data might be pruned multiple times as necessary to keep the repository within
the size limit as new data is added. For example, if you had recorded some data every second,
sstored
might prune older data to one value every five seconds, then one value
every minute, then one value every hour and so forth as needed.
You can do some data pruning yourself by using the sstoreadm purge
command.
The following command deletes all data for both ssid-1 and ssid-2. If an SSID does not explicitly name statistics (for example the SSID only names a resource), then all statistic data associated with that SSID is deleted:
$ sstoreadm purge ssid-1
ssid-2
The following command deletes all data for ssid-1 that was collected between start-time and end-time. Data collected before start-time or after end-time is retained:
$ sstoreadm purge -t start-time -e end-time
ssid-1
Specify only an end time and not a start time to delete data up to the end time and retain data after the end time. Specify only a start time and not an end time to delete data from the start time to the current time and retain data before the start time.
The following command deletes all data for ssid-1 that was collected between start-time and end-time and that is in increments of 60 seconds or less. Data collected in increments of 61 seconds or larger is retained:
$ sstoreadm purge -t start-time -e end-time -i 60 ssid-1
You can also use i with just and end time and no start time, with just a start time and no end time, and with no start or end time.
See also the sstoreadm
(1) man page.