[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference lassie::ucx

Title:DEC TCP/IP Services for OpenVMS
Notice:Note 2-SSB Kits, 3-FT Kits, 4-Patch Info, 7-QAR System
Moderator:ucxaxp.ucx.lkg.dec.com::TIBBERT
Created:Thu Nov 17 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:5568
Total number of notes:21492

5148.0. "can't get trap event from ESNMP chess example" by JIT470::KAWAMOTO (Noriyuki Kawamoto EJ1-2/OGK8F(4842)) Tue Jan 21 1997 19:28

T.RTitleUserPersonal
Name
DateLines
5148.1TRAMP::GRADYSquash that bug! (tm)Thu Jan 23 1997 13:573
5148.2no errors.JIT470::KAWAMOTONoriyuki Kawamoto EJ1-2/OGK8F(4842)Fri Jan 24 1997 00:50204
  I checked log files (SYS$SYSDEVICE:[UCX$SNMP]*.LOG,*.ERR).
  There are no error messages in log files and no *.err files, and chess
  subagent was processed with no errors.

  I'm planning demo (combination of POLYCENTER SystemWatchdog, snmp trap and
  NetView) for my customer.
  If someone could show me complete demo procedure and UCX settings to get snmp
  trap from UCX, it will very helpful for me.


  My operation procedure is as follows.


  I modified CHESS_METHOD.C to check function return value
  and to get some messages.

--------------------- from here
static void gen_trap( OBJECT *moveobj,
	       unsigned char *movedata, 
	       OBJECT *gameobj, 
	       unsigned char *gamedata)
{
#if 1 /* added */
        int status;

        printf("gen_trap called!\n");
#endif

	o_string(&trap_vb[1], moveobj, movedata, strlen(movedata));
	clone_oid(&trap_vb[0].name, &ot[I_gameDescr].oid);

	o_string(&trap_vb[0], gameobj, gamedata, strlen(gamedata));
	clone_oid(&trap_vb[1].name, &moveobj->oid);

#if 1 /* modified */
	status = esnmp_trap(6, 1, prod_oid_str, trap_vb);     
	if (status != ESNMP_LIB_OK) {
	  printf("esnmp_trap failed (%d)\n", status);
	} else {
	  printf("esnmp_trap succeeded (%d)\n", status);
	}
#else
	esnmp_trap(6, 1, prod_oid_str, trap_vb);     
#endif
	free_varbind_data(&trap_vb[0]);
	free_varbind_data(&trap_vb[1]);
}
--------------------- to here


  I tested 2 patterns.

  1. VMS snmp agent (JIT470)   -> DUNIX snmp manager (JIT859)
	OpenVMS AXP 6.2 	     DUNIX 3.2C
	UCX 4.1			     POLYCENTER NetView 4.1B

 ---------------------------+----------+-------------+----------------
 AGENT			    |MANAGER
			    |trigger   |trap receiver|taffic checker
 ---------------------------+----------+-------------+----------------
 $ @SYS$STARTUP:SNMP_STARTUP|	       |	     |
 $ RUN CHESS		    |	       |	     |
			    |          |> traprec    |> tcpdump
			    |> snmpget |	     |
			    |get value |	     |get GetResponse
 ---------------------------+----------+-------------+----------------


  2. DUNIX snmp agent (JP0842) -> DUNIX snmp manager (JIT859)
	DUNIX 4.0		     DUNIX 3.2C
				     POLYCENTER NetView 4.1B

 ---------------------------+----------+-------------+----------------
 AGENT			    |MANAGER
			    |trigger   |trap receiver|taffic checker
 ---------------------------+----------+-------------+----------------
 > chess_mib		    |	       |	     |
			    |          |> traprec    |> tcpdump
			    |> snmpget |	     |
			    |get value |get trap     |get GetResponse and trap
 ---------------------------+----------+-------------+----------------

*****************************
* pattern 1		    *
* chess subagent ON OpenVMS *
*****************************

On VMS Agent node (JIT470)
  make subagent and run it (by SYSTEM ACCOUNT)

	$ CC/DEFINE=OPENVMS/STANDARD=VAXC/INC=UCX$SNMP CHESS_METHOD
	$ CC/DEFINE=OPENVMS/STANDARD=VAXC/INC=UCX$SNMP CHESS_MIB
	$ CC/DEFINE=OPENVMS/STANDARD=VAXC/INC=UCX$SNMP CHESS_TBL
	$ LINK /EXEC=CHESS CHESS_SUBAGENT/OPT
	%RUN-S-PROC_ID, identification of created process is 20800306
	%RUN-S-PROC_ID, identification of created process is 20800307

	$ @SYS$STARTUP:UCX$SNMP_STARTUP
	$ R CHESS

