Db2 Big SQL log management on CDH
Several different log files are used for problem determination in Db2® Big SQL in a Cloudera Distribution Including Apache Hadoop (CDH) cluster.
In most configurations, the log files are located in the following locations:
- $BIGSQL_DIST_VAR/logs
- $BIGSQL_DIST_VAR/diag
$BIGSQL_DIST_VAR is defined by setting the VAR_DIR configuration parameter in the Db2 Big SQL on CDH configuration utility.
Db2 Big SQL console log files are located in /var/log/uc.
Cloudera Manager uses the /var/log/bigsql directory as the Db2 Big SQL head and worker monitor log directories.
Log files are located on each node that hosts an instance of the specified service.
- The scheduler log file is on the machine that hosts the scheduler.
- Db2 Big SQL and diagnostic log files are on all Db2 Big SQL nodes.
The following table lists the Db2 Big SQL log files and
their default locations.
| Log description | Log location |
|---|---|
| Log files that contain external Java™ service log entries, including Hive Metastore changes due to DDL, as well as Java I/O activities. | $BIGSQL_DIST_VAR/logs/bigsql.log |
| Log messages for the standard input/output files of the Db2 Big SQL server | $BIGSQL_DIST_VAR/logs/bigsql-stderr.log |
| Diagnostic logs for queries to the Db2 Big SQL server | $BIGSQL_DIST_VAR/logs/XQE/*/*.xml |
| Scheduler log files that exist only on the Db2 Big SQL head node and contains scheduler information | $BIGSQL_DIST_VAR/logs/bigsql-sched.log |
| Stdout and stderr output from the scheduler | $BIGSQL_DIST_VAR/logs/bigsql-sched.out |
| Native I/O service log files | $BIGSQL_DIST_VAR/logs/dfsreader* |
| Db2 Big SQL database engine runtime log files | $BIGSQL_DIST_VAR/diag/DIAG* |
| Db2 Big SQL prechecker logs | ../tmp/bigsql/logs |
Db2 Big SQL logs error messages
Many Db2 Big SQL error messages contain a log entry
identifier, a three-part name that enables you to identify which file to refer to for a
particular error message. The identifier consists of three parts:
LLL-NNN-XXXYYYZZZ, where:- LLL
- Identifies which type of log file that contains the error, for example:
- BSL
- The Db2 Big SQL log file, bigsql.log, is where most of the diagnostic information for Db2 Big SQL runtime execution is written ($BIGSQL_DIST_VAR/logs/bigsql.log).
- NRL
- The native reader log file is where the diagnostic information related to the C++ reader is written ($BIGSQL_DIST_VAR/logs/ndfsio*.log).
- SCL
- The scheduler log file, bigsql-sched.log, is where the diagnostic information related to the Db2 Big SQL scheduler is written. It exists only on the node on which the scheduler is running, which is normally the Db2 Big SQL head node ($BIGSQL_DIST_VAR/logs/bigsql-sched.log).
- DDL or DB2®
- The diagnostic information for these identifiers can be found in the $BIGSQL_DIST_VAR/diag directory in most configurations, but the location is configurable.
- NNN
- Identifies the node from which the error came (the DB2 node number).
- XXXYYYZZZ
- Identifies the unique message ID, such that you can search for and find this value in the log file on the particular node.