RE: Need help with snmp_log() msgs from snmp_agent.c

"Joan Landry" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <A9FCB77F97940A418A61FD9BB71E4170013A5B8C@dexbe012-6.exch012.intermedia.net>
This is my snmpd input line

OPTIONS="-Lf /tmp/snmp.log -Dhandler:inject -Ddebug -Dwarning -Dinfo
-Derror -DAll -p /var/run/snmpd.pid  -V ..

When registering my mib I call the function
    netsnmp_tdata_register(reg, ovnNGSysIpTable_data, table_info);
      which calls netsnmp_tdata_register 
        which calls netsnmp_inject_handler
          which calls netsnmp_inject_handler_before
            which should call 
              DEBUGMSGTL(("handler:inject", "injecting %s before %s\n",
                    handler->handler_name,
reginfo->handler->handler_name));

The get request on the mib works - so I am sure the handler was injected
ok.

I expected to see a handler:inject debug msg in my log - but it is not
there.
This is what is in the log:
root@ISG6000:/tmp> more snmp.log
registered debug token handler:inject, 1
registered debug token debug, 1
registered debug token warning, 1
registered debug token info, 1
registered debug token error, 1
Turning on AgentX master support.
NET-SNMP version 5.4

Thanks - for any ideas on why this is not working.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On
Behalf Of Dave Shield
Sent: Thursday, May 28, 2009 9:35 AM
To: Joan Landry
Cc: [email protected]
Subject: Re: Need help with snmp_log() msgs from snmp_agent.c

2009/5/28 Joan Landry <[email protected]>:
> Thanks - that works as far as putting the messages to a logfile.
>
> I realize now what I really want is the msgs generated via DEBUGMSGTL

They should be logged to the same place as any other message.

So if you turn on a particular debug token (using -Dtoken) and specify a
particular file to log to (using -Lf file) then those debug messages
should be logged to that file.

If that doesn't work for you, you'll have to give us some more details
about exactly what you've tried.

Dave

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
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.