Site/SunNet/Domain Manager Administration Guide
  Suchtext Nur in diesem Buch
Dieses Buch im PDF-Format herunterladen

Reference Overview

13

13.1 Overview

This Reference Part describes the features and functions of SunNet Manager in more detail, including the following:
  • Agents and proxy agents
  • Ancillary daemons (activity daemon and event dispatcher)
  • The details of sending data and event requests
  • The details of viewing data and event requests
  • Console properties
  • The management database
  • SNMP support
  • Results Browser
  • Results Grapher
  • IP Discover
  • IPX Discover
  • Set Tool

13.2 Agents and Proxies

There are two types of SunNet Manager agents: those that directly access managed objects and those that indirectly access managed objects. Most of the agents provided with this release manage objects on the Sun workstations where they are installed. For example, the hostmem agent uses the same mechanism as netstat -m to get memory utilization data.
The second type of agent provides the ability to manage objects that reside in other Sun workstations or in other vendors' devices. Such agents are called proxy agents. Proxy agents run on Sun workstations, called proxy systems, and use protocol translation mechanisms to provide the necessary access to the managed objects. The proxy system may be the workstation on which the SunNet Manager Console is running or another workstation on the network. The proxy system can also be a workstation in a different subnet or domain from where the Console is running. This allows SunNet Manager to extend into virtually any domain.

13.2.1 Agents Included with SunNet Manager

A Console can manage both SunOS 5.x, and SunOS 4.x clients. All SNM agents that run on SunOS 4.x clients are also available for the Solaris 2.x environment. Note however, that certain of the agents that run on Solaris 2.x clients support different attributes than their SunOS 4.x counterparts. The Solaris 2.x versions of these agents have been renamed to <agentname>2. For example, na.iostat2 is the Solaris 2.x version of the (SunOS 4.x) agent na.iostat. See Chapter 2, "Planning for Network Management," for a list of agents and proxy agents shipped with the current release.

Note - snmp, snmp-mibII, and sun-snmp and several RFC schema files can be used with the SNMP proxy agent na.snmp. For each of the other agents shipped with the current product, there is only one corresponding schema file.


Note - na.hostif is the same for SunOS 4.x and Solaris 2.x except that the metric table is inaccessible for Solaris 2.x.

Table 13-1 lists the agents that have substantial differences between their SunOS 4.x and Solaris 2.x versions. Table 13-1 shows the attributes that were added to the Solaris 2.x agents; it also shows attributes from the SunOS 4.x version that were deleted for the Solaris 2.x version of these agents.
Table 13-1
AgentSunOS 4.x attributes removedNew attributes added for Solaris 2.x
na.etherif2input group:
ibufs
ibufdesc
idiscard
iframedesc
output group:
ojams
odrops
watchdog
obufdesc
copies
nocfs
obufs
oframedesc
obuferr
input group:
imissed
inocanput
output group:
oinits
na.hostmem2mbuf group
mbuf_uses group
streams group:
mblkused
mblkfree
mblk%
mblkcom
mblkfail
dblks table
streams group:
msgused
msgfree
msg%
msgcum
msgfail
linkblkused
linkblkfree
linkblk%
linkblkcum
linkblkfail
streveused
strevefree
streve%
strevecum
strevefail
Table 13-1
AgentSunOS 4.x attributes removedNew attributes added for Solaris 2.x
na.iostat2disk table:
mbytes
xfers
seeks
activeT
xferT
seekT
%xferT
avgxferT
kbps
disk table:
kreads
kwrites
svcwait
acttrans
svctime
%wait
%busy
na.layers2no changesno changes
na.cupstatavailable only on Solarix 2.x
These agents represent examples of the data you can gather using SunNet Manager, and are not meant to be an exhaustive set. To write your own agent, refer to your Site/SunNet/Domain Manager Application and Agent Development Guide.
Many Sun products include agents that can be used with SunNet Manager. Refer to your product documentation or call your local Sun representative for more information.

13.2.2 Ancillary Daemons

