22.6.1 Creation of audit trail files

Organization of this subsection
(1) Audit trail file creation convention
(2) Naming of audit trail files
(3) Output to audit trail file

(1) Audit trail file creation convention

HiRDB creates audit trail files automatically in the HiRDB file system area for audit trail files. The first time an audit trail file is created, it becomes the first generation, followed by the second generation, the third generation, and so on. Figure 22-5 shows the procedure for creating audit trail files.

Figure 22-5 Audit trail file creation

[Figure]

The maximum number of audit trail files that can be created in the HiRDB file system area is specified in the pd_aud_max_generation_num operand. However, if the value of the pdfmkfs command's -l option is smaller than the value of the pd_aud_max_generation_num operand, the value of the -l option becomes the maximum. Also, if there becomes insufficient space in the HiRDB file system area, it will not be possible to create as many audit trail files as provided for by the specification of the pd_aud_max_generation_num operand.

(2) Naming of audit trail files

The audit trail files are named according to the following convention:

pdaudunit-identifier001-200.aud

Example: If the unit identifier is UNT1 and pd_aud_max_generation_num=100
1st generation file name: pdaudUNT1001.aud
2nd generation file name: pdaudUNT1002.aud
:
99th generation file name: pdaudUNT1099.aud
100th generation file name: pdaudUNT1100.aud

If files other than audit trail files are created in the HiRDB file system area for audit trail files, they must not be files whose names will be inconsistent with these naming conventions.

(3) Output to audit trail file

Audit trail output format
For the audit trail output format, the pd_aud_async_buff_size operand can be used to select synchronous output or asynchronous output.
Buffer flush opportunities for asynchronous output
If asynchronous output is selected, when an opportunity to output to the audit trail file occurs, the audit trail is stored temporarily in a buffer used for asynchronous output. The audit trail stored in a buffer used for asynchronous output is output to the audit trail file at the following opportunities; these are called asynchronous output buffer flush opportunities:
  • When the buffer used for asynchronous output becomes full
  • When the pdaudswap command is executed
  • When the pdaudend command is executed
  • When the pdstop command is used for normal termination or planned termination of HiRDB (or unit)
Audit trail output processing
Audit trail output processing to the audit trail file is as follows, depending on the output format:
  • For synchronous output
    If there are no audit trail files, an audit trail file is created at the first audit trail collection opportunity, and the audit trail is output. If there is at least one audit trail file, the audit trail is output to the current file at each output trail collection opportunity.
  • For asynchronous output
    If there are no audit trail files, an audit trail file is created at the first asynchronous output buffer flush opportunity, and the audit trail is output. If there is at least one audit trail file, the audit trail is output to the current file at each asynchronous output buffer flush opportunity.