3-84 IBM Informix OnLine Database Server Administrator’s Guide
Monitor Shared Memory and Latches
Monitor Shared Memory and Latches
Monitor shared memory (tbstat -o) to capture a static snapshot of OnLine
shared memory that you can use for analysis and comparison.
Monitor latches to determine if a user process is holding a latch or if
contention of shared-memory resources exists.
From the command line, execute tbstat -o to save a copy of the shared-
memory segment. You can execute tbstat -o with a filename parameter to
specify the file to contain the output. Otherwise, the output is saved to
tbstat.out in the current directory. The shared-memory segment file is the
same size as the shared-memory segment. The size of shared memory is
displayed in the tbstat header. After you save a copy of shared memory to a
file, you can execute other tbstat options using the filename as a parameter.
If you do, the tbstat information is derived from the shared-memory segment
stored in the specified file. Refer to page 7-91 for further information about
tbstat -o. Refer to page 7-80 for further information about tbstat filename
syntax and use.
Execute tbstat -p to obtain the value in the field lchwaits, which is the
number of times a user process (any process) was required to wait for a
shared-memory latch. A large number of latch waits typically results from a
high volume of processing activity in which most of the transactions are
being logged. (The number of latches is not configurable and cannot be
increased.) Refer to page 7-92 for a complete listing of all fields that display
when you execute tbstat -p.
Execute tbstat -s to obtain general latch information. The output lists the
address of any user process waiting for a latch. You can compare this address
with the users’ addresses in the tbstat -u output to obtain the user process
identification number. Never kill a database server process that is holding a
latch. If you do, OnLine immediately initiates an abort. Refer to page 7-97 for
a complete listing of all fields that display when you execute tbstat -s.