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

2009-05-29 Thread Dave Shield
2009/5/28 Joan Landry joan.lan...@overturenetworks.com:
... to make things really simple I decided to see if I could get a
 debug msg out of the agent_trap.c file

 I used OPTIONS=-Lo -Dtrap

 And sent a trap - and verified that the trap was sent.
 And there was no trap debug msg on the output screen or to the log when I 
 used -Lf /tmp/snmp.log -Dtrap.

Hmmm...

Can you try with
 OPTIONS=-Lo -Dall
?
Do you see any debug messages at all?
(If you're not sure, then the answer is no.
 Believe me, you'll know if you're getting debug output with -Dall !)



 So for some reason I am not able to get any of the DEBUG msgs.

Please run an snmpget request on  UCD-SNMP-MIB::versionConfigureOptions.0
What is the value of this object?

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
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


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

2009-05-29 Thread Joan Landry
Dave,
Thanks for trying to help me figure this out.
The -Dall or -Dall did not work
The get of versionConfigureOptions is:

* SNMP QUERY STARTED *
1: versionConfigureOptions.0 (octet string)
'--host=powerpc-wrs-linux-gnu' '--build=i686-crosscompile-linux-gnu'
'--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr'
'--bindir=/usr/bin' '--sbindir=/usr/sbin' '--datadir=/usr/share'
'--includedir=/usr/include' '--libdir=/usr/lib'
'--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--cache-file=wrs_config_cache'
'--enable-static' '--enable-shared'
'--with-cc=powerpc-wrs-linux-gnu-ppc_e500v2-glibc_cgl-gcc'
'--with-cflags=-g -O2 -fomit-frame-pointer -D__USE_STRING_INLINES -pipe'
'--with-ar=powerpc-wrs-linux-gnu-ppc_e500v2-glibc_cgl-ar'
'--with-sys-location=Unknown' '--with-logfile=/var/log/snmpd.log'
'--with-persistent-directory=/var/net-snmp' '--with-mib-modules=host
agentx smux0909ucd-snmp/diskio disman/event disman/schedule
tcp-mib udp-mib mibII/mta_sendmail'
'--with-libwrap=/mnt/local/scotth/wrs-workspace-2.0/Stella-mgmt-0_prj/ho
st-cross/powerpc-wrs-linux-gnu/sysroot/usr/lib' '--sysconfdir=/etc'
'--enable-ipv6' '--en
[27.2D.2D.68.6F.73.74.3D.70.6F.77.65.72.70.63.2D.77.72.73.2D.6C.69.6E.75
.78.2D.67.6E.75.27.20.27.2D.2D.62.75.69.6C.64.3D.69.36.38.36.2D.63.72.6F
.73.73.63.6F.6D.70.69.6C.65.2D.6C.69.6E.75.78.2D.67.6E.75.27.20.27.2D.2D
.70.72.6F.67.72.61.6D.2D.70.72.65.66.69.78.3D.27.20.27.2D.2D.70.72.65.66
.69.78.3D.2F.75.73.72.27.20.27.2D.2D.65.78.65.63.2D.70.72.65.66.69.78.3D
.2F.75.73.72.27.20.27.2D.2D.62.69.6E.64.69.72.3D.2F.75.73.72.2F.62.69.6E
.27.20.27.2D.2D.73.62.69.6E.64.69.72.3D.2F.75.73.72.2F.73.62.69.6E.27.20
.27.2D.2D.64.61.74.61.64.69.72.3D.2F.75.73.72.2F.73.68.61.72.65.27.20.27
.2D.2D.69.6E.63.6C.75.64.65.64.69.72.3D.2F.75.73.72.2F.69.6E.63.6C.75.64
.65.27.20.27.2D.2D.6C.69.62.64.69.72.3D.2F.75.73.72.2F.6C.69.62.27.20.27
.2D.2D.6C.69.62.65.78.65.63.64.69.72.3D.2F.75.73.72.2F.6C.69.62.65.78.65
.63.27.20.27.2D.2D.6C.6F.63.61.6C.73.74.61.74.65.64.69.72.3D.2F.76.61.72
.27.20.27.2D.2D.73.68.61.72.65.64.73.74.61.74.65.64.69.72.3D.2F.75.73.72
.2F.63.6F.6D.27.20.27.2D.2D.6D.61.6E.64.69.72.3D.2F.75.73.72.2F.73.68.61
.72.65.2F.6D.61.6E.27.20.27.2D.2D.69.6E.66.6F.64.69.72.3D.2F.75.73.72.2F
.73.68.61.72.65.2F.69.6E.66.6F.27.20.27.2D.2D.63.61.63.68.65.2D.66.69.6C
.65.3D.77.72.73.5F.63.6F.6E.66.69.67.5F.63.61.63.68.65.27.20.27.2D.2D.65
.6E.61.62.6C.65.2D.73.74.61.74.69.63.27.20.27.2D.2D.65.6E.61.62.6C.65.2D
.73.68.61.72.65.64.27.20.27.2D.2D.77.69.74.68.2D.63.63.3D.70.6F.77.65.72
.70.63.2D.77.72.73.2D.6C.69.6E.75.78.2D.67.6E.75.2D.70.70.63.5F.65.35.30
.30.76.32.2D.67.6C.69.62.63.5F.63.67.6C.2D.67.63.63.27.20.27.2D.2D.77.69
.74.68.2D.63.66.6C.61.67.73.3D.2D.67.20.2D.4F.32.20.2D.66.6F.6D.69.74.2D
.66.72.61.6D.65.2D.70.6F.69.6E.74.65.72.20.2D.44.5F.5F.55.53.45.5F.53.54
.52.49.4E.47.5F.49.4E.4C.49.4E.45.53.20.2D.70.69.70.65.27.20.27.2D.2D.77
.69.74.68.2D.61.72.3D.70.6F.77.65.72.70.63.2D.77.72.73.2D.6C.69.6E.75.78
.2D.67.6E.75.2D.70.70.63.5F.65.35.30.30.76.32.2D.67.6C.69.62.63.5F.63.67
.6C.2D.61.72.27.20.27.2D.2D.77.69.74.68.2D.73.79.73.2D.6C.6F.63.61.74.69
.6F.6E.3D.55.6E.6B.6E.6F.77.6E.27.20.27.2D.2D.77.69.74.68.2D.6C.6F.67.66
.69.6C.65.3D.2F.76.61.72.2F.6C.6F.67.2F.73.6E.6D.70.64.2E.6C.6F.67.27.20
.27.2D.2D.77.69.74.68.2D.70.65.72.73.69.73.74.65.6E.74.2D.64.69.72.65.63
.74.6F.72.79.3D.2F.76.61.72.2F.6E.65.74.2D.73.6E.6D.70.27.20.27.2D.2D.77
.69.74.68.2D.6D.69.62.2D.6D.6F.64.75.6C.65.73.3D.68.6F.73.74.20.61.67.65
.6E.74.78.20.73.6D.75.78.09.09.20.20.20.20.75.63.64.2D.73.6E.6D.70.2F.64
.69.73.6B.69.6F.20.64.69.73.6D.61.6E.2F.65.76.65.6E.74.20.64.69.73.6D.61
.6E.2F.73.63.68.65.64.75.6C.65.20.74.63.70.2D.6D.69.62.20.75.64.70.2D.6D
.69.62.20.6D.69.62.49.49.2F.6D.74.61.5F.73.65.6E.64.6D.61.69.6C.27.20.27
.2D.2D.77.69.74.68.2D.6C.69.62.77.72.61.70.3D.2F.6D.6E.74.2F.6C.6F.63.61
.6C.2F.73.63.6F.74.74.68.2F.77.72.73.2D.77.6F.72.6B.73.70.61.63.65.2D.32
.2E.30.2F.53.74.65.6C.6C.61.2D.6D.67.6D.74.2D.30.5F.70.72.6A.2F.68.6F.73
.74.2D.63.72.6F.73.73.2F.70.6F.77.65.72.70.63.2D.77.72.73.2D.6C.69.6E.75
.78.2D.67.6E.75.2F.73.79.73.72.6F.6F.74.2F.75.73.72.2F.6C.69.62.27.20.27
.2D.2D.73.79.73.63.6F.6E.66.64.69.72.3D.2F.65.74.63.27.20.27.2D.2D.65.6E
.61.62.6C.65.2D.69.70.76.36.27.20.27.2D.2D.65.6E (hex)]
* SNMP QUERY FINISHED *

