Metrics capture function in the Data Streamer

The Data Streamer can enable the metrics capture function to generate a metric statistics report to record how much data has been ingested to various subscribers. The metrics statistics report can be output to the console log, and sent to all the subscribers.

Enabling the metrics capture function

You can enable the metrics capture function by specifying the value for the parameter statint to a nonzero value. This parameter is added under the STDENV DD statement in the JCL procedure that you use to start the Data Streamer address space. See the following example:
//STDPARM  DD *                          
 PGM /bin/sh                              
 /u/cdpConfig/cdptest/DS/LIB/startup.sh   
 /u/cdpConfig/cdptest/cdpusr5/test.policy 
 56116 start=c trace=s statint=5h

If the value of the parameter statint is 0 or 0h or 0d or the parameter does not exist, the metrics capture function is disabled.

The statint parameter indicates how long to generate and send reports for captured metrics. The value is numberh or numberd. h means hours, and d means days. In this example, statint=5h, which means the interval is 5 hours.

Note: Only one unit for each interval value is supported for the statint parameter. For example, 1d2h is not supported, but 1d or 2h are supported. And the minimum unit interval is 1 hour.

Apart from the statint parameter, another parameter trace is related to the metrics capture function. If there is trace=s/y/p, it will enable the console message for the metrics statistics report.

By default, if the metrics capture function is enabled, the metrics statistics report is sent to all subscribers.

Dynamic setting for metrics capture function

For the Data Streamer, you can dynamically set metrics capture function using the MVS MODIFY command.

To dynamically set the metrics capture function, you can use the following commands:
Action Command
Set statistics
  • To disable the metrics capture function, use the following system command:
    F HBODSPRO,APPL=SET,STATISTICS,STATINT=0
  • To enable the metrics capture function and change the statistics interval, use one of the following system commands according to your needs:
    F HBODSPRO,APPL=SET,STATISTICS,STATINT=numberh
    number is non-zero
    
    F HBODSPRO,APPL=SET,STATISTICS,STATINT=numberd
    number is non-zero
    
  • To enable the output of the metrics statistics report to console log, use the following system command:
    F HBODSPRO,APPL=SET, STATISTICS,console=on
  • To disable the output of the metrics statistics report to console log, use the following system command:
    F HBODSPRO,APPL=SET, STATISTICS,console=off
  • To enable the sending of the metrics statistics report to subscribers, use the following system command:
    F HBODSPRO,APPL=SET, STATISTICS,subscribers=on
  • To disable the sending of the metrics statistics report to subscribers, use the following system command:
    F HBODSPRO,APPL=SET, STATISTICS,subscribers=off
Display statistics To display the metrics capture function settings for the Data Streamer, use the following system command:
F HBODSPRO,APPL=DISPLAY, STATISTICS
Clear statistics To clear all the metrics capture function settings of the Data Streamer, use the following system command:
F HBODSPRO,APPL=CLEAR, STATISTICS