Starting and stopping the Network SLAPM2 subagent
Before you start the Network SLAPM2 subagent, the following applications need to be be started and initialized:
- Policy Agent - For details, see Starting and stopping the Policy Agent.
- SNMP agent - For details, see Start the SNMP agent.
The Network SLAPM2 subagent can be started from the z/OS® shell or as a started task.
- When starting from the shell:
The Network SLAPM2 subagent executable file (nslapm2) is in /usr/lpp/tcpip/bin. There is also a link from /bin. Make sure your PATH statement (in the profile) contains either /bin or /usr/lpp/tcpip/bin.
The Network SLAPM2 subagent requires access to one or more DLLs at run time. The LIBPATH environment variable needs to be set to include the /usr/lib directory, which normally includes all the required DLLs.
Export the LIBPATH environment variable before starting the subagent. This is best accomplished in /etc/profile or in .profile in the HOME directory. For example:
export LIBPATH=/usr/lib
The following command is an example:
nslapm2 -d 3 -t 1800 -c special -P 5000
The command above starts the Network SLAPM2 subagent with the following characteristics:
- Connect to the SNMP agent using a community name of special and a port of 5000.
- The debugging level is set to 3, to
log the following debugging messages to syslogd:
- Trace Network SLAPM2 subagent error and system console messages
- Trace Network SLAPM2 subagent warning messages
- The MIB table cache time is set to 30 minutes.
- When starting as a started task:
Use the S NSLAPM2 command on an MVS™ console or SDSF. A sample procedure is shipped in member EZAPAGSB in SEZAINST.
- Specify LIBPATH using the ENVAR parameter on the PARM statement
in the started procedure. For example:
// PARM=('POSIX(ON) ALL31(ON)', // 'ENVAR("LIBPATH=/usr/lib")/')
- Export the LIBPATH environment variable in a file specified with
the STDENV DD statement. For example:
//STDENV DD PATH='/etc/nslapm2.env',PATHOPTS=(ORDONLY)
In the /etc/nslapm2.env file:
LIBPATH=/usr/lib
- Specify LIBPATH using the ENVAR parameter on the PARM statement
in the started procedure. For example:
For more information on specifying run-time options, see z/OS Language Environment Programming Guide. For details on setting the LIBPATH environment variable, also see z/OS UNIX System Services Command Reference.
The /tmp/nslapm2.tcpname.pid is a temporary NSLAPM2 subagent pid file that the Network SLAPM2 subagent creates. This file contains the process ID of the current invocation of the Network SLAPM2 subagent.
- If /tmp/nslapm2.tcpname.pid is a symbolic link, it must have an owning UID or GID that matches the EUID or EGID that is assigned to the Network SLAPM2 subagent.
- If /tmp/nslapm2.tcpname.pid is a hard link or the target of a hard link, users that are outside the owner or group of the directory in which /tmp/nslapm2.tcpname.pid is stored cannot have write access to the directory. Additionally, write access to /tmp/nslapm2.tcpname.pid must be limited to the owning UID or group, for example, --w--w----permissions.
The Network SLAPM2 subagent can be stopped using the stop command (P NSLAPM2), or using the kill command in the z/OS shell. For example, the following kill command with the TERM signal, where pid is the nslapm2 process ID, enables the Network SLAPM2 subagent to clean up resources properly before terminating itself:
kill -s TERM pid
The nslapm2 process ID can be obtained using the following z/OS UNIX command:
ps -A