-Original Message-
From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On
Behalf Of Dave Shield
Sent: Friday, May 29, 2009 3:24 AM
To: Joan Landry
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: Need help with snmp_log() msgs from snmp_agent.c

2009/5/28 Joan Landry joan.lan...@overturenetworks.com:
... to make things really simple I decided to see if I could get a  
debug msg out of the agent_trap.c file

 I used OPTIONS=-Lo -Dtrap

 And sent a trap - and verified that the trap was sent.
 And there was no trap debug msg on the output screen or to the log
when I used -Lf

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

2009-05-29 Thread Dave Shield
2009/5/29 Joan Landry joan.lan...@overturenetworks.com:
 The -Dall or -Dall did not work

That strongly implies that debugging has been turned off.


 The get of versionConfigureOptions is:

 * SNMP QUERY STARTED *
 1: versionConfigureOptions.0 (octet string)
 '--host=powerpc-wrs-linux-gnu' '--build=i686-crosscompile-linux-gnu'
 [snip]
 '--enable-ipv6' '--en

Argghh!!!   It's truncated the output!

Anyway, I've done a search of the mailing lists, and came across
a suspiciously similar configure invocation, within a cross-compilation
environment.

LDFLAGS=[snip]  .CFLAGS=[snip] /configure
--host=armv-elf-linux-gnu --with-endianness=little --prefix=/
--datadir=/etc/config --sysconfdir=/etc/config --disable-FEATURE
--enable-mini-agent --disable-applications --disable-manuals
--disable-scripts  --disable-snmptrapd-subagent --disable-debugging
--with-logfile=/var --with-out-mib-modules=snmpv3mibs ucd_snmp
notification utilities target

