Monitor sessions and threads with SMI tables
You can use the syssessions and the syssesprof system-monitoring interface (SMI) tables to obtain information about sessions and threads.
Query the syssessions table to obtain the following information.
- Column
- Description
- sid
- Session ID
- username
- Name (login ID) of the user
- uid
- User ID
- pid
- Process ID
- connected
- Time that the session started
- feprogram
- Absolute path of the executable program or application
In addition, some columns contain flags that show the
following information;
- Whether the primary thread of the session is waiting for a latch, lock, log buffer, or transaction
- If the thread is in a critical section.
Important: The information
in the syssessions table is organized by session, and the information
in the onstat -u output is organized by thread. Also, unlike
the onstat -u output, the syssessions table does not
include information about daemon threads, only user threads.
Query the syssesprof table to obtain a profile of the activity of a session. This table contains a row for each session with columns that store statistics on session activity (for example, number of locks held, number of row writes, number of commits, number of deletes, and so on).
For a complete list of the syssessions columns and descriptions of syssesprof columns, see the chapter on the sysmaster database in the HCL OneDB™ Administrator's Reference.