%META:TOPICPARENT{name="TroubleshootingUDAUsingEvidence"}% = Output of {{{oplshut}}} = The command {{{oplshut -s}}} produces output like this: {{{ [openlink@openlinux bin]$ oplshut -s SVPID SVTYPE MACHINE OPSYS APPLIC DATABASE USERNAME CONNECT ----------------------------------------------------------------------------------- 1480 mys3 dyn2.example.com msdos cppdmo32 test mysql Mar 30 12:01 }}} Here is a brief overview of the output displayed by {{{oplshut -s}}}: * **SVPID** - Associates a Process Identification Number with a database agent. You can run oplshut +kill <svpid> to terminate database agents that will not disconnect. For example: {{{ oplshut +kill 1480 }}} //**Note:** {{{oplshut +kill}}}} will terminate **all** connections associated with an agent process. This is important since multi-threaded agents may handle multiple connections simultaneously.// * **SVTYPE** - Passes a label which identifies the Domain Alias, which was used to establish the connection. The Domain Aliases appear in the Session Rules Book (oplrqb.ini). For example: {{{ [Domain Aliases] DB2 = db2 Informix 5 = inf5 Informix 6 = inf6 Informix 7.1 = inf71 Informix 7.2 = inf72 Informix 7.3 = inf73 Informix 2000 = inf2000 Ingres 6 = ing6 MySQL 3.x = mys3 }}} These aliases facilitate the resolution and configuration of connections. They associate each connection request with a specific Mapping Rule, Database Agent configuration section, and Environment section. For example: {{{ [Environment MYSQL] CURSOR_SENSITIVITY = LOW [Mapping Rules] mys3:**:**:**:**:**:** = accept generic_mys3 [generic_mys3] Description = Default settings for MySQL 3.x agent Program = mys3_mv Environment = MYSQL ReUse = always }}} * **MACHINE** - Identifies the machine from which the connection request originated. * **OPSYS** - Identifies the operating system of the machine, from which the connection originated. * **APPLIC** - Identifies the application that has initiated the connection. * **DATABASE** - Identifies the target database to which the driver connects. * **USERNAME** - Identifies the username used to authenticate against the database or operating system. * **CONNECT** - The connection's inception date and time. This field is useful for detection of lingering connections. **Note:** If stability problems arise, you should compare the output of the following two commands (substituting your Agent configuration stanza for "generic_agent"):
oplshut -s

ps -ef | grep generic_agent
Certain older Request Brokers can suffer from corruption of the internal tables that they use to monitor connections. Consequently, Brokers lose track of agents. While oplshut -s shows no or few agent connections, ps -ef | grep generic_agent will show many agents. Here is normal oplshut and ps output:
bash$ oplshut -s
SVPID  SVTYPE  MACHINE             OPSYS  APPLIC    DATABASE  USERNAME  CONNECT
------------------------------------------------------------------------------------
30003  mys3    dyn243.example.com  msdos  cppdmo32  Northwin  sa        Apr 09 10:46

bash$ ps -ef | grep generic_mys3
openlink 30003   29324  0 10:46:33  0:00 generic_mys3 +internal 
Abnormal output would have {{{ps}}} showing more agent processes than {{{oplshut}}}.