Note that one of the options to configure given there is  --disable-debugging
Can you please check whether your original configure command included
this particular option.
 (The question as to what the effect of this option might be,
   is left as an exercise for the student)

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
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


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

2009-05-29 Thread Joan Landry
Thanks - I will look into that.
Thanks again for your time 

-Original Message-
From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On
Behalf Of Dave Shield
Sent: Friday, May 29, 2009 8:48 AM
To: Joan Landry
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: Need help with snmp_log() msgs from snmp_agent.c

2009/5/29 Joan Landry joan.lan...@overturenetworks.com:
 The -Dall or -Dall did not work

That strongly implies that debugging has been turned off.


 The get of versionConfigureOptions is:

 * SNMP QUERY STARTED *
 1: versionConfigureOptions.0 (octet string) 
 '--host=powerpc-wrs-linux-gnu' '--build=i686-crosscompile-linux-gnu'
 [snip]
 '--enable-ipv6' '--en

Argghh!!!   It's truncated the output!

Anyway, I've done a search of the mailing lists, and came across a
suspiciously similar configure invocation, within a cross-compilation
environment.

LDFLAGS=[snip]  .CFLAGS=[snip] /configure --host=armv-elf-linux-gnu
--with-endianness=little --prefix=/ --datadir=/etc/config
--sysconfdir=/etc/config --disable-FEATURE --enable-mini-agent
--disable-applications --disable-manuals --disable-scripts
--disable-snmptrapd-subagent --disable-debugging --with-logfile=/var
--with-out-mib-modules=snmpv3mibs ucd_snmp notification utilities
target

Note that one of the options to configure given there is
--disable-debugging
Can you please check whether your original configure command included
this particular option.
 (The question as to what the effect of this option might be,
   is left as an exercise for the student)

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
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Need help with snmp_log() msgs from snmp_agent.c

2009-05-28 Thread Joan Landry
I have spent a lot of time trying to get snmp_log() output from the
net-snmp code, specifically the snmp_log() msgs that are sent from
snmp_agent.cpp
The only one I am able to get is:
Received SNMP packet(s) from UDP: [10.11.12.116]:3739
  GETBULK message, non-rep=0, max_rep=10
-- SNMPv2-SMI::transmission.18.9.1.2

by using the -V option on the snmpd input line.

Does anyone know what the trick is to getting all the msgs to a logfile?
I tried  the following - and nothing works:
-Ddebug -Lo -Dsnmp_agent  -Dagentx/master -f /tmp/snmp.log
Thanks

--
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
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


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

2009-05-28 Thread Dave Shield
2009/5/28 Joan Landry joan.lan...@overturenetworks.com:
 Does anyone know what the trick is to getting all the msgs to a logfile?

Have you tried -Lf /tmp/snmp.log  ?

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
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


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

2009-05-28 Thread Joan Landry
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

Do you know how I an get that output also?
Thanks so much for your help!

-Original Message-
From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On
Behalf Of Dave Shield
Sent: Thursday, May 28, 2009 8:58 AM
To: Joan Landry
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: Need help with snmp_log() msgs from snmp_agent.c

2009/5/28 Joan Landry joan.lan...@overturenetworks.com:
 Does anyone know what the trick is to getting all the msgs to a
logfile?

Have you tried -Lf /tmp/snmp.log  ?

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
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


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

