DB2 logs severe error and warning conditions to the system error log (syslog). These entries are usually a subset of what appears in the db2diag.log file, except when a severe error occurs where the DB2 database manager was not able to write to the db2diag.log file. When such errors occur, it is recommended that you look at the syslog file.
Entries are added to the syslog based on priority and on what facility caused the error or warning condition. For example, system security, the kernel, and system daemons can all cause entries to be logged.
Priority refers to the urgency of the message. Message priorities are as follows, listed from highest to lowest:
DB2 adds alert messages to the system error log only for very severe situations (for example, if agents are killed or the architecture of a database is compromised). Alerts are also referenced in the db2diag.log file and in the alert log (db2alert.log). For more information, see "Understanding First Failure Data Capture".
To route alerts to the system error log, follow the steps listed below.
user.warn fully_qualified_file_namewhere:
refresh -s syslogd
kill -1 pid_of_syslogdwhere pid_of_syslogd is the process ID of the syslogd process. You can obtain this process ID by issuing the ps -fu syslogd command. You must have system authority in order to use the kill -1 command.
ps -fu db2sysc kill -36 db2sysc.process.id
mv logfile logfile.old touch logfileAlternatively, for AIX you may wish to include the following line in the crontab that you run as part of your regular system maintenance:
refresh -s syslogd
Messages generated by the database manager appear in the /etc/syslog.conf file.
An example of an entry in the system log is shown below. In this example,
the entries are truncated to fit on the page.
Jun 18 15:02:53 bluejay DB2[46827]: DB2 (db2inst1.000 (1)) oper_system_services sqlobeep (2) reports: (3) Jun 18 15:02:53 (4) bluejay (5) DB2[46827 (6)]: extra symptom string provided: (7) RIDS/sqlesysc_ Jun 18 15:02:53 bluejay DB2[46827]: data: (8) 54686973 20697320 616e2065 78616d70 Jun 18 15:02:53 bluejay DB2[46827]: data: 6c65206f 66206c6f 67676564 20646174 Jun 18 15:02:53 bluejay DB2[46827]: data: 61 Jun 18 15:02:53 bluejay DB2[46827]: 2 piece(s) of dump data provided and dumped to file (9) /u/db2inst1/ Jun 18 15:02:53 bluejay DB2[46827]: 1. 'DUMP EXAMPLE #1' has been dumped (10) Jun 18 15:02:53 bluejay DB2[46827]: 2. 'DUMP EXAMPLE #2' has been dumped |
Legend:
Use the ps command to view information about the process id of the reporting process. For example, execute the following command from a command prompt to get information about the reporting process in this example:
ps -fu 46827