Introduction
In addition to report output at the terminal and on SYSLST, consecutive output of monitored data to the SM2 output file is provided for.
At file creation time, a system task is generated for writing to the SM2 output file. This system task terminates when the SM2 output file is closed.
Use of the SM2 output file is recommended
when system utilization is to be monitored for an extended period of time (standard case, trend monitoring)
for bottleneck analysis (peak load analysis) if special monitored data is required in addition to the global system monitored data. The corresponding monitoring programs must be activated for this purpose.
Only the SM2 administrator can create and close the SM2 output file.
The file attributes are preset by SM2, but the SM2 administrator can change the preset default options.
The SM2R1 program is available in BS2000 for analyzing output files. The SM2R1 data interface (SM2R1 transfer file) is available to users who wish to analyze the SM2 output file using their own programs. For information on the record structure of this file, refer to chapter"SM2R1 analysis routine").
Attributes of the SM2 output file
The SM2 administrator can choose to create an SM2 output file with the preset file attributes or to open an SM2 output file with freely selected attributes.
SM2 output file with preset file attributes
This file is opened with the statement OPEN-LOG-FILE FILE=*STD. SM2 opens a SAM file in output mode and catalogs it under the name SM2.hostname.yyyy-mm-dd.sss.nn
.
Here, hostname
indicates the assignment to a host, yyyy.mm.dd
is the date on which the file was created, sss
is the number of the BS2000 session and nn
is the consecutive number of the SM2 output file within that session (counted from 1).
SM2 output file with freely selected file attributes
Such a file is created with the statement OPEN-LOG-FILE FILE=*BY-LINK-NAME after the name and attributes have been defined with the ADD-FILE-LINK command.
It is possible to define
a PAM file in output mode with a freely selectable name, or
a SAM file with freely selectable open mode and file name.
The following table contains the file attributes which are preset in SM2 or can be defined with the FILE command:
Meaning | Attribute | Attribute | |
File creation operand | FILE=*STD | FILE=*BY-LINK-NAME | |
File attribute definition | Preset | Optional | |
File name | SM2.hostname.yyyy-mm-dd.sss.nn | filename 1 | |
File link name | SMLINK | ||
Block size 2 | BUFFER-LENGTH = *STD (SIZE=16) | BUFFER-LENGTH = *STD (SIZE=16) | |
Storage space allocation | SPACE=*RELATIVE (PRIMARY-ALLOCATION=576, SECONDARY-ALLOCATION=576) | selectable 2 | |
Access method | SAM | ACCESS-METHOD = *UPAM | ACCESS-METHOD = *SAM |
Open mode | OUTIN | OPEN-MODE = *OUTIN | OPEN-MODE = *OUTPUT / *EXTEND |
Format of the data blocks | BLOCK-CONTROL-INFO = *WITHIN-DATA-BLOCK | BLOCK-CONTROL-INFO = *PAMKEY / *WITHIN-DATA-BLOCK / *NO 4 |
1 | It is advisable to select a file name that indicates the date and time of file creation, so as to facilitate file sequencing in the input order required by SM2U1. |
2 | Only block lengths of 16 are used. If no block length is specified, this is set to 16 by SM2. If BUFFER-LENGTH is specified without the SPACE operand, SM2 uses the default value 576 for the primary storage allocation and for the secondary storage allocation. |
3 | ACCESS-METHOD=*UPAM,SHARED-UPDATE=*YES should be selected if the open SM2 output file is to be converted to a SAM file using SM2U1. This means that BUFFER-OUTPUT=*IMMEDIATE must be selected in the OPEN-LOG-FILE statement. |
4 | SM2 treats the operand BLOCK-CONTROL-INFO= *NO in the same way as BLOCK-CONTROL-INFO= *WITHIN-DATA-BLOCK. |
MISSED RECORDS are records that could not be written to the SM2 output file due to an input/output bottleneck and were therefore lost. They are indicated in the STATUS TABLE screen and by SM2R1 in EVALUATION STATISTICS.
Managing the SM2 output file
PAM output file
PAM output files are formatted in blocks.
The records are not separated by block boundaries.
An SM2 output file created with SHARED-UPDATE=*YES can be converted to a SAM file by SM2U1 and then analyzed using SM2R1.
SAM output file
The SAM output file format is logically similar to the PAM output file format.
An advantage of SAM output files is that they need not be converted before the SM2R1 analysis routine is called (refer to chapter "SM2U1 utility routine").
In the OUTPUT open mode, a new SAM output file can be created or a file can be replaced by another file with the same name.
In the EXTEND open mode, an existing file can be expanded to accommodate further record groups. This obviates the need to call the SM2U1 routine for merging several SM2 output files.
Opening and closing the SM2 output file
The OPEN-LOG-FILE statement opens the SM2 output file, while the CLOSE-LOG-FILE statement closes the SM2output file; likewise the SM2 output file is implicitly closed when SM2 is stopped (STOP-SUBSYSTEM SUBSYSTEM-NAME=SM2).
The SM2 output file can exceed the limit specified by PUBLIC-SPACE-LIMIT in the ADD-USER- or MODIFY-USER-ATTRIBUTES command, even if PUBLIC-SPACE-EXCESS=*NO has been specified.
If the SM2 output file is already open, the OPEN-LOG-FILE statement closes it and then opens a new SM2 output file. The monitoring programs SERVICETIME and TASK, which write monitored data exclusively to the SM2 output file (see "Overview of the SM2 monitoring programs"), are not terminated in the process.