Show TOC

admin statsLocate this document in the navigation structure

Displays information and statistics about Replication Server operations.

Syntax
admin {stats | statistics} [, sysmon | "all" 
	| <module_name> [, inbound | outbound] [, <display_name> ]]
	[, <server>[, <database>]] | [<instance_id>] 
	[, {display |, save} [, <obs_interval>] [, <sample_period>]]
Parameters
sysmon

Displays statistics only for those counters identified as particularly important for performance and tuning purposes. Counters are selected from nearly all modules. This is the default.

"all"

Displays statistics from all counters.

module_name

Displays statistics from the named module’s counters, where <module_name> is <cm, dsi>, <dist>, <dsiexec>, <repagent>, <rsi>, <rsiuser>, <serv>, <sqm>, <sqt>, <sts>, <rsh>, <sync>, and others. Use rs_helpcounter to obtain valid module names.

inbound | outbound

Types of <sqt> or <sqm>. If neither inbound nor outbound is supplied for the <sqt> or <sqm> module, Replication Server reports statistics for both types of queues.

display_name

Is the name of a counter. Use rs_helpcounter to obtain valid display names. <display_name> is used only with <module_name>.

server[, database]

If the statistics to be collected are related to a connection, <server> must be a data server and <database> must be supplied. If the statistics to be collected are related to a route, server must be a Replication Server and you cannot specify a <database>.

instance_id
Identifies a particular instance of a module such as SQT or SQM. To view instance IDs, execute admin who and view the <Info> column.
Note For <rsh> module, the <SPID> must be used. To view <SPID>, execute admin who and view the <Spid> column.

The instance ID 0 indicates Replication Server-wide statistics.

display

Displays statistics on the computer screen. This is the default.

save

Saves statistics in the RSSD. Old sampling data is truncated or preserved, depending on the current setting of stats_reset_rssd.

obs_interval

Specifies the length of each observation interval during the sampling period. If you do not specify an interval, there is only one interval with a length equal to the sampling period. Each observation interval must be at least 15 seconds. Format can either be a numeric value in seconds, or “hh:mm[:ss]”.

sample_period

Indicates the total sampling duration. The default value is zero, which reports the current counter values. With a nonzero value, the current counter values are reset and then collected for the specified sample period. Format can either be a numeric value in seconds, or “hh:mm[:ss]”.

Examples
Example 1
Collects outbound SQT statistics for connection 108 for two minutes and sends the data to the RSSD.
admin stats, sqt, outbound, 108, save, 120
Example 2
Collects outbound SQT statistics for connection 108 for two hours and sends data to the RSSD. In addition, the sample period is divided into observation intervals of 30 seconds each.
admin stats, sqt, outbound, 108, save, 30, "02:00:00"
Example 3

Displays statistics for the SQM and SQMR modules for the inbound queue for connection 102.

admin stats, sqm, inbound, 102
Report Time:            10/31/05 02:14:17 PM
Instance                        Instance ID  ModType/InstVal
--------------------------      -----------  ----------------
SQM, 102:1 pds01.tpcc                   102                 1

Monitor                Obs     Last    Max     Avg ttl/obs
---------------------  ------  ------  ------  ------------
#*SegsActive                1       1       1             1

==========================================================================
Instance                        Instance ID  ModType/InstVal
------------------------------  -----------  ----------------
SQMR, 102:1 pds01.tpcc, 0 SQT           102                11

Observer                                  Obs    Rate x/sec
----------------------                    ------  ----------
SleepsWriteQ                                   4           0
Note

In output, prefixes that precede counter names provide information about the counter. For example, a preceding # indicates a counter that is not reset, even if admin stats, reset is executed, and a preceding * indicates a counter that must be sampled, irrespective of the setting of stats_sampling. In this example, the SegsActive counter is always sampled and never reset.

Example 4

Collects statistics for all instances of the SleepsWriteQ counter in the SQM module.

admin stats, sqm, SleepsWriteQ
Report Time              10/31/05 02:17:03 PM

Instance                                Observer       Obs    Rate x/sec
-------------------------------------   -------------  ----   ----------
SQMR, 101:0 edsprs01.edbprs01, 0, DSI   SleepsWriteQ      0            0
SQMR, 102:0 pds01.tpcc, 0, DSI          SleepsWriteQ      0            0
SQMR, 102:1 pds01.tpcc, 0, DSI          SleepsWriteQ     20            0
SQMR, 103:0 rds01.tpcc, 0, DSI          SleepsWriteQ      0            0
Example 5
Starts sampling and saving statistics to the RSSD for one hour and thirty minutes at 20-second intervals:
admin stats, "all", save, 20, "01:30:00"
Usage
  • There are three types of statistic collectors:
    • Observer – counts the number of times an event occurs. For example, Replication Server uses an observer to count the number of times a command from the RepAgent is observed.

    • Monitor – periodically samples a value. For example, Replication Server uses a monitor to sample the sizes of sent commands.

    • Counter – collects statistics not observed by monitors and observers. Counters usually accumulate a running total of a particular value, including the total number of milliseconds required to complete a particular task. For example, Replication Server uses a counter to accumulate the elapsed time between receiving two commands from the RepAgent.

    Observer, monitor, and counter watch four types of statistics: number of observations, total observed values, last observed values, and maximum observed values.

  • admin stats prints a report that includes this information:
    • Instance – a specific occurrence of a module.

    • Instance ID – the numeric identifier for a given module instance. For example, two different SQM instances may have instance IDs 102 and 103.

    • ModType/InstVal – in some cases, an instance may have multiple versions or module types. For example, a given SQM instance may have an inbound type and an outbound type. For SQM instances, inbound versions have a module type of 1 and outbound versions have a module type of 0.

    • Monitor, Observer, or Counter – displays the name of the statistics collector being observed. For example, SleepsWriteQ.

    • Obs – the number of observations of a statistics collector during an observation period.

    • Last – the last value observed during an observation period.

    • Max – the maximum value observed during an observation period.

    • Total – the sum of observed values during an observation period.

    • Avg ttl/obs – the average value observed in an observation period. This is calculated as Total/Obs.

    • Rate x/sec – the change, in a period of 1 second, observed during the given observation period. Observers calculate this as Obs/seconds in an observation period. Monitors and counters calculate this as Total/second in an observation period.

  • By default, admin stats reports values for the sysmon counters.

  • By default, admin stats does not report counters that show 0 (zero) observation. To change this behavior, set the stats_show_zero_counters configuration parameter on.

  • If statistics are displayed on the computer screen, they are not stored in the RSSD. Similarly, if statistics are stored in the RSSD, they are not displayed on screen.

  • If you use admin stats...display_name to display statistics for a particular counter, Replication Server always displays statistics for that counter, even if stats_sampling is off and the number of observations is zero.

  • Use admin stats with the independent module name to collect statistics for dependent modules. You cannot collect statistics using the dependent module name in the admin stats command.

    Independent Module

    Dependent Module

    Data Server Interface (DSI)

    DSI Executor (DSIEXEC)

    Data Server Interface (DSI)

    Active Object Statistics (AOBJ)

    Stable Queue Manager (SQM)

    SQM Reader (SQMR)

    Thread Synchronization (SYNC)

    SYNC Element (SYNCELE)

    For more information about Replication Server modules, see the Replication Server Administration Guide Volume 2.

Permissions

Any user may execute this command.