SNMP Subagent Programmer's Guide
Programming Tutorials
SNMP Subagent Programmer’s Guide—119728 2-3
Hello World Program
2. Make the subvolume containing the sample files your current subvolume:
VOLUME [$volume-name.]ZSNMPDKX
The TACL routines expect the sample files to reside in the current subvolume and
other Toolkit components to reside in ZSNMPSDK on the same volume.
3. Start the TACL routine for the sample subagent you want to build. The TACL
routines convert the source files into executable subagents by invoking the MIB
compiler, the C compiler, and the Binder utility. To make the Hello World program
executable, enter:
RUN HELLOM
4. Install the subagent’s MIB on a manager station, editing the MIB definition file as
required by the manager you are using.
5. Have somebody who is a member of the super user group start the NonStop agent if
it is not already running:
RUN SNMPAGT /NAME $ZSNMP, NOWAIT/ WARM
For complete information on invocation conditions and options for the NonStop
agent, refer to the SNMP Configuration and Management Manual.
6. Configure the NonStop agent authentication table and the manager station
community name as described in Section 1, under “Installing Subagents.”
7. Start the subagent, naming the executable subagent file and the agent process in the
invocation line. The TACL routine that builds the executable subagent for the Hello
World program names the executable subagent HELLO. The agent process name is
usually $ZSNMP:
RUN HELLO /NAME $HELLO/ $ZSNMP
The descriptions for each sample subagent include instructions for starting the
subagent.
8. Communicate with the subagent from the manager station on which the MIB
definition for the sample subagent has been compiled. Refer to subsections later in
this section to determine the functions provided by each sample subagent.
9. To stop the executing subagent, use the TACL STOP command, identifying the
name of the subagent process:
STOP $HELLO
After familiarizing yourself with the behavior of the sample subagents, try modifying
their MIB definitions and logic to change how they work.
Hello World Program
This subagent displays a message whenever it receives a Get or Set request from an
SNMP manager.