C H A P T E R 3 |
The Sun SNMP Management Agent provides full SNMP capabilities without further need for complex configuration. This chapter provides additional information if you experience problems using the agent.
Be sure to read the current software release notes document for the latest information about requirements and known issues that might be related to any problems you are experiencing.
If the agent does not start, ensure that you are the root user before proceeding.
# ps -ef | grep snmpd |
root 29394 1 0 Feb 18 ? 4:11 /opt/SUNWsmasf/sbin/snmpd |
Attempt to start the agent with the command:
# /etc/init.d/masfd start |
Again, confirm whether the agent is now running. If the agent continues not to run, refer to the file /var/adm/messages.
Use a text editor to review the messages at the end of the file. Messages from the SNMP agent have the form:
date time hostname snmpd[pid]: [ID id daemon.type] Text |
pid is the process ID of the process that resulted in the message.
type indicates the type of message, which is error, info, or warning, depending on the nature of the problem being reported.
When reviewing the entries in the log file, ensure that the messages did result from the attempt to start the agent. If you are in any doubt, review the file before starting the agent and identify the date and time of the last message. After attempting to start the agent, locate this same message and review the messages following it.
The most common reason for the agent not starting is that it cannot access the network ports that it requires. The ports used by the agent are specified in the configuration file. This problem can be recognized by a message of the form:
date time hostname snmpd[pid]: [ID id daemon.type] Error opening specified endpoint "udp:portno" |
Where portno is the port specified in the configuration file.
If this message appears, identify why the port is not available. Use the netstat -a command to show all ports being accessed. If the port is not available, modify the configuration file to select a different port using an entry of the form:
agentaddress newport |
If the port is available or the error continues to appear for a port that is available, confirm you are running the agent as the root user and that you have permission to access the specified port. Also, look in the /etc/opt/SUNWmasf/conf directory. Only one configuration file, either snmpd.0.conf or snmpd.conf, should exist in that directory. If there is more than one file, remove one.
If the management applications and clients cannot access the agent, confirm the agent has started.
From a client that is unable to access the agent using SNMP, use the ping command to ensure that the host running the SNMP agent is accessible over the network.
If the ping command fails, address the underlying network connectivity issues.
Ensure that the client has the correct access permissions for the SNMP agent by doing one of the following:
The most common reason for not receiving traps is failure to specify the trap destination for the SNMP agent. Confirm which version of trap the management application is expecting, and then look at the file /etc/opt/SUNWmasf/conf/snmpd.conf. For an SNMPv1 trap, there must be a line of the form:
trapsink hostname community dest-port |
hostname is either the name of the host or the IP address of the destination.
community is the community string for the MIB view being used.
dest-port is the destination port for the trap, usually 162.
For an SNMPv2 trap, the entry should read:
trap2sink hostname community dest-port |
From the system running the SNMP agent, use the ping command to confirm that the chosen destination can be accessed over the network:
# ping hostname |
If the ping command fails, confirm network connectivity before taking any further steps.
If traps are still not received, confirm whether the management application can receive traps. If the management application has received traps from other hosts, no further action is necessary. However, if this is the first time the management application has received traps, confirm that it is correctly listening for SNMP traps on port 162 or another specified port. As port 162 is a low port number, the application receiving traps must run with root privileges. If the application is running, use the netstat command to confirm that it is listening
UDP: IPv3 Local Address Remote Address State ------------------------ ------------------ -------- *.162 Idle |
Remember, traps are not sent continuously and are sent only in the following circumstances:
Potential problem is detected by the SNMP agent, or the problem is cleared.
SNMP agent detects a change to the hardware, such as objects being added or removed from the management model.
The agent sends traps for all value changes except those that change rapidly, such as voltage readings, fan tachometers, and temperature. For these kinds of environmental sensors, traps are sent only when thresholds are crossed.
If you are not sure if a trap has been sent, stop and restart the agent to generate cold start traps using the following commands:
# /etc/init.d/masfd stop # /etc/init.d/masfd start |
Copyright © 2009, Sun Microsystems, Inc. All rights reserved.