The db2trcon command
issues the db2trc command with the on option.
This
command has several options which helps with using the db2trc command.
The db2trcon command can issue the db2trc command
for a period of time and it can also issue the db2trc command
to be turned on for the top CPU consuming EDUs.
The db2trcon command supports all the
parameters of the db2trc command.
Authorization
To trace a DB2® instance on a UNIX operating
system, you must possess one of the following authorizations:
To trace the DB2 Administration
Server on a UNIX operating system:
Command syntax
>>-db2trcon--+--------------------------+----------------------->
'- -duration--duration_num-'
>--+----------------------------------------------+------------->
'- -top--top_num--+--------------------------+-'
'- -interval--interval_num-'
>--+-------+--+-------+--+--------+----------------------------><
'- -flw-' '- -fmt-' '- -help-'
Command parameters
- -duration duration_num
- Specifies that trace is turned on for the specified time in seconds.
- -top top_num
- Specifies that trace is turned on for the top CPU consuming EDUs.
The maximum number of EDUs for which the trace can be enabled for
is 64.
- -interval -interval_num
- Specifies the time period in seconds for collecting the top CPU
consuming EDUs. If this option is not specified the default time period
is 10 seconds.
- -flw
- Generates a trace flow report. The name of the flow files are db2trcon.<time-stamp>.flw.
The value of <time-stamp> has the
following format, hours_minutes_seconds.
- -fmt
- Generates a trace format report. The name of the format files
are db2trcon.<time-stamp>.fmt. The value
of <time-stamp> has the following
format, hours_minutes_seconds.
- -help
- Displays help information.
Examples
The following example turns the
db2trc command
on for 1 minute:
db2trcon -duration 60
To turn the
db2trc command
on for the top 10 CPU consuming EDUs for the default time period of
10 seconds and to place the trace in
tmpDump.dmp,
issue:
db2trcon -top 10 -f tmpDump.dmp
The following example turns the
db2trc command
on for 45 seconds for the top 5 processor time consuming EDUs, collected
in 15 second intervals. When the
db2trc command
is turned off,
db2trcon generates the dump, flow
and format files.
db2trcon -duration 45 -top 5 -interval 15 -fodc -ff
Usage notes
The db2trcon command
always generates a dump file if issued with the -duration parameter.
The db2trcon command also always generates a trace
dump file if it is issued without the -f parameter
from the db2trc command. The name of the dump file
is db2trcon.<time-stamp>.dmp. The value
of <time-stamp> has the following
format, hours_minutes_seconds.