Statistics file information record
The statistics file information record called stats defines the statistics facility. The following parameters are available for this record:
Parameter | Description | Value | Restart Required |
---|---|---|---|
file.size |
The maximum size in bytes of an individual statistics data file. The statistics file name is written in the format of Syyyymmdd.ext, where yyyy indicates year, mm indicates month, and dd indicates day. The extension (ext) begins as 001. When a statistics file reaches the defined size within a 24-hour period, a new file is created with the same file name. The extension value is incremented by one. | nnnnnnnn, nnnnnnnnK, nnnnnnnM, or nnnnG—Establishes a default output file size limit for the statistics files. K denotes 1024 bytes. M denotes 1048576 bytes. G denotes 1073741824 bytes. The maximum value you can specify is 1 TB. | No |
log.commands |
Determines whether commands are written to the statistics file. If you want to log all commands except the select statistics and select process commands, set this parameter to y and the log.select parameter to n. | y | n y—Commands are written to the statistics file. n—Commands are not written to the statistics file. The default is n. |
No |
log.select |
Specifies whether IBM® Connect:Direct® creates a statistics record when a select process or select statistics command is executed. | y | n y—A statistics record is created. n—A statistics record is not created. The default is n. |
No |
max.age |
Specifies how old a statistics file must be before it is archived. Once a day, a shell script is executed that identifies the statistics files that are as old as the max.age, runs the tar command and the compress command to create a compressed archive, and then deletes the statistics files that have been archived. | A 3-digit decimal number. The default is 8 days. 0—no archiving. |
Yes |
Running a Process generates multiple statistics records. To accommodate the large number of statistics records generated, IBM Connect:Direct closes the current statistics file and creates a new statistics file at midnight every day. It can also close the current file before midnight if the file size exceeds the value set for the file.size initialization parameter. The default file size is 1 megabyte.
Statistics files are stored in the d_dir/work/cd_node directory. Names of the statistics files are in the format Syyyymmdd.ext, where yyyy indicates year, mm indicates month, and dd indicates day. The extension (ext) begins as 001. The extension is incremented by one each time a new statistics file is created in a single day.
Connect:Direct for UNIX provides a utility to archive and purge statistics files. You identify when to archive a statistics file by setting the parameter, max.age. The max.age parameter defines how old a statistics file must be before you want to archive the file. Once a day, the script called statarch.sh is started. This script identifies the statistics files that are greater than or equal to the max.age. It then runs the tar command and the compress command to create a compressed archived file of all the statistics records that match the max.age parameter. Once the statistics files are archived, these files are purged.
The archived files are stored in the directory where the statistics files and TCQ are stored. The shell script, statarch.sh, is located in the ndm/bin directory. If necessary, modify the script to customize it for your environment.
If you want to restore statistics files that have been archived, run the statrestore.sh script. It uses the tar command to restore all the statistics files in the archive. Once files are restored, the statistics records can be viewed using the select statistics command.