When I run the agent it runs and then quits without staying around. Why?
Firstly, are you certain that this is what is happening?
The normal operation of the agent is to fork itself into the background, detaching itself from the controlling terminal so that it will continue running even when you log out, and freeing the command line for subsequent use. This looks at first sight as if the agent has died, but using 'ps' to show all processes should reveal that the agent is still running.
To prevent this behaviour (such as when attempting to debug the
agent), you can start it with the
'-f' flag. This suppresses the
fork, and the agent will run as a 'normal' command. It's also often
useful to use the
'-L') flag, to log messages to stdout.
On the other hand, if
'ps' shows that the agent is not running, then
this is an error, and probably show that something went wrong in
starting the agent up. Check the agent log file for any error messages,
or run it with
'-f -Le' and see what it reports.
One possible cause might be an existing agent (or some other process) that's already listening on the SNMP port. Trying to start a second agent will fail with an error about "opening the specified endpoint".
If you're starting the agent as a non-root user, then this may also fail with the very same error. By default, the agent (and trap handler) will attempt to listen on the standard SNMP port 161 (or 162 for the trap handler). These are defined as "privileged ports", and processes will need to be running as root in order to open them.
One way to tackle this is to start the agent as root, but use the
option to switch to run as another user once the port has been opened.
Alternatively, you can specify a different port to use instead.
Anything greater than 1024 is available to non-root users. In this case,
you'll also need to specify the same port when issuing client commands.
- What MIBs are supported?
- What protocols are supported?
- How do I configure the agent?
- How do I remove a MIB from the agent?
- I've installed a new MIB file. Why can't I query it?
- How do I add a MIB to the agent?
- What's the difference between 'exec', 'sh', 'extend' and 'pass'?
- What's the difference between AgentX, SMUX and proxied SNMP?
- What is the purpose of 'dlmod'?
- Which extension mechanism should I use?
- Can I use AgentX when running under Windows?
- How can I run AgentX with a different socket address?
- How can I turn off SMUX support?
- How can I combine two copies of the 'mib2' tree from separate subagents?
- What traps are sent by the agent?
- Where are these traps sent to?
- How can I send a particular trap to selected destinations?
- When I run the agent it runs and then quits without staying around. Why?
- After a while the agent stops responding, and starts eating CPU time. Why?
- How can I stop other people getting at my agent?
- How can I listen on just one particular interface?
- The agent is complaining about 'snmpd.conf'. Where is this?
- Why does the agent complain about 'no access control information'?
- How do I configure access control?
- How do I configure SNMPv3 users?
- The 'createUser' line disappears when I start the agent. Why?
- What's the difference between /var/net-snmp and /usr/local/share/snmp?
- My new agent is ignoring the old snmpd.conf file. Why?
- Where should the snmpd.conf file go?
- Why am I getting "Connection refused"?
- Why can't I see values in the UCDavis 'extensible' or 'disk' trees?
- Why can't I see values in the UCDavis 'memory' or 'vmstat' tree?
- What do the CPU statistics mean - is this the load average?
- How do I get percentage CPU utilization using ssCpuRawIdle?
- What about multi-processor systems?
- The speed/type of my network interfaces is wrong - how can I fix it?
- The interface statistics for my subinterfaces are all zero - why?
- Does the agent support the RMON-MIB?
- What does "klread: bad address" mean?
- What does "nlist err: wombat not found" (or similar) mean?
- What does "Can't open /dev/kmem" mean?
- The system uptime (sysUpTime) returned is wrong!
- Can the agent run multi-threaded?
- Can I use AgentX (or an embedded SNMP agent) in a threaded application?