Professional Documents
Culture Documents
Db2top - DB2 Monitoring Tool Command: Scope
Db2top - DB2 Monitoring Tool Command: Scope
Scope
db2top can be run in interactive mode or in batch mode.
Authorization
One of the following:
sysadm
sysctrl
sysmaint
sysmon
Required connection
Instance. A connection is not required in replay or client mode.
Command syntax
>>-db2top--+- -A----------------------------+------------------><
+- -a----------------------------+
+- -B----------------------------+
+- -b -suboption-----------------+
+- -C--suboption-----------------+
+- -D--delimeter-----------------+
+- -d--database name-------------+
+- -f--file </HH:MM:SS><+offset>-+
+- -h----------------------------+
+- -i--interval in seconds-------+
+- -k----------------------------+
+- -L----------------------------+
+- -m--duration in minutes-------+
+- -n--node name-----------------+
+- -o--outfile-------------------+
+- -P--dbpartition number--------+
+- -p--password------------------+
+- -R----------------------------+
+- -s--number--------------------+
+- -u--username------------------+
+- -V--schema--------------------+
'- -x----------------------------'
Command parameters
-A
Enables automatic performance analysis. The db2top command produces a top five
performance report. Use this option in replay and background mode (-b option). Typical
usage includes:
Running db2top in collection mode for a long period (for example, 4 hours):
db2top -f collect.file -b l -A
Running db2top in replay mode, jumping to the desired point in time to analyze further:
The following options can only be used with the -b option: -X, -L, -A, -s, -D, -o.
-C
Runs db2top in snapshot collector mode. Raw snapshot data is saved in <db2snap-
<dbname>-<Machine><bits><.bin> by default (unless -f is specified). Pipe can
also be specified for output instead of file. Specifying multiple suboptions for collector
mode (-C) are supported. To include locks information in the collection file, use -x along
with -C. The -C parameter takes one of the following suboption values:
b : bufferpools
D : Dynamic SQL
d : database
F : Federation
l : sessions
s : Statements
T : Tables
t : tablespaces
U : Locks
The db2top command runs in replay mode if the -C command parameter is not specified.
-D delimeter
Specifies the field delimiter (single character). Use in background mode (-b option).
-d database name
Specifies the database to monitor.
-f file </HH:MM:SS><+offset>
If -f is not specified db2top is run in replay mode. If -f is specified it indicates
output filename. The database name specified with -d does not need to exist. It is
only referenced if you want to issue explains or Dump DB Struct.
In replay mode (-C option is not used), if snapshot data has been previously
collected in <file>, offset jumps to a certain point in time in the file. It can be
expressed in seconds (+10s), minutes (+10m) or hours (+10h). / HH:MM:SS skips
entries until the specified point in time.
In the collector mode (-C option is used), you can specify the output filename.
</HH:MM:SS><+offset> will be ignored if you are in collector mode
-h
Displays usage information for the db2top command.
-i interval in seconds
Specifies the delay between screen updates. The delay time cannot be less than one
second.
-k
Displays actual or delta values. For all functions in delta mode, delta values are computed
and displayed on a per second basis regardless of the specified refresh interval.
-L
Specifies that statements that are currently executing or most recent statements from
current sessions are captured at each reporting interval specified by the -i option. If an
SQL statement starts and finishes between an interval, it will not be included.
Currently executing or the most recent SQL statement for a connected session are
captured at each interval (as specified by -i option). If a SQL statement starts and finishes
between an interval, it will not be caught.
-m duration in minutes
Limits the duration of db2top in minutes for -b and -C parameters.
-nnode name
Specifies the node to attach to.
-o
Specifies the output file name. Used in background mode (-b option).
-P dbpartition number
Specifies the database partition number on which the snapshot will be issued . If -P is
specified and the dbpartition number is not specified, db2top will attach to the default
database partition.
-p
Specifies the password used to access the database. If omitted and the -u option has been
specified, the user is prompted for the password
-R
Resets snapshot at startup.
-s number
Specifies how many samples will be displayed. Only supported in background mode (-b
option).
-u
Specifies the username used to access the database.
-Vschema
Specifies the default schema used in explains.
-x
Specifies whether to display additional counters on session and application screens
(might run slower on session).
db2top -f db2snap-CUST-AIX64.bin