What is the Sample Open Topology Agent?
The Sample Open Topology Agent is an AIX NetView Service Point application designed to demonstrate the use of the MultiSystem Manager Open Topology Interface Protocol. It also uses the MultiSystem Manager C Toolkit to format the data that is transmitted to the MultiSystem Topology Manager on MVS/ESA.
Compiling and executing the sample agent
A makefile is provided with the sample agent. All of the MultiSystem Manager C Toolkit parts are also included with the sample agent. The sample is written in C and is compiled using the XL C Compiler on AIX. The AIX NetView Service
Point libraries must also be available on the machine which will compile the sample agent.
Compile and Link the sample agent:
make -f flcoagnt.mak
Start the sample agent:
flcoagnt
-or-
flcoagnt& (to execute in background)
Sample Open Topology Agent (Mock-Up) Database
The Sample Open Topology Agent is shipped with a mock-up database. An ASCII file that contains imaginary AIX hosts and sessions (users) logged into the host. At start up the sample agent reads the database and loads the contents into a linked list. From that point forward, the sample agent maintains
topolgy and status information in the linked list.
Seeing What's in the Linked List
A convenience routine is supplied with sample agent to allow you to view the contents of the linked list at any time. The output will be displayed at the AIX terminal where the agent was started.
Here is the syntax for printing the linked list:
netvasis RUNCMD SP=XYZ12345 APPL=FLCOAGNT
CM=NE,SQ=1,TX=(PRINT)
Sending RUNCMDS to the Sample Open Topology Agent
The sample agent is case sensitive. When sending RUNCMDS to the sample agent from the NCCF command line use the "netvasis" prefix. If you prefer to write your own clists or REXX code to send RUNCMDS then use the "address netvasis"
statement.
Command line example:
netvasis RUNCMD SP=XYZ12345 APPL=FLCOAGNT
NM=NE,SQ=1,TX=(CHANGE OBJ=SESS
HNAME=myhost LNAME=root STATUS=130 LOGC=Y)
Changing Topology and Status Information
Topology and status change requests can be accomplished by sending special custom RUNCMDs from NetView to the sample topology agent. The functions allow for the addition of new HOST or SESSion nodes, deletion of existing HOST or SESSion nodes, changing the display status of existing SESSion nodes,
and a convenience routine to print out the contents of database (linked list) at the AIX terminal. The RUNCMD syntax parser provided with the sample agent is rigid. Care must be taken to type information in correctly.
Syntax for adding a new host:
netvasis RUNCMD SP=XYZ12345 APPL=FLCOAGNT
CM=NE,SQ=1,TX=(ADD OBJ=HOST
HNAME=newhost IPADDR=1.2.33.444 MACADDR=123456789012)
Syntax for adding a new session:
netvasis RUNCMD SP=XYZ12345 APPL=FLCOAGNT
CM=NE,SQ=1,TX=(ADD OBJ=SESS
HNAME=newhost LNAME=root LTERM=hft/0)
In order to maintain data integrity, care should be taken to add sessions to existing hosts only, or add a new host before adding sessions to it. None of the data management routines in the sample check for data integrity.
Syntax for deleting an existing session:
netvasis RUNCMD SP=XYZ12345 APPL=FLCOAGNT
CM=NE,SQ=1,TX=(DELETE OBJ=SESS
HNAME=zeus LNAME=root LTERM=hft/0)
Syntax for deleting an existing host:
netvasis RUNCMD SP=XYZ12345 APPL=FLCOAGNT
CM=NE,SQ=1,TX=(DELETE OBJ=HOST
HNAME=zeus)
In order to maintain data integrity, care should be taken to delete sessions before deleting the related host node. None of the data management routines in the sample check for data integrity.
Syntax for changing the display status of a session:
netvasis RUNCMD SP=XYZ12345 APPL=FLCOAGNT
CM=NE,SQ=1,TX=(CHANGE OBJ=SESS
HNAME=newhost LNAME=root LTERM=hft/0 STATUS=130 LOGC=Y)
Status may only be changed for "real" objects in RODM. Status changes may only be issued against SESSion objects in the sample topology agent. Use the GMFHS decimal numeric display status value for the STATUS parameter.
Stopping the Agent
There are three ways to halt the execution of the sample agent.
- Send a RUNCMD to the program using "EXIT" command.
- Kill the AIX process "flcoagnt."
- Stop the AIX NetView Service Point.
The preferred method for stopping the agent with a RUNCMD is this:
netvasis RUNCMD SP=XYZ12345 APPL=FLCOAGNT
CM=NE,SQ=1,TX=(EXIT)
Stopping the agent in this manner will terminate the program as well as
send a RUNCMD response back to topology manager to indicate that a failure
(agent terminated) has occurred.