Was this helpful?
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]
user
Gives information on user sessions. This is the default if no option is specified.
system
Provides information on system sessions.
all
Provides information on user, system, and admin sessions.
admin
Provides information on admin (iimonitor) sessions.
Note:  This option is for GCF servers only.
formatted
Shows additional information for each session in a block format.
stats
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:
ssssssss:tt
ssssssss
Is the session ID
tt
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).
Transaction Mode and Information in Command Output
The output of the show sessions formatted command or formatted sessionid command shows the following, among other items:
Modes: DB: RW  Sess: RW  Txn: multi,rw       Onerror-rollback: stmt
X100 session ID: 1     X100 txn ID: 1672
Modes
The current state of various transaction modes:
DB: xx
Whether database is read only (RO) or read write (RW).
Sess: xx
Whether a session is read only (RO) (SET SESSION READ ONLY has been issued) or read write (RW).
Txn: tttt,yyy
The current transaction state, where
tttt is:
none - No transaction is active
single - A single statement transaction is active (will be autocommitted)
multi - A multi-statement transaction is active (needs an explicit commit or rollback)
yyy is:
rw - Read write
ro - Read only
vro - The Ingres side is read write but the Vector side is read only. This state can occur for cursors.
Onerror-rollback: zzzz
The current on_error rollback action, where zzzz is:
stmt (Default) - Roll back statement
txn - Roll back transaction
X100 session ID
Vector session ID (shown in the first column of vwinfo -o output)
x100 txn ID
The Vector transaction ID, if known.
Note:  A read-only transaction ID is typically 0 (zero), which means that Vector does not need to know the x100 transaction ID. Use the vwinfo dbname -o command to find a Vector session transaction ID. The x100 txn ID is also 0 for a session in a "none" transaction state.
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:
CS_EVENT_WAIT:
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.
CS_MUTEX
Indicates the session is waiting for a semaphore (access to a system data structure).
CS_COMPUTABLE
Indicates the session is able and waiting to run.
CS_INTERRUPT
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
Last modified date: 12/06/2024