Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

SM2 monitoring program: examples

Example 1

This simple example illustrates how SM2 is started and stopped again later on.

The following default options are used:

  • monitoring cycle: 150 seconds

  • sampling cycle: 800 milliseconds

Reports A (ACTIVITY), M (MEMORY), C (CHANNEL) and D (DEVICE DISK) are output at the terminal in automatic output mode. SM2 is interrupted after some time with the BREAK function (K2 key) and terminated.

/START-SM2
START
.            (Output of the reports)
.
.
BREAK or [K2]
/INFORM-PROGRAM
END


Example 2

In this example, SM2 is started with data output to the SM2 output file. The file is given the default name SM2.hostname.yyyy.mm.dd.sss.nn. The monitoring cycle is preset to 150 seconds and the sampling cycle to 800 milliseconds. The SYSTEM monitoring program is activated for all devices.

The SM2 user task is then terminated and monitoring continues in the background.

SM2 is called again after some time to terminate the SYSTEM monitoring program and close the SM2 output file.

/START-SM2
CALL-ADMINISTRATION-PART
SET-SYSTEM-PARAMETERS DEVICES=*ALL
START-MEASUREMENT-PROGRAM TYPE=*SYSTEM
OPEN-LOG-FILE FILE=*STD
END
.
.
.
.
/START-SM2
CALL-ADMINISTRATION-PART
STOP-MEASUREMENT-PROGRAM TYPE=*SYSTEM
CLOSE-LOG-FILE
END


Example 3

In this example, SM2 is started with data output to the SM2 output file. The file is given the default name SM2.hostname.yyyy.mm.dd.sss.nn. The monitoring cycle is set to 20 seconds and the sampling cycle to 200 ms. The BCAM-CONNECTION monitoring program is activated. Here the defaults are set for the range limits for the INWAIT, REACT, INPROC and OUTPROC times. All connections of the $DIALOG application are monitored. All monitored data is written to the SM2 output file. At the terminal, the A (ACTIVITY), M (MEMORY), C (CHANNEL) and D (DEVICE DISK) reports are output in automatic output mode.
After some time, SM2 is interrupted with the BREAK function (K2 key) and terminated. However, the SM2 output file remains open and the BCAM-CONNECTION monitoring program continues running.

/START-SM2
CALL-ADMINISTRATION-PART
SET-BCAM-CONNECTION-PARAMETERS
ADD-BCAM-CONNECTION-SET                                 -
    SET-NAME=DIALOG,                                    -
        CONNECTION-SELECTION=*BY-NEA-NAME(              -
           CONNECTION-NAME=*SPECIFIED(                  -
              LOCAL-APPLICATION=$DIALOG,                -
              PARTNER-APPLICATION=*ANY)),               -
    HOST-SELECTION=*ANY
START-MEASUREMENT-PROGRAM TYPE=*BCAM-CONNECTION
OPEN-LOG-FILE FILE=*STD
MODIFY-MEASUREMENT-PERIODS OFFLINE-PERIOD=20,SAMPLING-PERIOD=200
CALL-EVALUATION-PART
START
.      (Output of the Reports)
.
.
BREAK or [K2]
/INFORM-PROGRAM
END