SunNet Manager includes two ancillary daemons: the activity daemon (na.activity) and the event dispatcher (na.event). The activity daemon is a process that uses the Manager/Agent Services to ensure ongoing requests (activities) continue to be serviced. The activity daemon uses the activity log, a record of active requests started from the Console.
The event dispatcher is a process that uses the Manager/Agent Services to direct reports of events to the proper destinations (rendezvous process), such as the SunNet Manager Console. Any other management application can use the event dispatcher, registering to receive some or all event reports based on a variety of selection criteria. The Event Dispatcher also logs all event reports in the Event/Trap Log. The Event/Trap Log is in ASCII format, so you can examine and modify it using standard UNIX tools.
Four processes of the event dispatcher are started when you invoke the Console. When you make the first request to any agent, two processes of the activity daemon are started. When you exit the Console, two processes of na.activity and one copy of na.event remain.

13.3 SunNet Manager Directories and Files

This section discusses the files and directories that are created during SunNet Manager installation. The Solaris 1.x and Solaris 2.x versions of SunNet Manager differ in the default locations assigned to these files and directories by the installation scripts. The default locations for these files are summarized in Table 13-2.
The snm.conf file is the configuration file used by SNM agents and daemons. (For Solaris 1.x installations of SNM, snm.conf is located in /etc; for Solaris 2.x installations snm.conf is located in /etc/opt/SUNWconn/snm.) See the snm.conf(5) man page for more information about changing keyword values.
The SunNet Manager installation script prompts you for the following locations:
  • The directory where the SNM software will be installed. This normally is /usr/snm for Solaris 1.x installations; for Solaris 2.x installations the default location is /opt/SUNWconn/snm.

    If you install SNM into a directory other than the default, you must set the environment variable SNMHOME to the directory where SNM is installed before you can use the software.

  • The directory where the SNM database will be written. (If you do not specify otherwise, this is /var/adm/snm for Solaris 1.x installations; the default location for Solaris 2.x installations is /var/opt/SUNWconn/snm.)

Caution - You should have at least 10 Mbytes of space for the initial database directory. You can change the location of the database directory after installation by setting the environment variable SNMDBDIR to a writable directory.

  • The directory where SNM log files will be written. (If you do not specify otherwise, this is /var/adm/snm for Solaris 1.x installations; the default location for Solaris 2.x installations is /var/opt/SUNWconn/snm.)
The log files grow during Console operation. This could cause a disk space problem if the /var directory is part of the root file system. You can change the location of the log files after installation by specifying fully-qualified path names for the keywords activity-log, event-log, monitor-log, and request-log in the snm.conf file. Make sure that the new directories are writable by root or mode 777 so that the Console can write to the log files.

13.3.1 Installation Directory Files

If you install the SNM software in the default path (/usr/snm for Solaris 1.x installations, /opt/SUNWconn/snm for Solaris 2.x installations), the installation script will create the following directories and files under the default directory:
  • agents directory, which contains SNM agents and their corresponding schema files. You can add your own agent and schemas to this directory. This directory also contains the files enterprises.oid, which contains mappings for enterprise identifiers, and snmp.oid, which contains mappings for SNMP MIB I object identifiers.
  • bin directory, which contains binaries used by SNM. One of the binaries, snm_asroot, is undocumented.
  • icons directory, which contains SNM icon files. You can add your own icons to this directory.
  • include directory, which contains header files for building agents.
  • lib directory, which contains SNM libraries.
  • man directory, which contains SNM man pages.
  • 5.x, which contains the Solaris 2.x version of the SunNet Manager agents, for managing SunOS 5.x machines.
  • src, which contains sample source code for selected agents and manager applications.
  • struct directory, which contains the following files:

    · elements.schema defines the element types. If you need to add site-specific elements, create your own file with the .schema extension (for example, myelements.schema).

  • netware_elements.schema contains Novell specific element definitions.
  • snm.schema contains NLA specific information.
  • example.db is an example database that you can load into the Console.
  • snm.glue is a file that contains a starting set of definitions for the Console. Do not modify this file.

13.3.2 Database Files

