Permission required: Privileged user (server control privilege).
The iimonitor utility allows a system administrator or other privileged user to perform session and server connection functions for DBMS, recovery, and GCF servers, including:
If you are using iimonitor to terminate a session that has an active transaction, the server first rolls back the transaction. The session is not completely removed until the rollback is complete.
The iimonitor command has the following format:
iimonitor server_id
Identifies the GCF address of the server.
To obtain the GCF address of a server, use the iinamu utility or the csreport utility (on UNIX). The csreport utility shows DBMS and recovery servers only.
This server ID can also be found in the installation log file (errlog.log).
At the IIMONITOR > prompt, several commands are available.
The iimonitor help command lists the available commands in the iimonitor utility for the given server.
The help command has the following format:
help
The iimonitor show server command displays information about the given server, including the number of sessions currently active or connected to it, the state of the server, and the CPU usage in terms of quanta used.
The show server command has the following format:
show server [listen|shutdown]
Displays the server listen state, either OPEN or CLOSED
Displays the server shutdown state, either OPEN or PENDING
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.
The output of the show sessions command displays the session ID in the following format:
ssssssss:tt
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).
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:
Assists in administrative chores.
Note: This thread cannot be seen with iimonitor.
Assists in administrative chores.
Handles event processing.
Performs write behind processing.
Performs consistency points. (This thread was previously called Fast Commit, but all servers—including non-Fast Commit servers-- now use this thread.)
Checks for abnormal process termination.
Performs force abort processing.
Performs group commit processing.
Performs all lock callback actions.
Performs transaction logfile writes.
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:
Performs online recoveries
Performs timed consistency points
The iimonitor format sessions command displays information about the session. Its output is similar to the output of the show sessions formatted command.
The format sessions command has the following format.
format [user]|admin|system|all [sessions]
Provides information on user sessions. This is the default if no option is specified.
Provides information on admin (iimonitor) sessions.
Note: This option is for GCF servers only.
Provides information on system sessions.
Provides information on all active sessions.
The iimonitor set server command controls the state of the given server. This command can be run by a privileged user only.
The set server command has the following format:
set server shut|closed|open
Disallows additional connections and shuts down the server when currently connected sessions finish.
Disallows additional connections.
Allows new connections and cancels a pending set server shut
The iimonitor stop server command stops the given server immediately. Client sessions are dropped. This command can be run by a privileged user only. Use this command only if absolutely necessary, for example, if an Ingres tool program is hanging.
The stop server command has the following format:
stop server [force]
Terminates server immediately.
Note: This option applies to GCF servers only.
The following iimonitor commands perform actions on all server sessions or a specific server session.
The iimonitor commands that perform actions on sessions have the following format:
remove|suspend|resume|kill session_id
Disconnects a particular user session. It cannot be used to drop system threads. This command can be run by a privileged user only.
Suspends a compute-bound session to allow a trace of the problem. This option is not available for GCF servers.
Resumes a suspended session. This option is not available for GCF servers.
Terminates the currently executing query while leaving the user session connected. This option is not available for GCF servers.
Specifies to perform the action on the specified session (sessionid). To display the session ID, use the iimonitor utility show sessions command.
The iimonitor quit command terminates the iimonitor session.
The quit command has the following format:
quit
The iimonitor commands that are specific to GCF servers include the following:
The iimonitor set trace command enables or disables dynamic tracing on a GCF server.
Note: This command overrides trace settings in config.dat and environment variables.
The set trace command has the following format:
set trace attribute value
Specifies the trace attribute being set. Valid attributes are:
Specifies a trace output log file. The associated attribute value is the full disk path and file name of the log file or "none" to disable all tracing.
The value to be assigned to a trace attribute. Valid values are dependent on the trace attribute being set.
Examples: Set Trace Command
The following iimonitor command opens the trace file specified by value:
set trace log value
The following iimonitor command closes the log file:
set trace log NONE
The iimonitor register server command allows a GCF server to dynamically register its listen address with the Name Server.
Note: Using this command is the preferred method for restoring server registrations that have been lost or manually removed.
The register server command has the following format:
register server
The iimonitor remove tickets command removes installation password tickets stored by the Name Server.
Note: This command is valid for the Name Server only.
The remove tickets command has the following format:
remove [all]|local|remote tickets
Removes all tickets.
Removes local tickets only.
Removes remote tickets only.
The iimonitor remove pooled sessions command terminates all DBMS sessions in the connection pool.
Note: This command is valid for the Data Access Server (GCD process) only.
This command has the following format:
remove pooled sessions