Troubleshooting Guide
This section describes some essential UNIX-based commands for
troubleshooting and performance monitoring. For details on any one of
these commands, precede it with man on the command line.
The following AIX system commands are useful for DB2
troubleshooting:
- errpt
-
The errpt command reports system errors such as hardware errors
and network failures.
- For an overview that shows one line per error, use errpt
- For a more detailed view that shows one page for each error, use
errpt -a
- For errors with an error number of "1581762B", use errpt -a -j
1581762B
- To find out if you ran out of paging space in the past, use errpt |
grep SYSVMM
- To find out if there are token ring card or disk problems, check the errpt
output for the phrases "disk" and "tr0"
- lsps
-
The lsps -a command monitors and displays how paging space is being
used.
- lsattr
-
This command displays various operating system parameters. For example,
use the following command to find out the amount of real memory on the
node:
lsattr -l sys0 -E
This example lets you see the maximum number of processes per user.
- xmperf
-
For AIX systems using Motif, this command starts a graphical monitor that
collects and displays system-related performance data. The monitor
displays 3-dimensional diagrams for each node in a single window, and is good
for high-level monitoring. However, if activity is low, the output from
this monitor is of limited value.
The following UNIX-based system commands are also useful for DB2
troubleshooting. These commands are for all UNIX-based systems,
including AIX, unless otherwise noted.
- df
-
The df command lets you see if file systems are full.
- To see how much free space is in all file systems (including mounted
ones), use df
- To see how much free space is in all file systems with names containing
"dev", use df | grep dev
- To see how much free space is in your home file system, use df
/home
- To see how much free space is in the file system "tmp", use df
/tmp
- To see if there is enough free space on the machine, check the output from
the following commands: df /usr, df /var, df
/tmp, and df /home
- truss
-
Available for SVR4 UNIX-based environments such as Solaris Operating
Environment, Siemens-Nixdorf, SCO OpenServer, and Silicon Graphics IRIX, this
command is useful for tracing system calls in one or more processes. It
is not available for AIX.
- SAM
-
Available for HP-UX, the System Administrative Management (SAM) tool provides
information on hardware errors.
- pstack
-
Available for Solaris 2.5.1 or later, the /usr/proc/bin/pstack
command displays stack traceback information. The /usr/proc/bin
directory contains other tools for debugging processes that appear to be
suspended.
The following tools are available for monitoring the
performance of your UNIX-based system. For a full description of the
commands, see the AIX for RISC System/6000 Performance Monitoring
and Tuning Guide, or the equivalent guide for the system you are using.
- vmstat
-
This command is ideal for monitoring paging rate, which can be found under the
page in (pi) and page out (po) columns. Other important columns are the
amount of allocated virtual storage (avm) and free virtual storage
(fre).
This command is useful for determining if something is suspended or just
taking a long time.
- iostat
-
This command is useful for monitoring I/O activities. You can use the
read and write rate to estimate the amount of time required for certain SQL
operations (if they are the only activity on the system).
This command is also useful for determining if something is suspended or
just taking a long time.
- netstat
-
This command lets you know the network traffic on each node, and the number of
error packets encountered. It is useful for isolating network
problems.
- System file
-
Available for Solaris Operating Environment, the /etc/system file contains
definitions for kernel configuration limits such as the maximum number of
users allowed on the system at a time, the maximum number of processes per
user, and the inter-process communication (IPC) limits on size and number of
resources. These limits are important because they affect DB2
performance on a Solaris Operating Environment machine. Refer to the
Quick Beginnings for further information.
For DB2 Enterprise - Extended Edition systems with a db2nodes.cfg file,
you can run UNIX-based commands on all DB2 nodes by surrounding the commands
with quotation marks and preceding them with one of the following prefix
commands:
- db2_all
-
Provides information for all logical nodes. The following example shows
active applications for all logical nodes:
db2_all ";db2 LIST APPLICATIONS"
- rah
-
Provides information for all physical nodes. This command is useful for
filtering out multiple entries that might occur using db2_all when there are
multiple logical nodes on machines. The following example lists the
first three lines of the hardware error log for each physical node:
rah ";errpt | head -3"
The semicolon (;) improves performance by issuing commands
simultaneously to all nodes. For information on other syntax for
db2_all and rah, see the file raw README in the
misc subdirectory of the sqllib directory and the Administration Guide, Design and Implementation in the appendix on this subject.
The following commands are also useful for DB2 Enterprise - Extended
Edition systems:
- spmon
-
If using multiple nodes on RS/6000 SP systems, you may need to check if the
high performance switch (HPS) is running on all workstations.
To view the status of all nodes, use one of the following commands from the
control workstation:
- spmon -d for ASCII output
- spmon -g for a graphical user interface
Alternatively, use the command netstat -i from a node workstation
to see if the switch is down. If the switch is down, there is an
asterisk (*) beside the node name. For example:
css0* 65520 <Link>0.0.0.0.0.0
The asterisk does not appear if the switch is up.
- db2_call_stack
- The db2_call_stack diagnostic tool writes the call stack
for each DB2 process to a trap file. See Trap Files, for more information.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
[ DB2 List of Books |
Search the DB2 Books ]