Was this helpful?
iimonitor Utility Commands
At the IIMONITOR > prompt, several commands are available.
Help Command
The iimonitor help command lists the available commands in the iimonitor utility for the given server.
The help command has the following format:
help
Show Server Command
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]
listen
Displays the server listen state, either OPEN or CLOSED
shutdown
Displays the server shutdown state, either OPEN or PENDING
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).
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
Format Sessions Command
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]
user
Provides information on user sessions. This is the default if no option is specified.
admin
Provides information on admin (iimonitor) sessions.
Note:  This option is for GCF servers only.
system
Provides information on system sessions.
all
Provides information on all active sessions.
Set Server Command
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
shut
Disallows additional connections and shuts down the server when currently connected sessions finish.
closed
Disallows additional connections.
open
Allows new connections and cancels a pending set server shut
Stop Server Command
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]
force
Terminates server immediately.
Note:  This option applies to GCF servers only.
iimonitor Commands That Perform Actions on Sessions
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
remove
Disconnects a particular user session. It cannot be used to drop system threads. This command can be run by a privileged user only.
suspend
Suspends a compute-bound session to allow a trace of the problem. This option is not available for GCF servers.
resume
Resumes a suspended session. This option is not available for GCF servers.
kill
Terminates the currently executing query while leaving the user session connected. This option is not available for GCF servers.
session_id
Specifies to perform the action on the specified session (sessionid). To display the session ID, use the iimonitor utility show sessions command.
dmtstatrcpstats Command
The dmtstatrcpstats command enables or disables the Recovery Server statistics thread (started if II_RCP_STATS is defined before the server starts).
This command has the following format:
dmtstatrcpstats delay
delay
Specifies the interval in seconds between the samples taken by the Recovery Server’s statistics thread. A value of 0 disables the thread and closes the statistics file.
Quit Command
The iimonitor quit command terminates the iimonitor session.
The quit command has the following format:
quit
The exit command is a synonym for quit.
iimonitor Commands Specific to GCF Servers
The iimonitor commands that are specific to GCF servers include the following:
set trace
register server
remove tickets
remove pooled sessions
Set Trace Command
The iimonitor set trace command dynamically enables or disables tracing on a GCF server. Dynamic tracing allows tracing to be limited to specific times, which can be useful to trap specific conditions or to reduce the volume of trace output. Dynamic tracing allows tracing to be turned on and off without having to recycle GCF servers.
Note:  This command overrides trace settings in config.dat and environment variables.
The set trace command has the following format:
set trace attribute value
attribute value
Specifies the trace attribute and its value. Valid values depend on the trace attribute being set. Valid attributes are:
level, GCA, GCS, or API (iigcd only)
Specifies type of tracing to perform. “level” turns on the default tracing associated with that GCF server:
GCC—Communications Server - COMSVR (iigcc)
GCD—Data Access Server - DASVR (iigcd)
GCN—Name Server - NMSVR (iigcn)
GCA, GCS or API (for iigcd only) can be specified in addition to or instead of "level" to provide tracing for those areas in the server.
Note:  The 3-character trace mnemonic is equivalent to setting Ingres variable II_XXX_TRACE or config.dat XXX_trace_level for the server connected to, where XXX is GCA, GCS, API, GCC, GCD, or GCN. For more details on tracing GCF servers for diagnostic purposes, see the Connectivity Guide and System Administrator Guide.
The associated attribute value is the level of tracing from 0 to 5, with a higher value providing more detailed tracing. GCD tracing levels are from 0 to 6.
log
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.
Note:  All tracing from a server is directed to a single output file. As a result, any trace settings configured using a non-dynamic method (that is, configured through config.dat instead of iimonitor) will also be enabled when log is set to a trace file.
Examples: Set Trace Command
When connected to the Communications Server, the following iimonitor commands turn on GCC and GCA tracing in that server to levels 3 and 5 respectively and write the output to trace file /tmp/gcc_log:
set trace level 3
set trace GCA 5
set trace log /tmp/gcc.log
The following iimonitor command closes the log file:
set trace log NONE
Register Server Command
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
Remove Tickets Command
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
all
Removes all tickets.
local
Removes local tickets only.
remote
Removes remote tickets only.
Remove Pooled Sessions Command
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
Last modified date: 08/28/2024