Save Statistics in the RSSD

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 with 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 Periods and Observation Intervals

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:
  1. Truncates the rs_statrun and rs_statdetail system tables if the configuration parameter stats_reset_rssd is set to on.

  2. Resets all counters.

  3. Turns on all counters.

  4. Writes the requested counters to the RSSD at the end of each observation period.

  5. Turns off all counters.

Note: 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. You can use the rs_dump_stats procedure to dump information from these tables.
Related concepts
Use the rs_dump_stats Procedure