When a governor daemon forces an application, reads the governor configuration file, changes an application's priority, encounters an error or warning, starts, or ends, it writes a record to a log file. A separate log file exists for each governor daemon. This prevents file-locking bottlenecks that would result from many governor daemons writing to the same file at the same time. You can use the db2govlg utility to merge the log files together and query them. This utility is described in "Querying Governor Log Files".
The log files are stored in the log subdirectory of the sqllib directory. You provide the base name for the log file when you issue the db2gov command. You should ensure that the log file name contains the database name, because there will be a log file for each node of each database that is being governed. In a partitioned database environment, the node number of the database partition that the governor is running on is automatically appended to the log file name to ensure that the filename is unique for each governor.
Each record in the log file has the following format:
Date Time NodeNum RecType Message
The Date and Time field is in the yyyy-mm-dd-hh.mm.ss format, so that you can merge the log files for each database partition by sorting on this field.
The NodeNum field indicates the number of the database partition on which the governor is running.
The RecType field contains different values, depending on the type of log record being written to the log. The values that can be recorded are:
The fields are:
Because standard values are written, you can query the log files for different types of actions. The Message field provides other nonstandard information that varies according to the value under the Rectype field. For instance, a FORCE or NICE record indicates application information in the Message field, while an ERROR record includes an error message.
An example log file is as follows:
1995-12-11 14.54.52 0 START Database = TQTEST 1995-12-11 14.54.52 0 READCFG Config = /u/db2instance/sqllib/tqtest.cfg 1995-12-11 14.54.53 0 ERROR SQLMON Error: SQLCode = -1032 1995-12-11 14.54.54 0 ERROR SQLMONSZ Error: SQLCode = -1032 |