Monitor threads with onstat –u output
Use the onstat –u command to display information about active threads that require a database server task-control block.
Active threads include threads that belong to user sessions, as well as some that correspond to database server daemons (for example, page cleaners). onstat -u output shows an example of onstat -u output.
Also use the onstat -u command to determine if a user is waiting for a resource or holding too many locks, or to get an idea of how much I/O the user has performed.
The utility output displays the following information:
- The address of each thread
- Flags that indicate the present state of the thread (for example,
waiting for a buffer or waiting for a checkpoint), whether the thread
is the primary thread for a session, and what type of thread it is
(for example, user thread, daemon thread, and so on)
For information on these flags, see the HCL OneDB™ Administrator's Reference.
- The session ID and user login ID for the session to which the
thread belongs
A session ID of
0
indicates a daemon thread. - Whether the thread is waiting for a specific resource and the address of that resource
- The number of locks that the thread is holding
- The number of read calls and the number of write calls that the thread has executed
- The maximum number of current, active user threads
If you execute onstat -u while the database
server is performing fast recovery, several database server threads
might appear in the display.