A database directory is created in the path specified by the environment variable SNMDBDIR. If SNMDBDIR is not specified, then the database path specified during installation is used. The database directory is db.<user_name>, where <user_name> is the value of the environment variable SNM_NAME, or the environment variables LOGNAME or USER, if SNM_NAME is not set. The following database files are created for SNM:
  • snm+lock is the Console lock file; this prevents more than one user from accessing the same runtime database.
  • snmdb+lock is the database API lock file; this file enables the database to be locked when entries are changed programmatically.
  • The files events.ind, events.rec, nc.ind, and nc.rec make up the runtime database used by the Console.
  • The following data files, whch are used by IPX Discover, reside in your database directory: dumpfile, snm_index.dat, x.x.x.x.dat, nc.ind, and nc.rec, where x.x.x.x.dat is an ipaddress.dat file. An example would be 129.9.119.5.dat

13.3.3 Log Files

Log files are created in the directory specified during installation. You can also change the location of individual log files after installation by modifying the appropriate log file entry in the snm.conf file. The following log files are created for SNM:
  • activity.log is a log of active requests started from the SNM Console host; this file is used by the activity daemon.
  • event.log is the log file written by event dispatcher.
  • monitor.log is written by the na.logger agent. This agent logs data reports launched by the snm_cmd command.
  • request.log is a record of requests that are to be restarted by the appropriate agent; this file is used by the agents.

13.3.4 Miscellaneous Files

  • The snmp.hosts file contains information about SNMP hosts. (The default location of the snmp.hosts file for Solaris 1.x installations is /var/adm/snm; for Solaris 2.x installations the default location is /var/opt/SUNWconn/snm.) You can add entries into this file to specify enterprise-specific host information.
  • The snmp.traps file contains information about enterprise-specific traps. (For Solaris 1.x installations the default location is /var/adm/snm; for Solaris 2.x installations, the default directory is /var/opt/SUNWconn/snm.) You can add entries into this file to specify enterprise-specific trap information.
  • The $HOME/.SNMdefaults file contains information pertaining to SNM Console properties. For example, when the icon size is set to a new value (i.e., 32X32), or the schema path changed, these values and other properties are written to your $HOME/.SNMdefaults file. If you subsequently remove SNM, then reinstall it (e.g., migrating from a previous version to the current version), the old .SNMdefaults values will continue to be used. You can modify the values by using the SNM Console Props button, or by editing your .SNMdefaults file. You can ensure that the Console property defaults are used by moving a preexisting .SNMdefaults file from your home directory or deleting your $HOME/.SNMdefaults file.
  • The .SNMpredefined file contains predefined data and event request records provided with the current product. (The default location of this file for Solaris 1.x installations is /usr/snm/struct; for Solaris 2.x installations, the default path is /opt/SUNWconn/snm/struct.) For information about creating and sending predefined data and event requests, refer to Chapter 18, "Management Database." When you modify or create predefined data and event requests, they are stored in your $HOME/.SNMpre-defined file along with the predefined requests provided with this product.
  • The linkmap file is an ASCII file that contains information used by the SNM Console to provide link management capabilities. (The default location of the linkmap file is /var/adm/snm for Solaris 1.x installations and /var/opt/SUNWconn/snm for Solaris 2.x installations.) It is either created by the network manager or the IP Discover tool; the IP Discover tool will populate this file with discovered links (if 2 or more hops are specified as the scope of a network discovery operation). Refer to the linkmap (5) manual page for information about the format and use of the linkmap file.
  • The .snmautomanagement file contains information about custom auto requests.

13.4 Environment Variables Used with SunNet Manager

You can use the following environment variables with SunNet Manager:
  • The PATH environment variable should include <installation_path>/snm/bin where:

    · <installation_path> will be /usr if SNM is installed in the default location for SunOS 4.x installations.

    · <installation_path> will be /opt/SUNWconn if SNM is installed in the default location for the Solaris 2.x version.

  • If the software for the current product is installed in a directory other than the default location (/usr/snm for Solaris 1.x, /opt/SUNWconn/snm for Solaris 2.x), you must set the SNMHOME environment variable to the installation directory.
  • The HELPPATH environment variable should include <installation_path>/snm/help where:

    · <installation_path> will be /usr if the default location is used for a Solaris 1.x installation.

    · <installation_path> will be /opt/SUNWconn if the default location is used for a Solaris 2.x installation.

    This enables you to get SunNet Manager on-line help.

  • The MANPATH environment variable should include <installation_path>/snm/man where:

    · <installation_path> will be /usr if the default location is used for a Solaris 1.x installation.

  • <installation_path> will be /opt/SUNWconn if the default location is used for a Solaris 2.x installation.
