Gateway statistics

The gateway logs Reader and Writer statistics to its log file. You can use these statistics to monitor the gateway's performance.

For the Reader component, the gateway logs the time taken to read and write an entire work batch to disk, measured in milliseconds. This measurement is also expressed as the number of database rows processed per second.

For the Writer component, the gateway logs the number of outstanding (unprocessed) batches and the running row rate, measured as database rows per second processed.

When the gateway is performing adequately, the number of outstanding batches should be 0 or 1. If the number of outstanding batches is greater than 1, this indicates that the gateway is not performing adequately.

The running row rate is a weighted average of the historical running row rate and the row rate of the last processed batch. The running row rate is calculated as 0.625 of the last measured running row rate plus 0.375 of the last batch row rate ((0.625 * last measured running row rate) + (0.375 * last batch row rate)).

The gateway also logs the time taken to write the persistent cache, measured in milliseconds. This time is approximately proportional to the number of open alerts being managed by the gateway.

The gateway statistics are written to the default log file G_JDBC2.log. To enable easy retrieval of the data, every line of statistics output in the log file contains the string STATS.

Note: Gateway statistics information is logged at the information log level, which is off by default. To enable logging of statistics, you must set the MessageLevel property to INFO.

Example log file

The following is an example of the statistics information logged by the gateway.

22/05/23 03:38:14: Information: [Main Gateway] Main Gateway: STATS: bdc98539-4158-400f-ac2a-6eff28638ae7 Batch write time 958 ms (501.0438413361169 rows/second) with 480 rows

22/05/23 03:38:14: Information: [Main Gateway] Main Gateway: STATS: Cache write time is 11 ms for bdc98539-4158-400f-ac2a-6eff28638ae7

22/05/23 03:38:15: Information: [pool-3-thread-1] pool-3-thread-1: STATS: bdc98539-4158-400f-ac2a-6eff28638ae7 Batch execution time: 538 ms (892.1933085501859 rows/second) with 480 rows.

22/05/23 03:38:15: Information: [pool-3-thread-1] pool-3-thread-1: STATS: Running row rate 845.0704225352113 rows/second

22/05/23 03:40:09: Information: [pool-3-thread-1] pool-3-thread-1: STATS: Outstanding batches 0