Managing the diagnostic log file
With the KM, you can use a browser facility to manipulate the DB2 diagnostic log and view the information in the log file. The diagnostic log contains information about administrative events and errors. To monitor these events, you can configure keywords that trigger a certain action (sets an alert state in the console, for example) when written to the log.
The diagnostic log icon appears in the DB2 instance object window and is labeled db2diag.log on the PATROL console.
To manage the DB2 diagnostic log
- Right-click on the db2diag.log icon.
- select one of the following commands to configure a keyword and set or modify a keyword action:
- Configure Log File Keywords
- Modify Log File Keywords
The keyword actions you can specify are as follows: - Information annotates a data point on the DiagLogOK parameter when the keyword appears in the log. DiagLogOK value set to 3.
- Warning annotates a data point on the DiagLogOK parameter and puts DiagLogOK in a warning state when the keyword is encountered. DiagLogOK value set to 4.
- Alarm annotates a data point on the DiagLogOK parameter and puts DiagLogOK in an alarm state when the keyword is encountered. DiagLogOK value set to 5.
Prunedeletes the log entries that contain the keyword. DiagLogOK value set to 2.
To browse the DB2 diagnostic log
- Right-click on the db2diag.log icon and select Display Diagnostic Log.
- Use the following navigation options to browse and search the log file:
- Click Backward, Forward,Top, or Bottom and click Update to navigate through the log.
- Select all and click Update to view all entries.
- Select dumps and click Update to view all log entries with references to a dump.
- Select alerts and click Update to view all log entries with references to an alert.
- Select string: and enter a keyword to view all references to a specified keyword and then click Update.
To prune the diagnostic file
Use one of the following methods to prune the DB2 diagnostic log file in PATROL. The commands are available from the db2diag.log menu.
- Manually prune the log by using the Prune Diagnostic Log File command and specifying the records to be pruned.
- Automatically prune the file by using the Configure Maximum DiagLogSize command, which enables you to specify the size at which point the oldest records will be removed.
- Automatically prune the file by keyword by using the Prune attribute in the action options of the Configure Log File Keyword command.
Support for multinode diagnostic log (EEE only)
In a multi-partitioned environment, you can configure DB2 instances to have different physical diagnostic logs on each node. PATROL for DB2 UDB allows you to monitor the diagnostic log on each node.
The diagnostic log commands described for managing the diagnostic log, for example, Configure Log File Keywords and Modify Log File Keywords are available for multinode diagnostic log monitoring. These commands affect diagnostic log monitoring on all the nodes with the exception of Display Diagnostic Log , which displays the node specific diagnostic log.
To configure multinode diagnostic log monitoring
- select Configure > Configure KM Defaults>DB2 Instance Settings, and select Node DiagLog check box.
Change single node diagnostic log monitoring to multinode diagnostic log monitoring to force discovery for the KM.