This enables use of the SunNet Manager man pages.
  • The SNM_NAME environment variable can be used to allow multiple instances of the Console and database to be run from a single user ID. One or more names can be specified with SNM_NAME. Each instance of the Console is associated with its own runtime database, located in the db.<snm_name> directory, where <snm_name> is a name specified by the environment variable SNM_NAME. Each instance of the Console will use the user's $HOME/.SNMdefaults and $HOME/.SNMpre-defined .snmautomanagement files.
  • The SNMDBDIR environment variable is used to specify the directory where the predefined data and event request ASCII data record file resides. /var/adm/snm is the default directory for the Solaris 1.x version of the current product; the default location for Solaris 2.x is /var/opt/SUNWconn/snm.
  • The SNMLINKMAP environment variable is used to specify the directory where the linkmap file used by the link management feature is located. If this environment variable is undefined, the default location is:

    · /var/adm/snm for the Solaris 1.x version

    · /var/opt/SUNWconn/snm for the Solaris 2.x version.

  • The SNMDISCOVERMAP environment variable is used to specify the directory where the discover.conf file, used by the IP Discover Tool, is located. /var/adm/snm is the default directory for Solaris 1.x installations; /var/opt/SUNWconn/snm is the default location for Solaris 2.x installations.
Table 13-2

Files
Default Location
in Solaris 1.x Version
Default Location
in Solaris 2.x Version
Agents and schema files/usr/snm/agents/opt/SUNWconn/snm/agents
Agents for Solaris 2.x machines/usr/snm/5.x/opt/SUNWconn/snm/5.x
discover.conf file/var/adm/snm/var/opt/SUNWconn/snm
elements.schema file/usr/snm/struct/opt/SUNWconn/snm/struct
Table 13-2

Files
Default Location
in Solaris 1.x Version
Default Location
in Solaris 2.x Version
Example database/usr/snm/struct/opt/SUNWconn/snm/struct
Header files/usr/snm/include/opt/SUNWconn/include
Icon files/usr/snm/icons/opt/SUNWconn/snm/icons
linkmap file/var/adm/snm/var/opt/SUNWconn/snm
Log files/var/adm/snm/var/opt/SUNWconn/snm
/var/adm/snm/var/opt/SUNWconn/snm
Manager Services libraries/usr/snm/lib/opt/SUNWconn/snm/lib
man pages/usr/snm/man/opt/SUNWconn/snm/man
messages file/var/adm/snm/var/opt/SUNWconn/snm
Predefined data/ event request file/var/adm/snm/var/opt/SUNWconn/snm
On-line help files/usr/snm/help/opt/SUNWconn/snm/help
Sample agent and application source code files/usr/snm/src/opt/SUNWconn/src
snm.conf file and
snmpd.conf file
/etc/etc/opt/SUNWconn/snm
.SNMdefaults file$HOME$HOME
SNM executables/usr/snm/bin/opt/SUNWconn/snm/bin
snm.glue file/usr/snm/struct/opt/SUNWconn/snm/struct
.SNMpredefined file/usr/snm/struct/opt/SUNWconn/snm/struct
snmp.hosts file/var/adm/snm/var/opt/SUNWconn/snm
snmp.traps file/var/adm/snm/var/opt/SUNWconn/snm
.snmautomanagement$HOME$HOME

13.5 Extending SunNet Manager

The SunNet Manager infrastructure provides a platform extensible to any application. The SunNet Manager Console user interface is an application that uses the underlying services. SunNet Manager also includes a command-line mechanism for initiating data and event reporting called snm_cmd(1).
You will probably want to extend the capabilities of SunNet Manager. Some of the mechanisms to support this are discussed later in this document. Refer to your Site/SunNet/Domain Manager Application and Agent Development Guide to implement the extensions you need.