2. Using Ingres Commands : iimonitor Command—Administer DBMS, Recovery, and GCF Servers : iimonitor Utility Commands : Show Sessions Command
Share this page                  
Show Sessions Command
The iimonitor show sessions command displays a list of active sessions and their current states.
The show sessions command has the following format:
show [user]|system|all|admin sessions[formatted|stats]
Gives information on user sessions. This is the default if no option is specified.
Provides information on system sessions.
Provides information on user, system, and admin sessions.
Provides information on admin (iimonitor) sessions.
Note:  This option is for GCF servers only.
Shows additional information for each session in a block format.
Displays block (message) I/O counts.
Session ID Format in Command Output
The output of the show sessions command displays the session ID in the following format:
Is the session ID
Is the thread ID (for DBMS and recovery servers) or the GCA association ID (for GCF servers).
In the example 8125620:2, the notation :2 is the GCA association ID specific to the given server, when available. This ID may also be shown in error logs and trace output.
Note:  The association ID in one server (for example, Name Server) does not necessarily match the association ID in another server (for example, Communications Server).
Output of Show All Sessions Command
This command shows a list of all active sessions, their threads, and current states:
show all sessions
Possible session states displayed in the output are as follows:
Indicates the session is waiting for an event. The event type is shown in parentheses, and can be any of these:
(LOCK)—The session is waiting for a lock to be granted.
(DIO)—The session is waiting for a disk I/O to complete.
(LOG-IO) – The session is waiting for the completion of I/O to the transaction log.
(BIO)—The session is waiting for a message to be received from or sent to its associated user interface.
(GWFIO)—The session is waiting for completion of a request it has made through a gateway to a non-Ingres database.
Indicates the session is waiting for a semaphore (access to a system data structure).
Indicates the session is able and waiting to run.
Indicates the session’s current wait state can be interrupted, if needed.
The system sessions include server threads. Server threads are as follows:
Admin thread
Assists in administrative chores.
Note:  This thread cannot be seen with iimonitor.
Idle thread
Assists in administrative chores.
Event thread
Handles event processing.
Write behind thread
Performs write behind processing.
Consistency point thread
Performs consistency points. (This thread was previously called Fast Commit, but all servers—including non-Fast Commit servers-- now use this thread.)
Dead process thread
Checks for abnormal process termination.
Force abort thread
Performs force abort processing.
Group commit thread
Performs group commit processing.
Lock callback thread
Performs all lock callback actions.
Log writer thread
Performs transaction logfile writes.
Security audit thread
Performs security auditing (in C2 enabled servers only).
The iimonitor utility can also be used to connect to the recovery process (DMFRCP). Formatting the recovery thread in the recovery process displays the current state of online recovery operations, if any are taking place. The recovery process is multi-threaded, and has the following threads that can be viewed with iimonitor:
Recovery thread
Performs online recoveries
Consistency point timer thread
Performs timed consistency points