0 оценок0% нашли этот документ полезным (0 голосов)
204 просмотров38 страниц
SNMP (simple network management protocol) is a mechanism originally devised to monitor and manage networked devices. SNMP has since been adapted to also manage systems and software applications: - Tuxedo, CICS, Oracle, WebLogic, MQseries, and so on.
SNMP (simple network management protocol) is a mechanism originally devised to monitor and manage networked devices. SNMP has since been adapted to also manage systems and software applications: - Tuxedo, CICS, Oracle, WebLogic, MQseries, and so on.
SNMP (simple network management protocol) is a mechanism originally devised to monitor and manage networked devices. SNMP has since been adapted to also manage systems and software applications: - Tuxedo, CICS, Oracle, WebLogic, MQseries, and so on.
Information Bases (MIBS) At the end of this module, you will be able to: Understand the BEA Tuxedo MIBs and the BEA SNMP agent Perform advanced monitoring tasks using tuxconfig and ud32 scripts Use the AdminAPI to implement dynamic configuration updates to a Tuxedo application Module 14 Accessing the Tuxedo Management Information Bases-1 2006 BEA Systems, Inc. 418 Road Map 1. SNMP and MIBs The Simple Network Management Protocol (SNMP) The BEA SNMP Agent Understanding Management Information Bases (MIBs) The BEA Tuxedo MIB Overview of the Tuxedo TM_MIB 2. Using the Tuxedo AdminAPI Accessing the Tuxedo Management Information Bases-2 2006 BEA Systems, Inc. 419 What Is SNMP? SNMP (Simple Network Management Protocol) is a mechanism originally devised to monitor and manage networked devices: Mostly hardware devices like printers, routers, bridges, etc. SNMP has since been adapted to also manage systems and software applications: Tuxedo, CICS, Oracle, WebLogic, MQseries, and so on. SNMP defines three basic commands SET: sets an attribute to a value GET: retrieves the value of an attribute GETNEXT: same as GET but with cursors Accessing the Tuxedo Management Information Bases-3 2006 BEA Systems, Inc. 420 Tuxedo & Enterprise Management TLOG ULOG Bulletin Board EVENTS MIB API Command-Line Utilities Administration Console EventBroker
Enterprise Management Console SNMP Browser MIB Most major Enterprise Management products support Tuxedo administration. Accessing the Tuxedo Management Information Bases-4 2006 BEA Systems, Inc. 421 SNMP Management Consoles SNMP management consoles provide a GUI that provides a visualization of the parameters of a system. Commercial SNMP consoles include: HP OpenView Tivoli BMC Patrol BEA SNMP Agent provides: MIB management through a command line interface. Mapping between SNMP consoles and Tuxedo. Accessing the Tuxedo Management Information Bases-5 2006 BEA Systems, Inc. 422 The BEA SNMP Agent The BEA SNMP Agent provides access to Tuxedo MIBs from SNMP management consoles.
SNMP Management Console (OpenView, Tivoli, ) Tuxedo Domain BBL Tuxedo MIB /WS MIB ACL MIB /Event MIB /Domain MIB /Q MIB BEA SNMP Agent SNMP asn.1 notation Tuxedo FML32 buffers Accessing the Tuxedo Management Information Bases-6 2006 BEA Systems, Inc. 423 What Is a MIB? A MIB (Management Information Base) is a collection of attributes and value pairs associated with a class or object. A MIB class is used in a broad sense, as being an entity that has attributes. In Tuxedo, internal MIB classes are accessed and modified using the Tuxedo AdminAPI. MyMIB
MyClass
Value4 Attribute4 Value3 Attribute3 Value2 Attribute2 Value1 Attribute1 Values Attributes Accessing the Tuxedo Management Information Bases-7 2006 BEA Systems, Inc. 424 BEA Tuxedo MIBs A collection of MIBs provide access to Tuxedo system parameters. Each system component has its own MIB. Tuxedo provides these six MIBs: Security Access Control List ACLs (ACL) Workstation Clients Machines, Groups, Servers, Services, MsgQueues Tuxedo (TM) /WS (WS) Event Broker Subsystem Events (EVENT) Domain Gateways Domain (DM) /Q Subsystem /Q (APPQ) Provides Management of: Available MIBs Accessing the Tuxedo Management Information Bases-8 2006 BEA Systems, Inc. 425 TM_MIB Classes TM_MIB is the primary MIB for the core Tuxedo system. TM_MIB classes define properties accessible by an attribute name, for example: T_GROUP>TA_GRPNO We will cover only a few of these classes and properties in this module. Refer to the TM_MIB documentation (section 5) for more details TM_MIB
... T_GROUP Class
SITE1 TA_LMID 1 TA_GRPNO APPGRP1 TA_SRVGRP Values Attributes T_SERVER Class
ACTIVE TA_STATE 117 TA_SRVID APPGRP1 TA_SRVGRP Values Attributes Accessing the Tuxedo Management Information Bases-9 2006 BEA Systems, Inc. 426 TM_MIB Documentation We will focus on the TM_MIB classes since they contain the most commonly accessed attributes. The next few slides provide an example of MIB class table information, however we encourage you to: Follow along with the actual documentation. Navigate to Reference>Section 5>TM_MIB(5) Accessing the Tuxedo Management Information Bases-10 2006 BEA Systems, Inc. 427 T_MACHINE Class Definition The T_MACHINE class represents application attributes pertaining to a particular server machine: TLOG
Default Complete network address used by the tlisten process Complete network address used by the Bridge process Name of the transaction log for this machine Device or system file holding transaction log Environment file for clients and servers Absolute path to location of application files Absolute path to location of Tuxedo home directory Absolute path to tuxconfig file Logical machine identifier Description string[256] string[256] string[30] string[256] string[256] GET :"ACT|INA|MIG|CLE|RES|SUS|PAR|DEA" SET :"NEW|INV|ACT|INA|DEA" string[256] string[256] string[256] string[30] Values TA_NLSADDR TA_NADDR TA_TLOGNAME TA_TLOGDEVICE TA_ENVFILE TA_LMID TA_TUXCONFIG TA_STATE TA_APPDIR TA_TUXDIR Attribute Accessing the Tuxedo Management Information Bases-11 2006 BEA Systems, Inc. 428 T_GROUP Class Definition Primary and secondary machines Current LMID on where group is running Default
3
TMS executable associated with this group Number of transaction manager servers Information for initiating access to RM Information for terminating access to RM Environment file for servers in group Unique group number Logical name of the server group Description string[256] long: 2..10 string[256] string[256] string[256] string[30] GET:"ACT|INA|MIG" SET:"NEW|INV|ACT|RAC|INA|MIG" LMID1[,LMID2] long: 1..30,000 string[30] Values TA_TMSNAME TA_TMSCOUNT TA_OPENINFO TA_CLOSEINFO TA_ENVFILE TA_SRVGRP TA_GRPNO TA_CURLIMD TA_STATE TA_LMID Attribute The T_GROUP class represents application attributes pertaining to a particular server group: Accessing the Tuxedo Management Information Bases-12 2006 BEA Systems, Inc. 429 T_SERVER Class Definition Default N 1 86,400
-A Allow for automatic restart by BBL Min and max number of server processes Number of seconds used for MAXGEN period Environment file used by this server Command line options and parameters Group number of this servers group Executable name of this server Unique server ID Group name of this servers group Description {Y|N} 0..1000 0.. string[78] string[256] GET :"ACT|INA|MIG|CLE|RES|SUS|PAR|DEA" SET :"NEW|INV|ACT|INA|DEA" 1..30,000 string[78] 1..30,001 string[30] Values TA_RESTART TA_MIN, TA_MAX TA_GRACE TA_ENVFILE TA_CLOPT TA_SRVGRP TA_SRVID TA_STATE TA_GRPNO TA_SERVERNAME Attribute The T_SERVER class represents configuration and run-time attributes of servers in the domain: Accessing the Tuxedo Management Information Bases-13 2006 BEA Systems, Inc. 430 T_SERVICE Class Definition 30 0 50 Name of service as advertised string[15] TA_SERVICENAME DDR-based routing criteria in ROUTING Seconds until transaction timeout string[15] TA_ROUTINGNAME Load factor imposed by this service 50 Default Seconds allowed to process requests Dequeuing priority for this service Should transactions be started automatically Overrides domain BLOCKTIME if set Description 0..long 0..long 1..100 1..32,767 {Y|N} GET: ACT|INA SET: NEW|INV 1..32,767 Values TA_TRANTIME TA_SVCTIMEOUT TA_PRIO TA_BLOCKTIME TA_LOAD TA_AUTOTRAN TA_STATE Attribute The T_SERVICE class represents configuration attributes of services within the domain: Accessing the Tuxedo Management Information Bases-14 2006 BEA Systems, Inc. 431 T_MSG Class Definition Logical machine identifier string[30] TA_LMID Time since the last write to this queue PID of the last process to write to this queue PID of the last process to read from this queue Time since the last read from this queue The number of bytes currently on the queue The number of messages currently on the queue Description long: 1..num Maximum number of bytes allowed on the queue long: 1..num long: 1..num long: 1..num long: 1..num long: 1..num long: 1..num Values TA_MSG_QNUM TA_MSG_LSPID TA_MSG_LRPID TA_MSG_QNUM TA_MSG_STIME TA_MSG_RTIME TA_MSG_CBYTES Attribute The T_MSG class represents run-time attributes of the IPC message queues currently active: Accessing the Tuxedo Management Information Bases-15 2006 BEA Systems, Inc. 432 Section Review Understand the use of the BEA SNMP Agent Identify the six Tuxedo MIBs Examine the TM_MIB documentation Review example TM_MIB class attributes In this section, we learned how to: Accessing the Tuxedo Management Information Bases-16 2006 BEA Systems, Inc. 433 Road Map 1. SNMP and MIBs 2. Using the Tuxedo AdminAPI Setting Up and Executing the tmconfig Utility Understanding Common MIB Error Messages Setting Up and Executing the ud32 Utility Example Dynamic Configuration Changes Accessing the Tuxedo Management Information Bases-17 2006 BEA Systems, Inc. 434 Using the AdminAPI FML32 data ATMI tpcall(".TMIB", InBuf, , OutBuf, ); BBL BB Admin Client tuxconfig name/value pairs .TMIB Admin Clients: tmadmin dmadmin tmconfig ud32 AdminConsole custom apps Accessing the Tuxedo Management Information Bases-18 2006 BEA Systems, Inc. 435 Using AdminAPI Utility Clients Two common utilities are available to administrators for dynamic configuration and advanced monitoring tasks: tmconfig - Command-line interactive native client ud32 Native client accepting a text file for input All dynamic updates directly modify tuxconfig: To include the tuxconfig binary files on all nodes in the application that are currently booted. As new machines are booted, the new tuxconfig file is automatically propagated. Both utilities follow a similar usage pattern based on the Tuxedo TM_MIB classes. There is also a similar config subcommand within the dmadmin utility used to access the DM_MIB classes. Accessing the Tuxedo Management Information Bases-19 2006 BEA Systems, Inc. 436 Setting Up tmconfig Updates need Tuxedo administrator privileges. Non-administrators have read-only access. Setup environment variables: TUXCONFIG: pointing to the name and location of the binary version of the configuration file. TUXDIR: pointing to installation directory of Tuxedo. EDITOR (optional): points to your favorite text editor. Well use our SciTE Editor! There is also a workstation client version of tmconfig available called wtmconfig. Requires setting up a WSL. Accessing the Tuxedo Management Information Bases-20 2006 BEA Systems, Inc. 437 Running tmconfig The tmconfig utility can be executed: Separately from the command line. From within tmadmin. The main menu offers options to chose the tmconfig section you want to monitor or modify. The sections correspond to sections of a UBBCONFIG file. Example of invoking tmconfig: C:\> tmconfig Section: 1) RESOURCES, 2) MACHINES, 3) GROUPS 4) SERVERS 5)SERVICES 6) NETWORK 7) ROUTING q) QUIT 9) WSL 10) NETGROUPS 11) NETMAPS 12) INTERFACES [1]: Example use of config sub-command of tmadmin: > config Section: 1) RESOURCES, 2) MACHINES, 3) GROUPS 4) SERVERS 5)SERVICES 6) NETWORK 7) ROUTING q) QUIT 9) WSL 10) NETGROUPS 11) NETMAPS 12) INTERFACES [1]: Accessing the Tuxedo Management Information Bases-21 2006 BEA Systems, Inc. 438 tmconfig Operations Example of Choosing an Operation of a Configuration Section: Operation: 1) FIRST 2) NEXT 3) RETRIEVE 4) ADD 5) UPDATE 6) CLEAR BUFFER 7) QUIT [1]: Clears the input buffer (all fields are deleted). CLEAR BUFFER Retrieves the first record from specified section FIRST Retrieves the next record based on the current key field NEXT Exits tmconfig gracefully QUIT Dynamically updates the record specified in the input buffer in the selected section. UPDATE Dynamically adds a new class entity to this section. ADD Retrieves the record by a key field RETRIEVE Description Operation For any section chosen, a menu of operations are provided: Accessing the Tuxedo Management Information Bases-22 2006 BEA Systems, Inc. 439 Example of displaying parameters for the MACHINES section: C:\> tmconfig
Displaying Machine Parameters Section: 1) RESOURCES, 2) MACHINES, 3) GROUPS 4) SERVERS 5)SERVICES 6) NETWORK 7) ROUTING q) QUIT 9) WSL 10) NETGROUPS 11) NETMAPS 12) INTERFACES [1]: 2 Operation: 1) FIRST 2) NEXT 3) RETRIEVE 4) ADD 5) UPDATE 6) CLEAR BUFFER 7) QUIT [1]: 1 Enter editor to add/modify fields [n]? Perform operation [y]? Return value TAOK Buffer contents: TA_OPERATION 4 TA_SECTION 1 ... TA_TLOGOFFSET 0 TA_TUXOFFSET 0 TA_STATUS LIBTUX_CAT:1137: Operation completed successfully TA_PMID student14 TA_LMID SITE1 TA_TUXCONFIG /home/apps/bank/tuxconfig TA_TUXDIR /home/tuxroot TA_APPDIR /home/apps/bank ... Choose MACHINES section Choose first entry of MACHINES section These are the parameters for the first machine. If this is the first call, there are no fields in the editor. Just display the contents Accessing the Tuxedo Management Information Bases-23 2006 BEA Systems, Inc. 440 Messages and Status After an operation is executed, a message is printed and the TA_STATUS field is updated. Problems with permissions or configuration parameters Operation successful and update performed Operation successful but no update performed Meaning Operation completed successfully. Return value TAOK Update completed successfully. Return value TAUPDATED See next slide Error message (see next slide) TA_STATUS Message Accessing the Tuxedo Management Information Bases-24 2006 BEA Systems, Inc. 441 Error Messages The error status and error message is displayed to the screen. No more space in tuxconfig and/or bulletin board TAENOSPACE Update not allowed TAEUPDATE Field value for a string is too long TAESIZE A field value is required but is not present TAEREQUIRED Record specified was not found TAENOTFOUND Attempted to add a duplicate record TAEDUPLICATE A field value is inconsistently specified TAEINCONSIS UPDATE or ADD used by non administrator TAEPERM A system error occurred and logged in userlog TAESYSTEM Error while reading TUXCONFIG TAECONFIG A field value is either out of range or invalid TAERANGE A blocking timeout occurred TAETIME An OS error occurred an logged in userlog TAEOS Description Operation Accessing the Tuxedo Management Information Bases-25 2006 BEA Systems, Inc. 442 Example of Adding a new Machine: C:\> tmconfig
Adding a New Machine Section: 1) RESOURCES, 2) MACHINES, 3) GROUPS 4) SERVERS 5)SERVICES 6) NETWORK 7) ROUTING q) QUIT 9) WSL 10) NETGROUPS 11) NETMAPS 12) INTERFACES [1]: 2 Operation: 1) FIRST 2) NEXT 3) RETRIEVE 4) ADD 5) UPDATE 6) CLEAR BUFFER 7) QUIT [1]: 4 Enter editor to add/modify fields [n]? y TA_LMID SITE3 TA_TUXDIR SPARC TA_PMID student12 q Perform operation [y]? Return value TAUPDATED Buffer contents: ... TA_STATUS LIBTUX_CAT:1136: Update completed successfully Choose MACHINES section Choose to ADD an entry Enter the editor We need to define these class attributes and values Perform the operation tmconfig displays parameters for the machine we just added Accessing the Tuxedo Management Information Bases-26 2006 BEA Systems, Inc. 443 Adding a New Group Example of adding a new group: C:\> tmconfig
Section: 1) RESOURCES, 2) MACHINES, 3) GROUPS 4) SERVERS 5)SERVICES 6) NETWORK 7) ROUTING q) QUIT 9) WSL 10) NETGROUPS 11) NETMAPS 12) INTERFACES [1]: 3 Operation: 1) FIRST 2) NEXT 3) RETRIEVE 4) ADD 5) UPDATE 6) CLEAR BUFFER 7) QUIT [1]: 4 Enter editor to add/modify fields [n]? y TA_LMID SITE3 TA_SRVGRP GROUP3 TA_GRPNO 3 q Perform operation [y]? Return value TAUPDATED Buffer contents: ... TA_GRPNO 3 TA_TMSCOUNT 0 TA_STATUS LIBTUX_CAT:1136: Update completed successfully TA_LMID SITE3 TA_SRVGRP GROUP3 TA_TMSNAME TA_OPENINFO TA_CLOSEINFO Choose GROUPS section Perform the operation tmconfig displays parameters for the group we just added We need to define these class attributes and values Enter the editor Choose to ADD an entry Accessing the Tuxedo Management Information Bases-27 2006 BEA Systems, Inc. 444 Adding a New Server Example of adding a new server: C:\> tmconfig
Section: 1) RESOURCES, 2) MACHINES, 3) GROUPS 4) SERVERS 5)SERVICES 6) NETWORK 7) ROUTING q) QUIT 9) WSL 10) NETGROUPS 11) NETMAPS 12) INTERFACES [1]: 4 Operation: 1) FIRST 2) NEXT 3) RETRIEVE 4) ADD 5) UPDATE 6) CLEAR BUFFER 7) QUIT [1]: 4 Enter editor to add/modify fields [n]? y TA_SERVERNAME XFER TA_SRVGRP BANKB1 TA_SRVID 5 q Perform operation [y]? Return value TAUPDATED Buffer contents: ... TA_SRVID 5 ... TA_STATUS LIBTUX_CAT:1136: Update completed successfully ... TA_SRVGRP BANKB1 TA_SERVERNAME XFER ... Choose SERVERS section Perform the operation tmconfig displays parameters for the server we just added Choose to ADD an entry We need to define these class attributes and values Enter the editor Accessing the Tuxedo Management Information Bases-28 2006 BEA Systems, Inc. 445 The Complete MIB Request An FML32 buffer is the data structure used to set and retrieve MIB class information. FML32 buffer fields allow SNMP-style SET, GET, and GETNEXT commands. Using the ud32 utility will require these additional attributes.
FML32 fields to GET information for class T_SERVER: TA_OPERATION GET TA_CLASS T_SERVER TA_SRVID 12 R R SET R R GET R R GETNEXT string string TA_OPERATION TA_CLASS Type Field (other fields dependent on the MIB class) Accessing the Tuxedo Management Information Bases-29 2006 BEA Systems, Inc. 446 The ud32 Utility The ud32 utility allows administrators to create scripts that can be used to execute MIB commands. ud32 reads its input from a text file, creates an FML32 buffer and sends it to the BBL. The response is displayed to the screen, or can be redirected to another file. Example content of input_file.txt: SRVCNM .TMIB TA_CLASS T_GROUP TA_OPERATION GET TA_STATE ACTIVE TA_SRVGRP GROUP1 Executing ud32 from the command line: c:\> ud32 < input_file.txt > output_file.txt There is also the Workstation client version: wud32 Accessing the Tuxedo Management Information Bases-30 2006 BEA Systems, Inc. 447 ud32 as an Administration Client The ud32 utility needs access to the FML32 field table definitions in the $TUXDIR/udataobj directory. These can be set using the machines ENVFILE.
The ud32 client executes as a general-purpose application; therefore, SET-ting TM_MIB fields requires tpsysadm privileges. 10 0101 1110 FML32 settings for the ud32 client in a Windows ENVFILE: FIELDTBLS32=Usysfl32,tpadm FLDTBLDIR32=C:\bea\tuxedo9.0\udataobj Example of executing ud32 with tpsysadm privileges: C:\> ud32 C tpsysadm < setAttributes.txt SENT pkt(1) is: SRVCNM .TMIB TA_CLASS T_SERVER . . . Accessing the Tuxedo Management Information Bases-31 2006 BEA Systems, Inc. 448 Example of Adding a Machine Current configuration:
*RESOURCES ... MODEL MP OPTIONS LAN ... *MACHINES MACHINE1 ... MACHINE2 ... We can add a new machine as follows:
c:\> ud32 C tpsysadm < addMachine3.ud UBBCONFIG addMachine3.ud exactly 1 tab exactly 1 blank line Accessing the Tuxedo Management Information Bases-32 2006 BEA Systems, Inc. 449 Example of Adding a Group Current configuration:
*MACHINES ... MACHINE3 LMID=SITE3 ... *GROUPS Group1 GRPNO=1 LMID=SITE1 ... We can add a new group as follows:
SRVCNM .TMIB TA_OPERATION SET TA_CLASS T_GROUP TA_SRVGRP Group3 TA_GRPNO 3 TA_LMID SITE3 TA_STATE NEW
We call the .TMIB service with ud32 as follows:
c:\> ud32 C tpsysadm < addNewGroup.ud addNewGroup.ud UBBCONFIG exactly 1 blank line exactly 1 tab Accessing the Tuxedo Management Information Bases-33 2006 BEA Systems, Inc. 450 Example of Adding a Server Process Current configuration: ... *GROUPS ... Group3 GRPNO=3 LMID=SITE3 ... *SERVERS ... MyServer1 ... MyServer2 ... ... We can add a new server as follows:
SRVCNM .TMIB TA_OPERATION SET TA_CLASS T_SERVER TA_SERVERNAME MyServer3 TA_SRVGRP Group3 TA_SRVID 50 TA_MIN 3 TA_STATE NEW
We call the .TMIB service with ud32 as follows:
c:\> ud32 C tpsysadm < addNewServer.ud UBBCONFIG addNewServer.ud exactly 1 tab exactly 1 blank line Accessing the Tuxedo Management Information Bases-34 2006 BEA Systems, Inc. 451 Example of Changing Routing Criteria The current routing info: *SERVICES DEPOSIT" ROUTING=BranchID *ROUTING BranchID BUFFTYPE=FML32 FIELD=Branch RANGES= 1-6:Group1;7-12:Group2 We can change routing criteria as follows:
SRVCNM .TMIB TA_OPERATION SET TA_CLASS T_ROUTING TA_ROUTINGNAME BranchID TA_RANGES 1-4:Group1; 5-8:Group2; 9-12:Group3 We call the .TMIB service with ud32 as follows:
c:\> ud32 C tpsysadm < changeRoutingCriteria.ud UBBCONFIG changeRoutingCriteria.ud exactly 1 tab exactly 1 blank line Accessing the Tuxedo Management Information Bases-35 2006 BEA Systems, Inc. 452 Section Review Set up and execute the tmconfig utility. Set up and execute the ud32 utility. Use the AdminAPI for advanced monitoring tasks and dynamic configuration modifications. In this section, we learned how to: Accessing the Tuxedo Management Information Bases-36 2006 BEA Systems, Inc. 453 Lab Exercise For details on the exercise, refer to the Lab Guide. If questions arise, ask the instructor. The instructor will determine the stop time. Lab 15 MIBS: Access the Tuxedo MIBS Using the tmconfig and ud32 Utilities Accessing the Tuxedo Management Information Bases-37 2006 BEA Systems, Inc. 454 Module Review Leverage the Tuxedo MIB classes for advanced monitoring tasks and dynamic configuration changes Manage Tuxedo applications with external SNMP consoles Review MIB documentation for more detailed Tuxedo internal functionality In this module, we learned how to: Accessing the Tuxedo Management Information Bases-38