Parsing a Db2 trace into readable text

You can format binary dump files from the db2trc command into a text file by using the formattedFlow or fflw parameter.

This parameter is used to format a binary trace dump file into text (similar to flow command), sorted in chronological order instead of being grouped by process ID (PID). The formattedFlow command allows merging of the flow format records into one group. It also enables each record to carry the original process ID (PID) or thread ID (TID), engine dispatchable unit (EDU) name, and member (node) number. The formattedFlow then sorts the records by the record ID in chronological order. This allows a global and chronological view of what happened in the entire Db2 system.

Example

The following command creates formatted output in the out.fflw file:

db2trc formattedFlow trc.dmp out.fflw

The sample output is as follows:

PID-TID      EduName Node RecordNum Function
[...]
12648456-258 db2wdog [ 0] 19735     |||cryptContextInit entry
12648456-258 db2wdog [ 0] 19736     |||cryptContextInit data [probe 10]
12648456-258 db2wdog [ 0] 19737     |||cryptContextInit data [probe 100]
12648456-258 db2wdog [ 0] 19738     |||cryptContextInit exit
12648456-258 db2wdog [ 0] 19739     ||sqloWatchDogSetup data [probe 2]
12648456-258 db2wdog [ 0] 19740     ||sqloWatchDogSetup exit
12648456-258 db2wdog [ 0] 19741     ||sqlogmblkEx entry
12648456-258 db2wdog [ 0] 19742     |||sqloGetPrivatePoolHandle entry
12648456-258 db2wdog [ 0] 19743     |||sqloGetPrivatePoolHandle exit
11731144-258 db2sysc [ 0] 19744     sqloGetEnvInternal entry
11731144-258 db2sysc [ 0] 19745     sqloGetEnvInternal exit [rc = 0x870F0104 = -2029059836 = RC_ENV_NOT_FOUND]
12648456-258 db2wdog [ 0] 19746     ||sqlogmblkEx mbt [Marker:PD_OSS_ALLOCATED_MEMORY ]
12648456-258 db2wdog [ 0] 19747     ||sqlogmblkEx exit
11731144-258 db2sysc [ 0] 19748     sqloSystemControllerMain entry
11731144-258 db2sysc [ 0] 19749     |sqloChangeProcessName entry
11731144-258 db2sysc [ 0] 19750     |sqloChangeProcessName data [probe 5]
11731144-258 db2sysc [ 0] 19751     |sqloChangeProcessName exit
11731144-258 db2sysc [ 0] 19752     |sqloGetShrEDUWaitElem entry
11731144-258 db2sysc [ 0] 19753     ||sqlo_waitlist::initialize entry
11731144-258 db2sysc [ 0] 19754     ||sqlo_waitlist::initialize exit
11731144-258 db2sysc [ 0] 19755     ||sqlogmblkEx entry
11731144-258 db2sysc [ 0] 19756     ||sqlogmblkEx mbt [Marker:PD_OSS_ALLOCATED_MEMORY ]
11731144-258 db2sysc [ 0] 19757     ||sqlogmblkEx exit
11731144-258 db2sysc [ 0] 19758     |sqloGetShrEDUWaitElem data [probe 10]
11731144-258 db2sysc [ 0] 19759     |sqloGetShrEDUWaitElem data [probe 20]
11731144-258 db2sysc [ 0] 19760     |sqloGetShrEDUWaitElem exit
12648456-258 db2wdog [ 0] 19761     |sqloRunInstance data [probe 2]
12648456-258 db2wdog [ 0] 19762     |sqloRunInstance exit
11731144-258 db2sysc [ 0] 19763     |sqloGetKernelThreadIDFromEDUID entry [eduid 258 eduname db2sysc]