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.
FODC packages can result in the generation of large volumes of diagnostic data that require space to store and can impose a significant overhead 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:
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:
db2set DB2FODC=FODCPATH=/home/hotel49/juntang/FODC
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.
db2pdcfg -fodc FODCPATH=/home/hotel49/juntang/FODC/FODC1 -member 1
db2pdcfg -fodc FODCPATH=/home/hotel49/juntang/FODC/FODC2 -member 2
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):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/
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.
To customize the data collection on UNIX systems, copy the script placed in /bin/db2cos_symptom to /adm/db2cos_symptom, where symptom is either hang or perf. Once in this new directory, modify the script as you like. On Windows systems, simply modify the default script \bin\db2cos_symptom.bat. On UNIX systems, db2fodc first tries to execute the script in /adm/db2cos_symptom, and, if it is not found, executes the original script in /bin/db2cos_symptom. On Windows systems, the script \bin\db2cos_symptom.bat is always executed.