Ask a question?
  • Contact Us
  • Support Case System
  • Support Forum

How Do I Interpret Output Of Oplshut?

oplshut -s produces the following output:

[openlink@openlinux bin]$ ./oplshut -s
SVPID SVTYPE  MACHINE         OPSYS APPLIC   DATABASE USERNAME     CONNECT
--------------------------------------------------------------------------------
1480 mys3    dyn2.openlinksw 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. Users can run oplshut +kill svpid to terminate database agents that will not disconnect. For example:
oplshut +kill 1480

oplshut +kill will terminate all connections associated with an agent. 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 - Timestamps the connection''s creation date and time. This field is useful for detection of lingering connections.

Users should compare the output of oplshut -s and ps -ef | grep generic_agent, when stability problems arise. 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.usnet.pr 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 tc
p=16


Output should not be considered normal if ps shows more agents than oplshut.