Re: snmptrapd - avoiding ambiguity in log files

[email protected] (Don Cohen)
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
 > > Somehow this quoting feature is sensitive to -M ?
 > >  # ./net-snmp-5.1.3.1/apps/snmptrapd -f -Lo
problem above still to be solved
next problem related to config file
 > Try calling it with -Dread_config so you can see what configuration 
 > files it is loading.  Maybe it is loading a snmp.conf file that has an 
 > option specified that is disabling the quote (not sure if there is one).
 > 
 > Also try calling it with -C to prevent it from loading any other 
 > configuration files except the ones you list.  On my system, when I run 
 > snmptrapd with:
 > 
 > snmptrapd -C -Lo -f -M /usr/local/share/snmp/mibs/ -Dread_config -c 
 > /usr/local/share/snmp/snmptrapd.conf
 > 
 > I get:
 > 
 > read_config: Reading optional config file: 
 > "/usr/local/share/snmp/snmptrapd.conf"
 > read_config: Reading configuration /usr/local/share/snmp/snmptrapd.conf
 > read_config: /usr/local/share/snmp/snmptrapd.conf:23 examining: 
 > traphandle default /root/traphandle-help default
 > read_config: Found a parser.  Calling it: traphandle / default 
 > /root/traphandle-help default
 > read_config:traphandle: registering handler for: default
 > 
 > any the quoting works.  This is with 5.2.1.2 on Linux and 5.1.3.1 on 
 > Windows.
My result is below (linux).

 > Can you do a proper install of 5.1.3.1 instead of running from your home 
 > directory?
I'm using RH8 which comes with 5.0.9 installed.  I don't have an easy
way to reinstall it if I install over it.
But in fact, if I just make install then I don't install over it, but
install somewhere else and things are very confused cause the search
path finds 5.0.9 first.  So I thought it more reasonable to uninstall
and use it this way.

 > Alex
 # ./net-snmp-5.1.3.1/apps/snmptrapd -Dread_config -C -f -c
 /tmp/snmptrapd.conf -M /root/net-snmp-5.1.3.1/mibs/
 No log handling enabled - turning on stderr logging
 read_config: reading premib configuration tokens
 read_configs_optional: reading optional configuration tokens for
 snmptrapd
 read_config: Reading optional config file: "/tmp/snmptrapd.conf"
 read_config: Reading configuration /tmp/snmptrapd.conf
 read_config: /tmp/snmptrapd.conf:1 examining: traphandle default
 /tmp/snmptraphandler
 read_config: reading normal configuration tokens
 read_configs_optional: reading optional configuration tokens for
 snmptrapd
 read_config: Reading optional config file: "/tmp/snmptrapd.conf"
 read_config: Reading configuration /tmp/snmptrapd.conf
 read_config: /tmp/snmptrapd.conf:1 examining: traphandle default
 /tmp/snmptraphandler
 read_config: Found a parser.  Calling it: traphandle / default
 /tmp/snmptraphandler
 read_config:traphandle: registering handler for: default
and the output
 Starting snmptrapd 5.1.3.1
 10.0.0.1: Enterprise Specific Trap (.117) Uptime: 146 days,
 2:40:23.42, SNMPv2-MIB::sysLocation.0 = STRING: XXX    iso.2.3.4 =
 INTEGER: 1234
which, incidentally is not the result of calling /tmp/snmptraphandler

I'm hoping someone familiar with the code will recognize what's going
on here and clarify. 


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.