|
|
Start-up and Configuration Files
This appendix provides information on the Agent start-up file, the Alert script files, and files to manage address-to-name mapping.
When you define an agent using the New button in the TrafficDirector Main window, one of the fields is the name of the "Startup File." This field specifies the name of a script file to be executed when the configuration daemon (dvconfd) receives a configuration request from an agent that has been reset.
A default start-up script file, named "startup" is shipped with the product. The default path is $NSHOME/usr. The standard "startup" file shipped with the product is shown below:
# # Default startup script file "startup" # # Note: "$1" is a macro replaced by the agent name. # # Startup scripts must have execute permission. # $NSHOME/bin/dvinst dvinst.cfg $1The agent name is passed as an argument, so that the same startup script can be used for multiple agents, if desired.
Typically, the start-up script is used to configure or reconfigure an agent to a desired domain setup. The default start-up does this by running the dvinst utility. The arguments passed to dvinst are the name of a configuration file, dvinst.cfg, and the name of the agent.
The default dvinst.cfg (in $NSHOME/usr) is shown below.
# # Domain configuration file # # Host Segment Short Long Packet #Domain Mode Stats History History Host Conversation Capture #---------------- ------ ------- ------- ------- ---- ------------ ----- RMON MAC y y y y n n #IP NET y y y y y n #NOVELL NET y y y y n n #DECNET NET y y y y n nAlert Scripts
When you configure an alert at an agent using the Watchdog function, you can specify the name of a script file to be executed upon reception of a trap message from the agent. You do this in the Program Info field in the Watchdog window. Different scripts can be specified for rising and falling traps, and for different watched variables.
When the Trap Daemon (dvtrapd) receives a trap message from the agent, it executes the script if one has been specified. The name of the agent and the user-specified "Severity Level" are passed as arguments to the script.
An example alert script is shown below.
# # Sample alert script "mytrap.sh" # date > mytrap.$$ echo Trap received from agent $1, severity level $2. >> mytrap.$$ $NSHOME/bin/dvsnap $1 ALL HOST 15 10 >> mytrap.$$ mail `whoami` < mytrap.$$Note that the $$ macro is interpreted as the process ID, and $1 and $2 are the agent name and severity level, respectively. These are shell substitutions. The shell script should be given "execute" permission, for example.,
% chmod 755 mytrap.sh
In this example, the script sends the user a mail message indicating the time the trap was received, the agent name and severity level, and a list of the top ten transmitting hosts for the fifteen-second interval following trap reception.
Any of the TrafficDirector command-line tools can be invoked from the script, as can any other standard utilities.
The file nsconfig.cfg, found in $NSHOME/usr, is used to specify the maximum number of entries to be processed in three address-to-name mapping files:
Mapping MAC Addresses to Names
An optional file can be used to provide user-defined mappings of MAC addresses to host names. The file is macaddr.nam, found in the $NSHOME/usr directory. A sample file is included with the distribution. Example entries:
pelican 08005a0d59e1 penguin 00803ff20a35 dragon 0800094a4186This file is consulted by applications that display host or conversation statistics for domains installed in MAC mode.
|
|
Copyright 1988-1996 © Cisco Systems Inc.