Statistics can be sent to the computer screen or to the RSSD.
To send statistics to the computer screen, include the display option. In this case, Replication Server makes a single observation at the end of the specified time period. The observed statistics are sent only to the computer screen.
For example, to report the number of blocks read from all queues and by all readers over a five-minute interval, enter:
admin stats, sqm, blocksread, display, 300
When you execute admin stats with a nonzero time period using the display option, Replication Server:
Resets all counters to zero.
Turns on all counters.
Puts your session to sleep for the specified time period.
Turns off all counters.
Reports the requested data.
To save statistics in the RSSD, include the save option, which immediately returns the session.
When you send statistics to the RSSD, you can specify the length for each observation interval (obs_interval) during the specified sampling period. obs_interval can be a numeric value in seconds, or a quoted time format string hh:mm[:ss].
For example, to start sampling and saving statistics to the RSSD for one hour and thirty minutes at 20-second intervals, enter:
admin stats, "all", save, 20, "01:30:00"
To collect statistics for the outbound SQT for connection 108 for two minutes at 30-second intervals, enter:
admin stats, sqt, outbound, 108, save, 30, 120
Replication Server determines the number of observation intervals by dividing the sampling period by the observation interval. The remainder in seconds, if any, is added to the last observation interval.
Sampling period (sample_period) |
Observation interval (obs_interval) |
Number of observation intervals |
---|---|---|
60 seconds |
15 |
Four 15-second intervals |
75 seconds |
5 |
Not allowed – observation interval must be => 15 seconds |
60 seconds |
30 |
Two 30-second intervals |
130 seconds |
20 |
Five 20-second intervals and a final 30-second interval |
10 seconds |
Not specified |
One 10-second interval |
When you execute admin stats with a nonzero time period using the save option, Replication Server starts a background thread to collect sampling data and returns your session immediately. Once the session is returned, you can use admin stats, status command to check the sampling progress. The background thread:
Truncates the rs_statrun and rs_statdetail system tables if the configuration parameter stats_reset_rssd is set to on.
Resets all counters.
Turns on all counters.
Writes the requested counters to the RSSD at the end of each observation period.
Turns off all counters.
To keep old sampling data, set the configuration parameter stats_reset_rssd to off or make sure that you have dumped any needed information from rs_statrun and rs_statdetail before executing admin stats with the save option. See “Using the rs_dump_stats procedure” for information about dumping information from these tables.