Customizing trace and log settings

You can modify the trace and log settings for IBM® Db2® Data Management Console.

In IBM Db2 Data Management Console the trace/logs and cache information are stored in the following locations:

<dmc_home>/logs – Db2 Data Management Console logs

<dmc_home>/work – Liberty cache and dump files and Db2 Data Management Console cache.

where <dmc_home> is the Home directory of IBM Db2 Data Management Console. To know more about finding the Home directory, see Locating Db2 Data Management Console home directory.

Optional: To redirect the IBM Db2 Data Management Console trace/log and cache information to a new path, do the following steps:
  1. Stop the console.
  2. Modify the WLP_OUTPUT_DIR and LOG_DIR attributes in the <dmc_home>/wlp/usr/servers/dsweb/server.env file to new location.
    Note:
    • WLP_OUTPUT_DIR specifies the console Liberty cache, Liberty log (dump files) path. LOG_DIR specifies the console trace/log information path.
    • Use the full path to assign values to WLP_OUTPUT_DIR and LOG_DIR.
    • When you assign values to WLP_OUTPUT_DIR and LOG_DIR, if the console is running on the Windows platform, use the path separator "/" instead of "\".
  3. Start the console.
To modify the tracing level for each component, access logUtils.sh and update the values.
<dmc_home>/dsutils/bin/logUtils.sh 
Usage: "logUtils.sh <admin|dbapi|monitor|explain|runsql|all> <trace|info>"

By default, the log level is info. To collect more debug information, set the value to trace.

In addition, each component has a trace file of 10 MB and the number of logs rolling is 4 files maximum.

To modify the tracing max file size and number of rolling logs, do the following:

  1. Stop the console.
  2. From the \Config folder of your IBM Db2 Data Management Console installation, select and open the XXX_log.properties file.
  3. Modify the options: MaxFileSizeInM=10 and MaxEdition=4
  4. Start the console.
    Note: In general, it is not recommended to increase the log level unless you need an extra debug information for diagnostic purpose. You can increase/decrease the max file size and number of rolling logs as required.
    The FFDC (First Failure Data Capture) directory preserves the information that is generated from a processing failure used by IBM Support. You can remove the FFDC information after investigation.

    The dump file is created in the /work/dsweb directory. If you modify the WLP_OUTPUT_DIR attribute in sever.env, the dump file will be stored in <WLP_OUTPUT_DIR>/dsweb directory. You can remove the dump files (javadump, core, heapdump etc.) after investigation.

    The workarea directory stores caching info for Liberty, it is not recommended to remove it for performance reasons. If needed, for example if you experience a startup problem after upgrade, then you can clean the cache as follows:
    1. Stop the console.
    2. Go to <dmc_home>/wlp/bin/server and run the following command:
       start dsweb –clean
    3. Stop the console.
    4. Start the console.