On SNMP Manager node (JIT859:DUNIX)
  issue snmpget command

	> /usr/OV/bin/snmpget jit470 dec.ema.sysobjectids.decosf.chess.moveTable.moveEntry.moveByWhite.4.24
>>	dec.ema.sysobjectids.decosf.chess.moveTable.moveEntry.moveByWhite.4.24 : DISPLAY STRING- (ascii):  24. Qxe8+!

  I can get MIB value.

On SNMP Manager node (JIT859)
	> /usr/OV/prg_samples/ovsnmp_app/rectrap	<- this command is issued before snmpget command.

	... no responce

	(Previously, I used /usr/OV/bin/nvevents, but it is X application and
	difficult to show operation log, so I used
	/usr/OV/prg_samples/ovsnmp_app/rectrap this time.)

On VMS Agent node (JIT470)
  subagent output.

	gen_trap called!
	esnmp_trap succeeded (0)

  check log file, but no error has occurred.
	$ @SYS$STARTUP:UCX$SNMP_SHUTDOWN
	$ DIR SYS$SYSDEVICE:[UCX$SNMP]

	Directory SYS$SYSDEVICE:[UCX$SNMP]

	LOGIN.COM;1         UCX$ESNMP.LOG;4     UCX$ESNMP.LOG;3
	UCX$SNMP_STARTUP.COM;1

	Total of 4 files.

	$ TYPE SYS$SYSDEVICE:[UCX$SNMP]UCX$ESNMP.LOG
	$

	no contents.

On SNMP Manager node (JIT859)
  check network traffic from agent node
  GetReponce data was found, but no Trap data was found.

	> tcpdump src jit470	<- this command is issued before snmpget command.
	tcpdump: listening on ln0
	Using kernel BPF filter
	12:17:58.041968 jit470.tko.dec.com.snmp > jit859.tko.dec.com.2202: GetResponse(11)[|snmp]

***************************
* pattern 2		  *
* chess subagent ON DUNIX *
***************************

On DUNIX Agent node (JP0842)
  make subagent and run it

	# make -f chess.mk
	cc -g -std1  -c chess_tbl.c
	cc -g -std1  -c chess_mib.c
	cc -g -std1  -c chess_method.c
	cc -o chess_mib chess_tbl.o  chess_mib.o  chess_method.o  -lesnmp -lutil
	chess built
	# ./chess_mib

On SNMP Manager node (JIT859)
  issue snmpget command

	> /usr/OV/bin/snmpget jit470 dec.ema.sysobjectids.decosf.chess.moveTable.moveEntry.moveByWhite.4.24
	dec.ema.sysobjectids.decosf.chess.moveTable.moveEntry.moveByWhite.4.24 : DISPLAY STRING- (ascii):  24. Qxe8+!

On SNMP Manager node (JIT859)
	> /usr/OV/prg_samples/ovsnmp_app/rectrap	<- this command is issued before snmpget command.
	snmptrap: generic_type  6
	snmptrap: specific_type 1
	trap -> Daniele - LeBlanc, U.S. Postal 84VC110
	trap -> 24. Qxe8+!

	I can get snmp trap!!

On DUNIX Agent node (JP0842)
  subagent output.

	gen_trap called!
	esnmp_trap succeeded (0)

On SNMP Manager node (JIT859)
  check network traffic from agent node
  GetResponce and Trap data was found.

	# tcpdump src jp0842	<- this command is issued before snmpget command.
	tcpdump: listening on ln0
	Using kernel BPF filter
	11:28:47.688080 arp reply jp0842.tko.dec.com is-at 0:0:f8:20:6d:fe
	11:28:47.699392 jp0842.tko.dec.com.snmp > jit859.tko.dec.com.2137: GetResponse(11)[|snmp]
>>	11:28:47.699392 jp0842.tko.dec.com.1032 > jit859.tko.dec.com.snmp-trap: Trap(10) X:4.36.2.15 [|snmp]
	11:28:47.700368 jp0842.tko.dec.com.snmp > jit859.tko.dec.com.2137: GetResponse(11)[|snmp]
>>	11:28:47.701344 jp0842.tko.dec.com.1032 > jit859.tko.dec.com.snmp-trap: Trap(10) X:4.36.2.15 [|snmp]



  Regards,

  /Noriyuki Kawamoto/EJ1-2/DEC-J