2009-05-28 Thread Dave Shield
2009/5/28 Joan Landry joan.lan...@overturenetworks.com:
 This is my snmpd input line

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

Try starting the agent with   '-f -Le'  plus the same list of -D tokens.
What do you see logged?The same as when you use '-Lf' or something
different?

i.e. try to determine whether the issue is with your choice of debug tokens,
or the introduction of file logging.

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
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


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

2009-05-28 Thread Joan Landry
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:
r...@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: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On
Behalf Of Dave Shield
Sent: Thursday, May 28, 2009 9:35 AM
To: Joan Landry
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: Need help with snmp_log() msgs from snmp_agent.c

2009/5/28 Joan Landry joan.lan...@overturenetworks.com:
 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
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


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

2009-05-28 Thread Dave Shield
2009/5/28 Joan Landry joan.lan...@overturenetworks.com:
 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
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


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

2009-05-28 Thread Joan Landry
-f -Le -Dhandler:inject -Ddebug or
-f /tmp/snmp.log -Le -Dhandler:inject -Ddebug or
-Lo -Dhandler:inject -Ddebug
   yeilded no log file - all msgs went to screen but only had the output from 
snmp_log msgs - none from the DEBUG handler:inject




-Original Message-
From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On Behalf 
Of Dave Shield
Sent: Thursday, May 28, 2009 10:07 AM
To: Joan Landry
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: Need help with snmp_log() msgs from snmp_agent.c

2009/5/28 Joan Landry joan.lan...@overturenetworks.com:
 This is my snmpd input line

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

Try starting the agent with   '-f -Le'  plus the same list of -D tokens.
What do you see logged?The same as when you use '-Lf' or something
different?

i.e. try to determine whether the issue is with your choice of debug tokens, or 
the introduction of file logging.

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
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


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

2009-05-28 Thread Dave Shield
2009/5/28 Joan Landry joan.lan...@overturenetworks.com:
 -f -Le -Dhandler:inject -Ddebug or
 -f /tmp/snmp.log -Le -Dhandler:inject -Ddebug or
 -Lo -Dhandler:inject -Ddebug
   yeilded no log file

which is as expected
(Note that the second invocation is invalid - please re-read
 the meaning of the -f flag)


 - all msgs went to screen but only had the output from snmp_log
  msgs - none from the DEBUG handler:inject

so the issue is with the choice of debug flags, not the logging options.

Try using a debug token that appears in the MIB module that you
are actually wanting to use.

Both with
-f -Le -D{token}
   (to check that the debug message is output)
and then with
-Lf /tmp/snmp.log -D{token}
   (to check that it's logged to the file)


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
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


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

2009-05-28 Thread Joan Landry
Dave,
I was not sure what token you were referring to in the mib module so to make 
things really simple I decided to see if I could get a debug msg out of the 
agent_trap.c file from the function netsnmp_send_traps function - which has at 
the very top of the function:
DEBUGMSGTL(( trap, send_trap %d %d , trap, specific));
DEBUGMSGOID((trap, enterprise, enterprise_length));
DEBUGMSG(( trap, \n));

Which is not dependent on any mib module specific information and which should 
be generated every time I send a trap using send_v2trap(var_list);

I used OPTIONS=-Lo -Dtrap

And sent a trap - and verified that the trap was sent. 
And there was no trap debug msg on the output screen or to the log when I used 
-Lf /tmp/snmp.log -Dtrap.

So for some reason I am not able to get any of the DEBUG msgs.
Thanks for your help and any info you can give me on how to get this to work.

 

-Original Message-
From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On Behalf 
Of Dave Shield
Sent: Thursday, May 28, 2009 10:54 AM
To: Joan Landry
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: Need help with snmp_log() msgs from snmp_agent.c

2009/5/28 Joan Landry joan.lan...@overturenetworks.com:
 -f -Le -Dhandler:inject -Ddebug or
 -f /tmp/snmp.log -Le -Dhandler:inject -Ddebug or -Lo -Dhandler:inject 
 -Ddebug
   yeilded no log file

which is as expected
(Note that the second invocation is invalid - please re-read  the meaning of 
the -f flag)


 - all msgs went to screen but only had the output from snmp_log  msgs 
 - none from the DEBUG handler:inject

so the issue is with the choice of debug flags, not the logging options.

Try using a debug token that appears in the MIB module that you are actually 
wanting to use.

Both with
-f -Le -D{token}
   (to check that the debug message is output) and then with
-Lf /tmp/snmp.log -D{token}
   (to check that it's logged to the file)


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
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users