First occurrence data capture configuration
First occurrence data capture configuration (FODC) behaviour, including the path used to store the FODC package, is controlled by the DB2FODC registry variable, which can be set persistently with the db2set command or changed dynamically (in-memory only) through the db2pdcfg command. FODC behavior can also be customized by updating the call-out scripts (COS) invoked during FODC.
Each partition or member in the instance has its own FODC settings, and you can control how FODC takes place at the partition or member level. If FODC settings exist both at the member or partition level and at the instance level, the member or partition level settings override the instance level settings. For manual FODC, settings can also be overridden by command line parameters you specify, such as the -fodcpath parameter. In partitioned or Db2® pureScale® database environments, if you specify a list of members or partitions for manual FODC, the settings for the first member or partition specified are used.
Persistent settings made with the db2set command do not become effective until the instance is recycled; dynamic settings made with the db2pdcfg command are effective immediately and remain effective in memory until the instance is recycled.
- Where the generated FODC packages are stored (with the FODCPATH setting)
- Whether core dump files are generated or not (with the DUMPCORE setting)
- How big core dump files can become (with the CORELIMIT setting)
- Where the generated core files are stored (with the DUMPDIR setting)
- Whether the db2cos script is invoked when the database manager cannot continue processing (with the ON and OFF setting; the default is ON)
- How often the db2cos script checks the size of the output files generated (with the COS_SLEEP setting)
- How long FODC should wait for the db2cos script to finish (with the COS_TIMEOUT setting)
- How often the db2cos script is invoked during a database manager trap (with the COS_COUNT setting)
- Whether the db2cos script is enabled when the SQLO_SIG_DUMP signal is received (with the COS_SQLO_SIG_DUMP setting)
FODC package directory settings (FODCPATH)
FODC packages can result in the generation of large volumes of diagnostic data that require space to store and can impose a significant processor usage on the system. You can control what directory path FODC sends diagnostic data to, so that you can pick a directory path with sufficient free space available.
The following order is used to determine what FODC path to use:
- Automatic FODC
- FODCPATH registry variable setting
- The FODCPATH parameter for the DB2FODC registry variable can be set at the member or partition level and at the instance level. FODC uses the FODCPATH parameter setting for each partition or member, if set. If a partition or member level setting does not exist, the instance level setting is used.
- No FODC path settings
- By default, if you do not specify any FODCPATH setting at either the member or instance level, FODC sends diagnostic information to the current diagnostic directory path (diagpath or alt_diagpath).
- Manual FODC
- db2fodc -fodcpath command parameter option
- When manually invoking the db2fodc command, you can indicate the location where the FODC package directory is created by specifying the -fodcpath parameter option together with the command. If you specify the -fodcpath parameter with a valid path name, the FODCpackage directory is created in that path.
- FODCPATH registry variable setting
- If you do not specify the -fodcpath parameter with the db2fodc command, and you specified a list of partitions or members, the db2fodc command uses the FODCPATH parameter setting for the DB2FODC registry variable of the first partition or member from the list specified. If the value for that FODCPATH parameter is not set, db2fodc uses the instance level FODCPATH setting. If you do not specify the -fodcpath parameter and do no specify a list of partitions or members, the db2fodc command first tries to use the FODCPATH parameter setting for the current partition or member; if not set, the instance level setting is used.
- No FODC path settings
- By default, if you do not specify any FODC path, first occurrence data capture sends diagnostic information to the current diagnostic directory path (diagpath or alt_diagpath).
Assume that you have a partitioned database environment with 3 members or partitions (0, 1, and 2). The following example shows how to set the FODC path persistently at the instance level for all 3 partitions or members using the db2set command:
FODC path settings can also be performed persistently at the member level for each member, overriding the instance level setting. To make these settings effective, the instance must be recycled. For example, to change the FODC path on member 0, issue the following command:
db2set DB2FODC=FODCPATH=/home/hotel49/juntang/FODC/FODC0 -i juntang 0
If you now want to change the FODC path dynamically on member 1 and member 2, you use the following db2pdcfg commands. These settings are effective immediately and remain in memory until the instance is recycled.
If you want to know what the current FODC settings are for each member or partition in a system, you can use the db2pdcfg -fodc -member all command (in the example, output is abridged and only the FODC path output is shown):
db2pdcfg -fodc FODCPATH=/home/hotel49/juntang/FODC/FODC1 -member 1 db2pdcfg -fodc FODCPATH=/home/hotel49/juntang/FODC/FODC2 -member 2
Database Member 0 FODC package path (FODCPATH)= /home/hotel49/juntang/FODC/FODC0/ Database Member 1 FODC package path (FODCPATH)= /home/hotel49/juntang/FODC/FODC1/ Database Member 2 FODC package path (FODCPATH)= /home/hotel49/juntang/FODC/FODC2/
Customized data collection
The behavior of data collection by db2fodc -hang and db2fodc -perf is also controlled by parameters defined in the TOOL OPTIONS section of the Db2 call-out script that is invoked during FODC. These parameters can be customized by changing the script that is executed during FODC.
customize the data collection on UNIX systems,
copy the script placed in
where symptom is either
Once in this new directory, modify the script as you like. On Windows systems, simply modify
the default script
On UNIX systems, db2fodc first
tries to execute the script in
and, if it is not found, executes the original script in
On Windows systems, the script