Re: Net-snmp leaks memory after 5 hours

2010-09-07 Thread Nikos Balkanas
Yeap. If in linux try valgrind.

BR,
Nikos
- Original Message - 
From: Bart Van Assche
To: kavita raghunathan
Cc: Net-snmp-users@lists.sourceforge.net
Sent: Wednesday, September 08, 2010 9:06 AM
Subject: Re: Net-snmp leaks memory after 5 hours


On Tue, Sep 7, 2010 at 11:55 PM, kavita raghunathan  
wrote:

Hello, After 5 hours, I notice that the memory usage of net-snmp has jumped. 
It does not seem to depend on the application code I have written - any 
ideas where to look ?


What do you mean with "memory usage" ? Are you referring here to the VSZ or 
to the RSS value ?

Bart.




--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd



___
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 


--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
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: rpm build

2010-01-06 Thread Nikos Balkanas
Hi,

You need to be root to do what you are trying to. Or at least have write 
permissions to /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto.

BR,
Nikos
  - Original Message - 
  From: rangeli nepal 
  To: net-snmp-users 
  Sent: Wednesday, January 06, 2010 5:30 PM
  Subject: rpm build


  I am trying to build rpm for net-snmp 5.5 on a redhat 3 machine. I am using 
spec file that came with net-snmp5.5 stored in dist directory.
  Any clue will be highly appreciated.
  Thank you.
  rn



  It exits at with message:


  Warning: You do not have permissions to install into 
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi at 
/usr/lib/perl5/5.8.0/ExtUtils/Install.pm line 84.
  mkdir /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/SNMP: 
Permission denied at /usr/lib/perl5/5.8.0/ExtUtils/Install.pm line 137
  make[1]: *** [pure_vendor_install] Error 255
  make[1]: Leaving directory `/home/sjha/rpm/BUILD/net-snmp-5.5/perl'
  make: *** [perlinstall] Error 1
  error: Bad exit status from /home/sjha/rpm/tmp/rpm-tmp.48839 (%install)




  RPM build errors:
  Bad exit status from /home/sjha/rpm/tmp/rpm-tmp.48839 (%install)


  If I look at the rpm-tmp.48839. I get following at the end:




  rm -rf $RPM_BUILD_ROOT


  make DESTDIR=/tmp/net-snmp-root install


  # Remove 'snmpinform' from the temporary directory because it is a
  # symbolic link, which cannot be handled by the rpm installation process.
  /bin/rm -f $RPM_BUILD_ROOT/usr/bin/snmpinform
  # install the init script
  mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
  perl -i -p -e 's@/usr/local/share/snmp/@/etc/snmp/@g;s...@usr/local@/u...@g' 
dist/snmpd-init.d
  install -m 755 dist/snmpd-init.d $RPM_BUILD_ROOT/etc/rc.d/init.d/snmpd


  # unneeded Perl stuff
  find $RPM_BUILD_ROOT//usr/lib/perl5/ -name Bundle -type d | xargs rm -rf
  find $RPM_BUILD_ROOT//usr/lib/perl5/ -name perllocal.pod | xargs rm -f


  # store a copy of installed Perl stuff.  It's too complex to predict
  (xxdir=`pwd` && cd $RPM_BUILD_ROOT && find usr/lib*/perl5 -type f | sed 
's/^/\//' > $xxdir/net-snmp-perl-files)






 /usr/lib/rpm/find-debuginfo.sh /home/ranglieNepal/rpm/BUILD/net-snmp-5.5






  /usr/lib/rpm/redhat/brp-compress


  /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
  /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump




--


  --
  This SF.Net email is sponsored by the Verizon Developer Community
  Take advantage of Verizon's best-in-class app development support
  A streamlined, 14 day to market process makes app distribution fast and easy
  Join now and get one step closer to millions of Verizon customers
  http://p.sf.net/sfu/verizon-dev2dev


--


  ___
  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
--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev ___
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: problem in loading shared libraries

2009-06-09 Thread Nikos Balkanas
Hi,

Which OS do you use?

For Solaris:

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"

For Linux:

Add path to /etc/ld.so.conf & run ldconfig

BR,
Nikos
  - Original Message - 
  From: nitin agrawal 
  To: Net-snmp-users@lists.sourceforge.net 
  Sent: Tuesday, June 09, 2009 2:08 PM
  Subject: problem in loading shared libraries


  I am getting the following error while running my make file .
  mpi_dual: error while loading shared libraries: libnetsnmpagent.so.15: cannot 
open shared object file: No such file or directory


  When i run this command i get the output as 
  net-snmp-5.0.9-2.30E.27
  net-snmp-devel-5.0.9-2.30E.27
  net-snmp-libs-5.0.9-2.30E.27


  The libnetsnmpagent.so.15 file is present in /usr/local/lib/ directory .

  How can I remove this error .
  Please help me.



--


  --
  Crystal Reports - New Free Runtime and 30 Day Trial
  Check out the new simplified licensing option that enables unlimited
  royalty-free distribution of the report engine for externally facing 
  server and web deployment.
  http://p.sf.net/sfu/businessobjects


--


  ___
  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
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects___
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: net-snmp dependency for SUN4u

2009-05-08 Thread Nikos Balkanas
net-snmp dependency for SUN4uHi,

Have you tried Sun or Google? If you have your installation disks it should be 
somewhere in there. BTW there is no SUN4U Solaris package. Sun4u is the 64bit 
Ultrasparc architecture. A whole list of packages for that architecture have 
this in their name.

BR,
Nikos
  - Original Message - 
  From: Anders Wei 
  To: net-snmp-users@lists.sourceforge.net 
  Sent: Friday, May 08, 2009 5:07 AM
  Subject: net-snmp dependency for SUN4u


  All:

  I am trying to compile net-snmp in Sun Solaris 10 X64, but it seems it needs 
support of SUN4U library.

  In ucd-snmp/lmSensors.c: it includes this file: 
/usr/platform/sun4u/include/sys/envctrl.h which is a part of SUN4U support, I 
am using SunStudio compilers and I didn’t find this library. Even I searched a 
lot in GOOGLE and almost find nothing helps.

  Does anyone know where to download this SUN4U package?

  Thanks.





--


  --
  The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
  production scanning environment may not be a perfect world - but thanks to
  Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
  Series Scanner you'll get full speed at 300 dpi even with all image 
  processing features enabled. http://p.sf.net/sfu/kodak-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
--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-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: Porting solaris code to windows

2009-04-27 Thread Nikos Balkanas
Absolutely not. Kernel is different, kernel traps are different and therefore 
system calls are different. Not even a chance to work.

BR,
Nikos
  - Original Message - 
  From: Bruce Shaw 
  To: Tanisha Kashyap ; Net-snmp-users@lists.sourceforge.net 
  Sent: Monday, April 27, 2009 9:39 PM
  Subject: RE: Porting solaris code to windows


  It's extremely unlikely that one operating system's libraries will run on 
another OS.

  Compile separately on each platform.



--
  From: Tanisha Kashyap [mailto:tanisha.kash...@aricent.com] 
  Sent: Friday, April 24, 2009 4:45 AM
  To: Net-snmp-users@lists.sourceforge.net
  Subject: Porting solaris code to windows


  Hi,

   

  I have developed my dynamically loadable module on a solaris box using 
net-snmp 5.0.9

  I want to compile this code on a windows machine and have a few questions 
regarding this:

   

  1)   will I be required to install net-snmp on windows or can I just move 
the required libs from solaris to windows

  2)   also the .so file compiled on the windows machine be usable on 
solaris box again

   

  thanks..

   

  "No task is so humble that it does not offer an outlet for individuality"

   



--
  "DISCLAIMER: This message is proprietary to Aricent and is intended solely 
for the use of the individual to whom it is addressed. It may contain 
privileged or confidential information and should not be circulated or used for 
any purpose other than for what it is intended. If you have received this 
message in error,please notify the originator immediately. If you are not the 
intended recipient, you are notified that you are strictly prohibited from 
using, copying, altering, or disclosing the contents of this message. Aricent 
accepts no responsibility for loss or damage arising from the use of the 
information transmitted by this email including damage from virus."



--


  --
  Crystal Reports - New Free Runtime and 30 Day Trial
  Check out the new simplified licensign option that enables unlimited
  royalty-free distribution of the report engine for externally facing 
  server and web deployment.
  http://p.sf.net/sfu/businessobjects


--


  ___
  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
--
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf___
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: disable TCP from NetBSD

2009-03-23 Thread Nikos Balkanas
Hi,

You can still work with raw sockets, therefore rewriting your IP packets - 
useful and advanced network programming, without bypassing your kernel. If you 
do (bypass it) there is a whole lot of userspace applications that depend on 
it, and I am afraid you may end up with a useless system.

Good luck,
Nikos
  - Original Message - 
  From: Alexander Bubnov 
  To: Nikos Balkanas 
  Cc: net-snmp-users@lists.sourceforge.net 
  Sent: Monday, March 23, 2009 9:11 AM
  Subject: Re: disable TCP from NetBSD


  Thanks you for replay, Nikos!

  Most probably you are right that I am not in right direction... I just would 
like to write a simple implementation of TCP layer of TCP/IP stack. For this 
purpose I need IP layer to get IP PDU (packets) with help of raw socket. Now, I 
cannot use socket interface as the kernel caught all TCP fragments. even I 
cannot receive TCP PDU using bpf from other peers because the kernel sends RST 
as it thinks there are not listeners. 

  I though TCP layer can be easily separated off from the kernel. But, as far 
as I understand only whole TCP/IP stack can be turned off because all the 
layers have strong dependencies from each other beginning at NIC drivers. 

  2009/3/23 Nikos Balkanas 


Hi,

What are you trying to do? It doesn't seem you are in the right direction. 
All IP traffic should and will go through the kernel. I presume you are not 
redeveloping your NIC drivers.

BR,
Nikos
  - Original Message - 
  From: Alexander Bubnov 
  To: net-snmp-users@lists.sourceforge.net 
  Sent: Sunday, March 22, 2009 7:05 PM
  Subject: disable TCP from NetBSD


  Hello, all! 
  I am going to practice in net programming by writing TCP protocol. Can 
you please let me know how to disable TCP from NetBSD because as I guess all 
tcp packets will be catched by kernel? Unfortunately, I have not found the way 
in manual about sysctl and GENERIC conf file for kernel, just "options INET" 
which turn off IP + ICMP + TCP.


  Thanks in advance.

  -- 
  /BR, Alexander



--
  
--
  Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
  powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
  easily build your RIAs with Flex Builder, the Eclipse(TM)based development
  software that enables intelligent coding and step-through debugging.
  Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-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







  -- 
  /BR, Alexander

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-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: disable TCP from NetBSD

2009-03-22 Thread Nikos Balkanas
Hi,

What are you trying to do? It doesn't seem you are in the right direction. All 
IP traffic should and will go through the kernel. I presume you are not 
redeveloping your NIC drivers.

BR,
Nikos
  - Original Message - 
  From: Alexander Bubnov 
  To: net-snmp-users@lists.sourceforge.net 
  Sent: Sunday, March 22, 2009 7:05 PM
  Subject: disable TCP from NetBSD


  Hello, all!
  I am going to practice in net programming by writing TCP protocol. Can you 
please let me know how to disable TCP from NetBSD because as I guess all tcp 
packets will be catched by kernel? Unfortunately, I have not found the way in 
manual about sysctl and GENERIC conf file for kernel, just "options INET" which 
turn off IP + ICMP + TCP.


  Thanks in advance.

  -- 
  /BR, Alexander



--


  --
  Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
  powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
  easily build your RIAs with Flex Builder, the Eclipse(TM)based development
  software that enables intelligent coding and step-through debugging.
  Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-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
--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-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: Question about the License

2009-02-17 Thread Nikos Balkanas
All licenses are under the BSD style. Just include a page in your 
documentation where all copyrights (all 7 of them) are listed and due 
aknowledged. Believe me, if you are writing an application, you will have 
many more licenses to include (openssl, etc.)

BR
Nikos
- Original Message - 
From: "Dave Shield" 
To: "Yoshio Kawamo" 
Cc: ; ; 
; 
Sent: Tuesday, February 17, 2009 11:20 AM
Subject: Re: Question about the License


> Disclaimer:  I am not a lawyer, and my personal opinions carry
> no official standing whatsoever.   If you are in any doubt, you
> should consult your lawyers.
>
>
> 2009/2/17 Yoshio Kawamo :
>> We are making a software and planning to use the
>> NET-SNMP source having static link with the software.
>>
>> I have two questions about the License of NET-SNMP.
>>
>> 1.There seem to be seven parts of the License in the
>>  NET-SNMP web site. Is it necessary for us to submit
>>  all parts of the License, or can we select one of
>>  the seven parts?
>
> You should not delete any section of the COPYING file.
>
> The various institutions listed there have all asserted
> copywright over their contributions to the project.
> Use of the software is subject to the conditions listed
> in this file - which include distribution of the lioensing
> conditions themselves.
>
>
>
>> 2.In case that we use the NET-SNMP source having link
>>  with the software made by us, does the license apply
>>  only to the NET-SNMP source or dose it also apply to
>>  the software which has link with the NET-SNMP?
>
> It applies only to the Net-SNMP code.   You can decide for
> yourself what licensing conditions to apply to your own code.
>
> The Net-SNMP uses what is known as "BSD-style" licensing.
> See http://en.wikipedia.org/wiki/BSD_licenses for a description
> of what this means.
>
>
> And if in doubt, consult your lawyers.
>
> Dave
>
> --
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, 
> CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the 
> Enterprise
> -Strategies to boost innovation and cut costs with open source 
> participation
> -Receive a $600 discount off the registration fee with the source code: 
> SFAD
> http://p.sf.net/sfu/XcvMzF8H
> ___
> 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 


--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
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: multi-byte characters

2009-02-06 Thread Nikos Balkanas
>From mibs/SNMP-TARGET-MIB.txt :

SnmpTagValue ::= TEXTUAL-CONVENTION
DISPLAY-HINT "255t"
STATUS   current
DESCRIPTION
"An octet string containing a tag value.
 Tag values are preferably in human-readable form.

 To facilitate internationalization, this information
 is represented using the ISO/IEC IS 10646-1 character
 set, encoded as an octet string using the UTF-8
 character encoding scheme described in RFC 2279.

 Since additional code points are added by amendments
 to the 10646 standard from time to time,
 implementations must be prepared to encounter any code
 point from 0x to 0x7fff.

Hope this helps,
Nikos

- Original Message - 
From: "Mike Ayers" 
To: ; 
Sent: Saturday, February 07, 2009 1:09 AM
Subject: RE: multi-byte characters


>> From: Scott Grumm [mailto:scottgr...@gmail.com]
>> Sent: Friday, February 06, 2009 10:13 AM
>
>> Are there any data types that support mult-byte
>> characters/strings?  We are working on internationalization
>> and I need to figure out if it's possible to send traps and
>> respond to queries with multi-byte characters so languages
>> such as Japanese and Chinese would be possible.
>
> SNMP's OCTET STRING is 8 bit clkean - always has been, always will be. 
> There's a UTF-8 TC in one of the major RFCs, but I forget which.
>
>
> HTH,
>
> Mike
>
> --
> Create and Deploy Rich Internet Apps outside the browser with 
> Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code 
> to
> build responsive, highly engaging applications that combine the power of 
> local
> resources and data with the reach of the web. Download the Adobe AIR SDK 
> and
> Ajax docs to start building applications 
> today-http://p.sf.net/sfu/adobe-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 


--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-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: How can I define my own trap?

2009-02-02 Thread Nikos Balkanas
Maybe you should consider using smilint. It proofreads your MIB syntax.

BR,
Nikos
- Original Message - 
From: "Dave Shield" 
To: "Ignasi Paredes Oliva" 
Cc: 
Sent: Monday, February 02, 2009 2:42 PM
Subject: Re: How can I define my own trap?


> 2009/2/2 Ignasi Paredes Oliva :
>> Definition:
>> Time OBJECT-TYPE
>> SYNTAX STRING
>
> That doesn't look like a valid definition.
> The SMI syntax is "OBJECT STRING", not "STRING".
>
> So unless you've got a private TC definition,
> that may well be confusing the MIB parser.
>
> (And MIB object names must start with a lower-case letter,
> so the name isn't strictly valid either)
>
>
>
>> Command: (omitting all the other attributes of the trap)
>> snmptrap -v 2c -c public 127.0.0.1 "" TESTING-TRAP-NOTIFICATION::trapTEST
>>  Time s "19:55:67"
>
> Try using the MIB-qualified name - i.e. MY-MIB::Time
> Or with a fully-numeric OID instead.
>
> Dave
>
> --
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> ___
> 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 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: Traphandle (TraptoEmail) Not working properly (read: Permission denied ???)

2009-01-29 Thread Nikos Balkanas
First with your prior question:

snmptrapd (-Le) will log to stderr.
snmpd (-Lf) will log to a file. Use (-Le) to get to standard error.

What is traptoemail? Script? Binary?

The only other reason I can think of for running from the shell and not from 
snmptrapd is from environment values. I suspect that the error you are 
getting has nothing to do with permissions, but is something else.

Can you post your /etc/snmp/snmptrapd.conf?

Which OS? Compiled latest net-snmp or using package?

BR,
Nikos
- Original Message - 
From: "Antonio Guerra" 
To: "Nikos Balkanas" 
Cc: 
Sent: Thursday, January 29, 2009 4:21 PM
Subject: Re: Traphandle (TraptoEmail) Not working properly (read: Permission 
denied ???)


> If I do the following it works:
> # less /var/log/snmptrapd.log | /usr/bin/traptoemail em...@email.com
>
> So is definitely not the script, so what do you think might be wrong
> with my snmptrapd daemon?
>
> How do I check what dependencies am I might be missing...
>
> Or better yet why can't I fork the program to run in the foreground?
>
> On Wed, Jan 28, 2009 at 9:25 AM, Nikos Balkanas  
> wrote:
>> I presume that TraptoEmail works if run from the shell. Right?
>>
>> BR,
>> Nikos
>> - Original Message - From: "Antonio Guerra"
>> 
>> To: "Dave Shield" 
>> Cc: 
>> Sent: Wednesday, January 28, 2009 2:42 PM
>> Subject: Re: Traphandle (TraptoEmail) Not working properly (read: 
>> Permission
>> denied ???)
>>
>>
>>> Dave,
>>>
>>> Any thoughts on the issue below? I seem to be stuck between a rock and
>>> a hard place. It logs to file, but its not logging to the screen.
>>> Traphandles and Traptoemail are still not working.
>>>
>>>
>>> On Tue, Jan 27, 2009 at 10:55 AM, Antonio Guerra
>>>  wrote:
>>>>
>>>> Dave,
>>>>
>>>> Opened two shell windows. One running the forked daemon, the other
>>>> generating traps.
>>>>
>>>> I don't see anything happening on the forked window when sending
>>>> traps. As you can see below the process is running with the flags you
>>>> recommended:
>>>>
>>>> # ps -ef | egrep snmp
>>>> root 21750 21510  0 10:49 ?00:00:00 /usr/sbin/snmptrapd -f
>>>> -Le -Dsnmptrapd -Cc /etc/snmp/snmptrapd.conf
>>>> root 21764 1  0 10:49 ?00:00:00 /usr/sbin/snmpd -Lf
>>>> /var/log/snmpd.log -p /var/run/snmpd.pid -a
>>>>
>>>>
>>>> On Tue, Jan 27, 2009 at 10:42 AM, Dave Shield
>>>>  wrote:
>>>>>
>>>>> 2009/1/27 Antonio Guerra :
>>>>>>
>>>>>> When I try running that command, the process hangs.
>>>>>
>>>>> Are you sure it's not simply waiting to receive a trap?
>>>>> Those options will run the trap receiver as a normal
>>>>> command, rather than forking it off into the background
>>>>> (which is the normal operation of a daemon).
>>>>>
>>>>> Start the trap daemon in one window or shell command.
>>>>> Then send the trap in a different window.
>>>>> You should see things happening in the trapd window.
>>>>>
>>>>> Dave
>>>>>
>>>>
>>>
>>>
>>> --
>>> This SF.net email is sponsored by:
>>> SourcForge Community
>>> SourceForge wants to tell your story.
>>> http://p.sf.net/sfu/sf-spreadtheword
>>> ___
>>> 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
>>
>> 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: sysUpTime returns an error

2009-01-28 Thread Nikos Balkanas
Hi,

The way I would proceed is to start snmpd and fire the subagent (agentx?) 
through gdb. You need to put a breakpoint before the call to sysUpTime. From 
another window use snmpget to initiate the sysUpTime request.

If you have correctly placed the breakpoint, the subagent gdb should freeze. 
You can then step through each function to see where is the problem.

This is of course low level debugging, but the only one I know for dealing 
one's own code. You could also use print statements along the code, but gdb 
is much more flexible.

You understand that although the forum can answer specific issues and 
questions, it is not suitable for remote debugging each own's programs.

BR,
Nikos
- Original Message - 
From: "Tanya Brudner" 
To: 
Sent: Wednesday, January 28, 2009 3:04 PM
Subject: FW: sysUpTime returns an error


>
> Hey ,
>
> Perhaps I didn't make it clear - I have the subagent sourcecode, of
> course,
>
> What I meant is I don't have the ability to reconfigure the agent
> (snmpd) - as to changing the modules and stuff.
>
> As to the person who wrote it - I doubt he'll be interested in helping,
> wherever he is today...
>
> -Original Message-
> From: Nikos Balkanas [mailto:nbalka...@gmail.com]
> Sent: Wednesday, January 28, 2009 14:43
> To: Tanya Brudner; Dave Shield; net-snmp-users@lists.sourceforge.net
> Subject: Re: sysUpTime returns an error
>
> Hi,
>
> I am sorry Tanya. If you don't have access to the source code and/or
> debugger for the code, it seems a lost cause. Better find the guy who
> has
> and ask him to correct it. I doubt that this problem can be fixed only
> by
> configuration, or that the root cause can be found by searching in the
> dark.
>
> BR,
> Nikos
> - Original Message - 
> From: "Tanya Brudner" 
> To: "Nikos Balkanas" ; "Dave Shield"
> ; 
> Sent: Wednesday, January 28, 2009 12:47 PM
> Subject: RE: sysUpTime returns an error
>
>
> Hi Nikos, Dave and all,
>
>> Oh, well, that explains everything. Everyone here assumed that
> sysUpTime >was returned from the agent, and since nobody had problems
> like that, we
>>couldn't figure out what's wrong. You should have mentioned that at the
>
>>beginning, a lot of time got waisted because of that.
>
> I apologize again for wasting everyone's time, but as I was thrown into
> this project without any guidance and without even knowing what SNMP is
> - not to mention masters and agents - it took me a while to even start
> figuring things out. I'm not writing the agent, or even rewriting it -
> just trying to fix it, and it proves to be quite a task...
> I really do appreciate all the help here and wouldn't even know how to
> move on without it.
>
>>To exclude MIBs you use:
>>snmpd -I -DISMAN-EVENT-MIB (that's I as in Internet)
>
>>Minor correction - you should specify the name of the MIB
>>*code* module (e.g. 'mteEvent'), not th name of the MIB file.
>>See 'mibgroup/mib_module_inits.h' for the full list of configured
>>modules for your agent.   Note that you may need to exclude
>>more than one code module.
>
> Yes, I tried excluding specific mte<...> modules, (and even all) - but
> that didn't prove to help. Either get the same "answer", or ruin it all
> (the system-mib stops replying altogether). Tried running it with the
> -Dmib_init option, but I don't get no list. I am not sure what the
> codependencies are, or how to learn them.
> I attach here the mib_modules_init.h, perhaps you can advise.
>
> (Just to make clear: I am not the one that can make compile-time
> changes, only invocation / runtime.)
>
> As I really do struggle to make sense of it and make it all work, I'll
> appreciate any advice you can give me, or any reference I might have
> missed that can shed more light.
>
> Thanks and apologies again,
>
> -Tanya
>
>
>
>
> -Original Message-
> From: Nikos Balkanas [mailto:nbalka...@gmail.com]
> Sent: Tuesday, January 27, 2009 22:01
> To: Tanya Brudner; net-snmp-users@lists.sourceforge.net
> Subject: Re: sysUpTime returns an error
>
>
>
> for more CLI options use snmpd -h
>
> snmpd -Dmib_init
>
> will give you the MIBs that snmpd loaded at startup.
>
> You will have to go by trial and error. i would start by removing DISMAN
>
> mibs first. But you have to consider that it is the subagent that needs
> fixing, not the mIB tree.
>
> BR,
> Nikos
> - Original Message - 
> From: "Tanya Brudner" 
> To: "Nikos Balkanas" ;
> 
> Sent: Tuesday, January 27, 2009 8:42 PM
&g

Re: Ayuda

2009-01-28 Thread Nikos Balkanas
Hi,

Could you please move this thread underground? It's flooding our mailbox, 
and don't understand anything...

Thanx,
Nikos
- Original Message - 
From: "NOC-BBY-MetroAntel" 
To: "'Mike Ayers'" 
Cc: 
Sent: Wednesday, January 28, 2009 2:33 PM
Subject: RE: Ayuda


Ya elimine ese error actualizando net-snmp-libs pero ahora tengo

[r...@customer-195-42 snmp]# service snmpd restart
Parando snmpd: [FALLΓ“]
Iniciando snmpd: [  OK  ]
[r...@customer-195-42 snmp]# service snmpd status
snmpd inactivo pero subsistema bloqueado
[r...@customer-195-42 snmp]#



-Mensaje original-
De: Mike Ayers [mailto:mike_ay...@tvworks.com]
Enviado el: Martes, 27 de Enero de 2009 20:02
Para: NOC-BBY-MetroAntel
CC: net-snmp-users@lists.sourceforge.net
Asunto: RE: Ayuda

> From: NOC-BBY-MetroAntel [mailto:noc-omac...@antel.net.ec]
> Sent: Tuesday, January 27, 2009 4:18 PM

> [r...@customer-195-42 ~]# rm /var/run/snmpd.pid
> rm: ΒΏborrar el fichero regular Β«/var/run/snmpd.pidΒ»? (s/n) s
> [r...@customer-195-42 ~]#
>
> [r...@customer-195-42 ~]# /etc/init.d/snmpd start
> Iniciando snmpd: [  OK  ]
> [r...@customer-195-42 ~]# /etc/init.d/snmpd status
> snmpd interrumpido pero existe un archivo pid
> [r...@customer-195-42 ~]#

!!!

H

cambie por favor:

> # Ramas MIB que se permiten ver
>
> ## name incl/excl subtree mask(optional)
>
> view all included .1 80

a:

# Ramas MIB que se permiten ver
## name incl/excl subtree mask(optional)
view all included .1.3 C0
view none excluded .1.3 C0

Mire en /etc/init.d/snmpd para encontrar la localizaciσn del snmpd
ejecutable, entonces:

$ /path/to/snmpd -Le -f

Corte y pegar por favor la salida.


Gracias,

Mike


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: Traphandle (TraptoEmail) Not working properly (read: Permission denied ???)

2009-01-28 Thread Nikos Balkanas
I presume that TraptoEmail works if run from the shell. Right?

BR,
Nikos
- Original Message - 
From: "Antonio Guerra" 
To: "Dave Shield" 
Cc: 
Sent: Wednesday, January 28, 2009 2:42 PM
Subject: Re: Traphandle (TraptoEmail) Not working properly (read: Permission 
denied ???)


> Dave,
>
> Any thoughts on the issue below? I seem to be stuck between a rock and
> a hard place. It logs to file, but its not logging to the screen.
> Traphandles and Traptoemail are still not working.
>
>
> On Tue, Jan 27, 2009 at 10:55 AM, Antonio Guerra
>  wrote:
>> Dave,
>>
>> Opened two shell windows. One running the forked daemon, the other
>> generating traps.
>>
>> I don't see anything happening on the forked window when sending
>> traps. As you can see below the process is running with the flags you
>> recommended:
>>
>> # ps -ef | egrep snmp
>> root 21750 21510  0 10:49 ?00:00:00 /usr/sbin/snmptrapd -f
>> -Le -Dsnmptrapd -Cc /etc/snmp/snmptrapd.conf
>> root 21764 1  0 10:49 ?00:00:00 /usr/sbin/snmpd -Lf
>> /var/log/snmpd.log -p /var/run/snmpd.pid -a
>>
>>
>> On Tue, Jan 27, 2009 at 10:42 AM, Dave Shield
>>  wrote:
>>> 2009/1/27 Antonio Guerra :
 When I try running that command, the process hangs.
>>>
>>> Are you sure it's not simply waiting to receive a trap?
>>> Those options will run the trap receiver as a normal
>>> command, rather than forking it off into the background
>>> (which is the normal operation of a daemon).
>>>
>>> Start the trap daemon in one window or shell command.
>>> Then send the trap in a different window.
>>> You should see things happening in the trapd window.
>>>
>>> Dave
>>>
>>
>
> --
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> ___
> 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 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: sysUpTime returns an error

2009-01-28 Thread Nikos Balkanas
Hi,

I am sorry Tanya. If you don't have access to the source code and/or 
debugger for the code, it seems a lost cause. Better find the guy who has 
and ask him to correct it. I doubt that this problem can be fixed only by 
configuration, or that the root cause can be found by searching in the dark.

BR,
Nikos
- Original Message - 
From: "Tanya Brudner" 
To: "Nikos Balkanas" ; "Dave Shield" 
; 
Sent: Wednesday, January 28, 2009 12:47 PM
Subject: RE: sysUpTime returns an error


Hi Nikos, Dave and all,

> Oh, well, that explains everything. Everyone here assumed that
sysUpTime >was returned from the agent, and since nobody had problems
like that, we
>couldn't figure out what's wrong. You should have mentioned that at the

>beginning, a lot of time got waisted because of that.

I apologize again for wasting everyone's time, but as I was thrown into
this project without any guidance and without even knowing what SNMP is
- not to mention masters and agents - it took me a while to even start
figuring things out. I'm not writing the agent, or even rewriting it -
just trying to fix it, and it proves to be quite a task...
I really do appreciate all the help here and wouldn't even know how to
move on without it.

>To exclude MIBs you use:
>snmpd -I -DISMAN-EVENT-MIB (that's I as in Internet)

>Minor correction - you should specify the name of the MIB
>*code* module (e.g. 'mteEvent'), not th name of the MIB file.
>See 'mibgroup/mib_module_inits.h' for the full list of configured
>modules for your agent.   Note that you may need to exclude
>more than one code module.

Yes, I tried excluding specific mte<...> modules, (and even all) - but
that didn't prove to help. Either get the same "answer", or ruin it all
(the system-mib stops replying altogether). Tried running it with the
-Dmib_init option, but I don't get no list. I am not sure what the
codependencies are, or how to learn them.
I attach here the mib_modules_init.h, perhaps you can advise.

(Just to make clear: I am not the one that can make compile-time
changes, only invocation / runtime.)

As I really do struggle to make sense of it and make it all work, I'll
appreciate any advice you can give me, or any reference I might have
missed that can shed more light.

Thanks and apologies again,

-Tanya




-Original Message-
From: Nikos Balkanas [mailto:nbalka...@gmail.com]
Sent: Tuesday, January 27, 2009 22:01
To: Tanya Brudner; net-snmp-users@lists.sourceforge.net
Subject: Re: sysUpTime returns an error



for more CLI options use snmpd -h

snmpd -Dmib_init

will give you the MIBs that snmpd loaded at startup.

You will have to go by trial and error. i would start by removing DISMAN

mibs first. But you have to consider that it is the subagent that needs
fixing, not the mIB tree.

BR,
Nikos
- Original Message - 
From: "Tanya Brudner" 
To: "Nikos Balkanas" ;

Sent: Tuesday, January 27, 2009 8:42 PM
Subject: RE: sysUpTime returns an error


Thanks again, Nikos, for all your help.

I still don't really understand how this problem is caused, but I think
it has something to do with the fact that the subagent is actually the
one that "answers" to sysUpTime, (perhaps this sheds light on things and
I should have mentioned it earlier, if so - please forgive the newbie :)
).

I found a while back how to exclude the system_mib module on invocation
(in the snmpd start script), I'd like to exclude this cross-reference as
well (and see what happens :) ). How do I do that (find what's the
module I need to exclude)?

Thanks,

-Tanya



-Original Message-
From: Nikos Balkanas [mailto:nbalka...@gmail.com]
Sent: Tuesday, January 27, 2009 18:21
To: Tanya Brudner; Mike Ayers; net-snmp-users@lists.sourceforge.net
Subject: Re: sysUpTime returns an error

sysUpTime is defined in 2 places: RFV1213-MIB and SNMPv2-MIB.
DISMAN-EVENT-MIB has an instance of SNMPv2. The first one (RFC) is the
official, the second one is depreciated, but still working.

Maybe the problem is with mteTriggerDeltaDiscontinuityID in
DISMAN-EVENT-MIB
(read).

BR,
Nikos
- Original Message - 
From: "Tanya Brudner" 
To: "Mike Ayers" ; "Nikos Balkanas"
; 
Sent: Tuesday, January 27, 2009 5:42 PM
Subject: RE: sysUpTime returns an error



Hello all,

I thank you for your help and apologize for my (unforeseen) absence and
thus - belated response.

I ask to remind you that the issue in question is the error in sysUptime
(please see below). In short - all attempts to get its value failed
miserably.
The result for snmpget ... returns: "DISMAN-EVENT-MIB::sysUpTimeInstance
= No such Object available on this agent at this OID".

- I tried changing the conf. file as was suggested by Nikos, no luck.

- Snmpwalk skips it all together, returning just:
SNMPv2-MIB::

Re: Ayuda

2009-01-27 Thread Nikos Balkanas
Well, of course! I don't speak Spanish, but the Latin root is pretty 
obvious:

"archivo pid" = pid file.
"existe" = exists
"interrumpido" = was interrupted

(Rest left to imagination).

He has to delete the PID file, otherwise snmpd thinKs that there is already 
an instance running. I can't find a default pid file on my system. I suspect 
he may have used the CLI option.

BR,
Nikos

- Original Message - 
From: "Mike Ayers" 
To: "Antonio Guerra" 
Cc: "NOC Oswaldo Macias" ; 

Sent: Tuesday, January 27, 2009 10:57 PM
Subject: RE: Ayuda



It seems that when he tries to run snmpd, he's getting the error "snmpd 
interrumpido pero existe un archivo pid", which Babelfish translates 
screwily as well.I thought that message meant that the port was in use, 
but now I suspect it means that there's a pidfile but no PID.


HTH,

Mike

> -Original Message-
> From: Antonio Guerra [mailto:antonio.gue...@gmail.com]
> Sent: Tuesday, January 27, 2009 11:55 AM
> To: Mike Ayers
> Cc: NOC Oswaldo Macias; net-snmp-users@lists.sourceforge.net
> Subject: Re: Ayuda
>
> lol
>
> Demonio = The Devil (Demon)
> Programa = Daemon
>
> I couldn't understand entirely to be able to help him but if you paste
> what you were trying to say, I'll try my best to help him out.
>
> On Tue, Jan 27, 2009 at 2:33 PM, Mike Ayers
>  wrote:
> >> From: NOC Oswaldo Macias [mailto:noc-omac...@antel.net.ec]
> >> Sent: Tuesday, January 27, 2009 5:25 AM
> >
> >> Por favor me podrνan ayudar en algo, tengo el siguiente
> >> cσdigo del snmpd.conf pero me sale "snmpd interrumpido pero
> >> existe un archivo pid" al momento de ejecutarlo.
> >
> >Blame Babelfish for what follows...
> >
> >Compruebe por favor si usted estα funcionando ya el snmpd:
> >
> > $ ps -ef | grep snmpd
> >
> >o
> >
> > $ ps -aux | grep snmpd
> >
> >Si es asν usted puede parar al demonio existente del
> SNMP o funcionar el nuevo un diverso puerto con el
> "agentaddress" directorio de snmpd.conf.
> >
> >
> >EQLA,
> >
> > Mike
> >
> >
> --
> 
> > This SF.net email is sponsored by:
> > SourcForge Community
> > SourceForge wants to tell your story.
> > http://p.sf.net/sfu/sf-spreadtheword
> > ___
> > 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
> >
>

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: sysUpTime returns an error

2009-01-27 Thread Nikos Balkanas
Oh, well, that explains everything. Everyone here assumed that sysUpTime was 
returned from the agent, and since nobody had problems like that, we 
couldn't figure out what's wrong. You should have mentioned that at the 
beginning, a lot of time got waisted because of that.

To exclude MIBs you use:

snmpd -I -DISMAN-EVENT-MIB (that's I as in Internet)

for more CLI options use snmpd -h

snmpd -Dmib_init

will give you the MIBs that snmpd loaded at startup.

You will have to go by trial and error. i would start by removing DISMAN 
mibs first. But you have to consider that it is the subagent that needs 
fixing, not the mIB tree.

BR,
Nikos
- Original Message - 
From: "Tanya Brudner" 
To: "Nikos Balkanas" ; 

Sent: Tuesday, January 27, 2009 8:42 PM
Subject: RE: sysUpTime returns an error


Thanks again, Nikos, for all your help.

I still don't really understand how this problem is caused, but I think
it has something to do with the fact that the subagent is actually the
one that "answers" to sysUpTime, (perhaps this sheds light on things and
I should have mentioned it earlier, if so - please forgive the newbie :)
).

I found a while back how to exclude the system_mib module on invocation
(in the snmpd start script), I'd like to exclude this cross-reference as
well (and see what happens :) ). How do I do that (find what's the
module I need to exclude)?

Thanks,

-Tanya



-Original Message-
From: Nikos Balkanas [mailto:nbalka...@gmail.com]
Sent: Tuesday, January 27, 2009 18:21
To: Tanya Brudner; Mike Ayers; net-snmp-users@lists.sourceforge.net
Subject: Re: sysUpTime returns an error

sysUpTime is defined in 2 places: RFV1213-MIB and SNMPv2-MIB.
DISMAN-EVENT-MIB has an instance of SNMPv2. The first one (RFC) is the
official, the second one is depreciated, but still working.

Maybe the problem is with mteTriggerDeltaDiscontinuityID in
DISMAN-EVENT-MIB
(read).

BR,
Nikos
- Original Message - 
From: "Tanya Brudner" 
To: "Mike Ayers" ; "Nikos Balkanas"
; 
Sent: Tuesday, January 27, 2009 5:42 PM
Subject: RE: sysUpTime returns an error



Hello all,

I thank you for your help and apologize for my (unforeseen) absence and
thus - belated response.

I ask to remind you that the issue in question is the error in sysUptime
(please see below). In short - all attempts to get its value failed
miserably.
The result for snmpget ... returns: "DISMAN-EVENT-MIB::sysUpTimeInstance
= No such Object available on this agent at this OID".

- I tried changing the conf. file as was suggested by Nikos, no luck.

- Snmpwalk skips it all together, returning just:
SNMPv2-MIB::sysDescr.0 = STRING: x
SNMPv2-MIB::sysObjectID.0 = OID: xx.x.x.x
SNMPv2-MIB::sysContact.0 = STRING: Tanya B.
SNMPv2-MIB::sysName.0 = STRING: xxx
SNMPv2-MIB::sysLocation.0 = STRING:
SNMPv2-MIB::sysServices.0 = INTEGER: 3

- The snmpgetnext on .1.3.6.1.2.1.1.3 (as Mike suggested) returned
sysContact data.

However, something has happened in my absence, which I'll appreciate
your input for:
In an attempt to solve the issue, someone here edited the
DISMAN-EVENT-MIB and removed all references to sysUpTime and changed the
DEFVAL for mteTriggerDeltaDiscontinuityID to 0 (zero).

Surprisingly enough - the problem was solved.

As I am new into the SNMP world, and that person just went "brut-force"
and changed it without understanding - I turn to you for explanation. :)

Thanks again,

-Tanya

-----Original Message-
From: Mike Ayers [mailto:mike_ay...@tvworks.com]
Sent: Friday, January 02, 2009 06:32
To: Nikos Balkanas; Tanya Brudner; net-snmp-users@lists.sourceforge.net
Subject: RE: sysUpTime returns an error


> From: Nikos Balkanas [mailto:nbalka...@gmail.com]
> Sent: Thursday, January 01, 2009 2:18 PM

> Yes. You can see clearly the definition of sysUpTime in the
> snmpwalk output.
> You have no problems with MIBs. In fact using either MIBs for
> sysUpTime (RFC or DISMAN) will get you the same result, because they
are
> getting it from the same place:

Just to be clear, SNMPv2-MIB::sysUpTime and
DISMAN-EVENT-MIB::sysUpTimeInstance are the same OID.  The redefinition
of the OID by the disman group was a mistake.  There is no way for an
application to know, when converting that value to text, which of the
two names to use.  It seems that the net-snmp tools will always print
the disman value - do not worry, it is still sysUpTime.

The real item of concern is that your agent does not seem to
have a sysUptime value.  Let's try something - could you try a get-next
on .1.3.6.1.2.1.1.3 and then cut-n-paste command and output (with
security informastion obfuscated) to the list, please?


Thanks,

Mike

P.S.  Happy New Year

-Original Message-
>From: Nikos Balkanas [mailto:nbalka...@gmail.com]
> Sent: Thursday, January 01, 2009 2:18 PM
>Yes. You can see clearly the definition of sysUpTime in

Re: It's unlikely this agent can serve any useful purpose in this state / This receiver will *NOT* accept any incoming notifications

2009-01-27 Thread Nikos Balkanas
Hi,

Very risky. Best try reverse the make install script. This time it works, 
but in the general case avoid it.

BR,
Nikos
- Original Message - 
From: "Antonio Guerra" 
To: 
Sent: Tuesday, January 27, 2009 5:15 PM
Subject: Re: It's unlikely this agent can serve any useful purpose in this 
state / This receiver will *NOT* accept any incoming notifications


>I realize that a few days after I sent the original email. I ended up
> having to rpm remove 5.1.2, then creating a script to clean up the
> initial 5.4.2.1 since it had left residue from the original install,
> then re-installing 5.1.2. I'm using 5.1.2 because the latest release
> is missing lots of dependencies for the version of Redhat I have.
> Below is the script for anyone trying to clean up their nagging
> installs:
>
> first do a:
>
> find / -iname *snmp*
> Make sure you don't delete anything you don't want to (i.e.- /etc and
> /proc stuff...etc...)
>
> Then execute the following script:
>
> #!/bin/bash
> find / -iname *snmp* | egrep -v [ANYTHING YOU WANT OMITTED FROM THE
> SEARCH] >> links
> filename=links
> declare -a array1
> array1=( `cat "$filename"`)
> rm -fRdv echo ${arra...@]}
>
> On Tue, Jan 27, 2009 at 5:27 AM, Dave Shield  
> wrote:
>> 2009/1/22 Antonio Guerra :
>>> At first I tried downloading and installing the latest file from
>>> sourceforge but that didn't go well, so I later decided to install
>>> SNMP from the RPM package on the redhat update page:
>>> net-snmp-5.1.2-13.2.i386.rpm
>>
>> I would strongly suggest that you run with *one* of these two
>> installations.   You currently seem to be mixing the two,
>> which is bound to lead to confusion.
>>
>>
>>> snmpd -v
>>>
>>> NET-SNMP version:  5.4.2.1
>>
>> This is the agent that you compiled yourself.
>>
>>> snmpd -f -Le -d:
>>>
>>> Warning: no access control information configured.
>>
>> ... which is probably looking for /usr/local/share/snmp/snmpd.conf
>> (among other possible locations)
>>   It will *not* be looking in /etc/snmp
>>
>>> "ps aux | egrep snmp*"
>>>
>>> root 31369  0.0  0.5 13452 5380 ?S12:09   0:00
>>> /usr/sbin/snmpd -Cc /etc/snmp/snmpd.conf
>>
>> This is the version that came with the RPM, and is looking
>> for /etc/snmp/snmpd.conf (only)
>>
>>
>> Decide which version you wish to run, stick with that, and
>> remove the other one.   You'll find it much less confusing
>> in the long run.
>>
>> Dave
>>
>
> --
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> ___
> 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 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: sysUpTime returns an error

2009-01-27 Thread Nikos Balkanas
sysUpTime is defined in 2 places: RFV1213-MIB and SNMPv2-MIB. 
DISMAN-EVENT-MIB has an instance of SNMPv2. The first one (RFC) is the 
official, the second one is depreciated, but still working.

Maybe the problem is with mteTriggerDeltaDiscontinuityID in DISMAN-EVENT-MIB 
(read).

BR,
Nikos
- Original Message - 
From: "Tanya Brudner" 
To: "Mike Ayers" ; "Nikos Balkanas" 
; 
Sent: Tuesday, January 27, 2009 5:42 PM
Subject: RE: sysUpTime returns an error



Hello all,

I thank you for your help and apologize for my (unforeseen) absence and
thus - belated response.

I ask to remind you that the issue in question is the error in sysUptime
(please see below). In short - all attempts to get its value failed
miserably.
The result for snmpget ... returns: "DISMAN-EVENT-MIB::sysUpTimeInstance
= No such Object available on this agent at this OID".

- I tried changing the conf. file as was suggested by Nikos, no luck.

- Snmpwalk skips it all together, returning just:
SNMPv2-MIB::sysDescr.0 = STRING: x
SNMPv2-MIB::sysObjectID.0 = OID: xx.x.x.x
SNMPv2-MIB::sysContact.0 = STRING: Tanya B.
SNMPv2-MIB::sysName.0 = STRING: xxx
SNMPv2-MIB::sysLocation.0 = STRING:
SNMPv2-MIB::sysServices.0 = INTEGER: 3

- The snmpgetnext on .1.3.6.1.2.1.1.3 (as Mike suggested) returned
sysContact data.

However, something has happened in my absence, which I'll appreciate
your input for:
In an attempt to solve the issue, someone here edited the
DISMAN-EVENT-MIB and removed all references to sysUpTime and changed the
DEFVAL for mteTriggerDeltaDiscontinuityID to 0 (zero).

Surprisingly enough - the problem was solved.

As I am new into the SNMP world, and that person just went "brut-force"
and changed it without understanding - I turn to you for explanation. :)

Thanks again,

-Tanya

-Original Message-
From: Mike Ayers [mailto:mike_ay...@tvworks.com]
Sent: Friday, January 02, 2009 06:32
To: Nikos Balkanas; Tanya Brudner; net-snmp-users@lists.sourceforge.net
Subject: RE: sysUpTime returns an error


> From: Nikos Balkanas [mailto:nbalka...@gmail.com]
> Sent: Thursday, January 01, 2009 2:18 PM

> Yes. You can see clearly the definition of sysUpTime in the
> snmpwalk output.
> You have no problems with MIBs. In fact using either MIBs for
> sysUpTime (RFC or DISMAN) will get you the same result, because they
are
> getting it from the same place:

Just to be clear, SNMPv2-MIB::sysUpTime and
DISMAN-EVENT-MIB::sysUpTimeInstance are the same OID.  The redefinition
of the OID by the disman group was a mistake.  There is no way for an
application to know, when converting that value to text, which of the
two names to use.  It seems that the net-snmp tools will always print
the disman value - do not worry, it is still sysUpTime.

The real item of concern is that your agent does not seem to
have a sysUptime value.  Let's try something - could you try a get-next
on .1.3.6.1.2.1.1.3 and then cut-n-paste command and output (with
security informastion obfuscated) to the list, please?


Thanks,

Mike

P.S.  Happy New Year

-Original Message-
>From: Nikos Balkanas [mailto:nbalka...@gmail.com]
> Sent: Thursday, January 01, 2009 2:18 PM
>Yes. You can see clearly the definition of sysUpTime in the snmpwalk
>output.
>You have no problems with MIBs. In fact using either MIBs for sysUpTime
>(RFC or DISMAN) will get you the same result, because they are getting
it >from the same place:

>mib-2->system->sysUpTime->sysUptimeInstance

>as you can see from the walk.

>I am sorry for keeping you this late.  This is my configuration
>(snmpd.conf) with passwords crossed out. Replace all xxx with your
>passwords. It works fine for me. Please back up yours, take mein and
>restart snmpd and test again.

BR,
Nikos

- Original Message -
From: "Tanya Brudner" 
To: "Nikos Balkanas" ;

Sent: Thursday, January 01, 2009 11:58 PM
Subject: RE: sysUpTime returns an error


Nikos,

The file - renamed.
The snmpd - restarted.
The snmpget returns the exact same error as before
("DISMAN-EVENT-MIB::sysUpTimeInstance = No such Object available on this
agent at this OID").
(If using the specific RFC1213-MIB reference, I get the same error text,
just for the correct mib ("RFC1213-MIB::sysUpTime.0..")

The snmptranslate worked properly this time - please see the attached
file.


Thanks again, very very much!

-Tanya


-Original Message-
From: Nikos Balkanas [mailto:nbalka...@gmail.com]
Sent: Thursday, January 01, 2009 23:29
To: Tanya Brudner; net-snmp-users@lists.sourceforge.net
Subject: Re: sysUpTime returns an error

Looks like your sysUptime is correctly set.
DISMAN-EVENT-MIB seems to have some issue.

Please:
mv /usr/local/share/snmp/mibs/DISMAN-EVENT-MIB.txt.1
/usr/local/share/snmp/mibs/DISMAN-EVENT-MIB.txt

restart snmpd.

snmpget 127.0.0.1 sysUpTime.0

If this doesn't wo

Re: How to know subagent successfully connects to master agent or not?

2009-01-26 Thread Nikos Balkanas
Try:

snmpd -f -Le -Dagentx

BR,
Nikos
  - Original Message - 
  From: Alexander Bubnov 
  To: net-snmp-users@lists.sourceforge.net 
  Sent: Monday, January 26, 2009 4:35 PM
  Subject: How to know subagent successfully connects to master agent or not?


  Hello!

  I am playing around with NET-SNMP library... and just what to know subj.


  My code looks like the tutorial one (see section TUT:Writing a Subagent, 
http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent):

  int main() {

  ...

   netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_ROLE, 
TRUE);
   netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_DONT_PERSIST_STATE, TRUE);
   netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, 
NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL, 100);


   netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_X_SOCKET, 
"udp:192.168.89.130:705");


   init_agent("event_example");
   init_snmp("event_example");

  ...

  return EXIT_SUCCESS;

  }


  inside call of init_snmp, subagent tries to connect to master agent. Here 
connection can be fail. 

  What right way to know about that fail?


  Thanks in advance!

  -- 
  /BR, Alexander



--


  --
  This SF.net email is sponsored by:
  SourcForge Community
  SourceForge wants to tell your story.
  http://p.sf.net/sfu/sf-spreadtheword


--


  ___
  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
--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
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: It's unlikely this agent can serve any useful purpose in this state /This receiver will *NOT* accept any incoming notifications

2009-01-22 Thread Nikos Balkanas
Hi,

You seem to have a few issues:

1) Error opening specified endpoint ""

Means that you already are running an snmpd instance and port is already in 
use. Therefore it won't start.

2) mkdir -p /usr/local/share/snmp/snmpconf-data
3) snmpconf -g basic_setup

BR,
Nikos
- Original Message - 
From: "Antonio Guerra" 
To: 
Sent: Thursday, January 22, 2009 8:06 PM
Subject: It's unlikely this agent can serve any useful purpose in this state 
/This receiver will *NOT* accept any incoming notifications


> Guys,
>
> I was wondering if one of you could provide some insight into this
> issue I'm having with snmp. I'm trying to make my redhat linux server
> a trap receiver to send out notifications for pages. Unfortunately
> there's not much information on the web in the sense of a step-by-step
> guide as far as installing and configuring snmp. In any case, I've
> looked high and low and east and west and still have not been able to
> make my snmp run. I've tried everything short of pulling my hair out.
>
> At first I tried downloading and installing the latest file from
> sourceforge but that didn't go well, so I later decided to install
> SNMP from the RPM package on the redhat update page:
> net-snmp-5.1.2-13.2.i386.rpm
>
> I later installed all the dependencies the installation asked for as 
> missing:
>
> net-snmp-libs-5.1.2-13.2
> elfutils-libelf-devel-0.97-5
> elfutils-devel-0.97-5
>
> The package installed all the necessary scripts on /etc/init.d:
> snmpd
> snmptrapd
>
> When I run a remote snmpget or snmpwalk, it works perfect. The problem
> is that I cannot process or receive traps. Any ideas as to what I
> might be missing or what I have misconfigured?
>
> Below you can find the configuration files as well as the debug
> outputs for my system:
>
> snmpd -v
>
> NET-SNMP version:  5.4.2.1
> Web:   http://www.net-snmp.org/
> Email: net-snmp-cod...@lists.sourceforge.net
>
>
> snmpd -f -Le -d:
>
> Warning: no access control information configured.
> It's unlikely this agent can serve any useful purpose in this state.
> Run "snmpconf -g basic_setup" to help you configure the snmpd.conf
> file for this agent.
> Error opening specified endpoint ""
> Server Exiting with code 1
>
> snmpconf -g basic_setup:
>
> no such directory /usr/local/share/snmp/snmpconf-data, did you run make 
> install?
>
> snmptrapd -f -Le -d:
>
> Warning: no access control information configured.
> This receiver will *NOT* accept any incoming notifications.
> NET-SNMP version 5.4.2.1
> couldn't open udp:162 -- errno 98 ("Address already in use")
>
> /var/log/snmptraps.log:
>
> /etc/snmp/snmptrapd.conf: line 4: Warning: Unknown token: authCommunity.
> 2009-01-22 12:16:45 NET-SNMP version 5.1.2 Started.
>
>
> "ps aux | egrep snmp*"
>
> root 31369  0.0  0.5 13452 5380 ?S12:09   0:00
> /usr/sbin/snmpd -Cc /etc/snmp/snmpd.conf
> root 31427  0.0  0.3 11128 3848 ?Ss   12:16   0:00
> /usr/sbin/snmptrapd -Lf /var/log/snmptraps.log -Cc
> /etc/snmp/snmptrapd.conf
>
> /etc/snmp/snmpd.conf:
>
> rocommunity public
> #rwcommunity private
> authtrapenable 1
> trapsink 16.80.4.195 public
> trapcommunity public
> rwuser AnuragB
>
>
> /etc/snmp/snmptrapd.conf:
>
> AuthCommunity log,execute,net public
> traphandle .1.3.6.1.4.1.6889 /usr/local/bin/traptoemail email
> traphandle .1.3.6.1.4.1.6889 /scripts/email.sh
> traphandle SNMPv2-SMI::enterprises.6889.1.8.1.51
> /usr/local/bin/traptoemail email
> traphandle SNMPv2-SMI::enterprises.3.1.1 /scripts/email.sh
>
> /etc/default/snmpd:
>
> export MIBDIRS=/usr/local/share/snmp/mibs
> SNMPDRUN=yes
> SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'
> TRAPDRUN=yes
> TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'
> SNMPDCOMPAT=yes
>
> --
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> ___
> 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 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: pthread with agentx ..... help please

2009-01-22 Thread Nikos Balkanas
Yes, forgot about that, too. But eventually it is your code and your 
responsibility how you call it.

BR,
Nikos
- Original Message - 
From: "Dave Shield" 
To: "Nikos Balkanas" 
Cc: "m.zeeshan" ; 

Sent: Thursday, January 22, 2009 4:47 PM
Subject: Re: pthread with agentx ..... help please


> 2009/1/22 Nikos Balkanas :
>> Choice is between threads and processes. Long debated issue. Threads are
>> lighter, faster, processes are more robust, reliable. Actual decision
>> depends also on OS used.
>
> But please remember that the Net-SNMP agent library is *NOT* thread-safe.
>
> Dave 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: pthread with agentx ..... help please

2009-01-22 Thread Nikos Balkanas
Hi,

I am using pthreads for a shared library agent. To debug it, I use an agentx 
wrapper. So, it works fine with pthreads.

You can also use mutiple subagents with he same master agent.

Choice is between threads and processes. Long debated issue. Threads are 
lighter, faster, processes are more robust, reliable. Actual decision 
depends also on OS used.

BR,
Nikos
- Original Message - 
From: "m.zeeshan" 
To: 
Sent: Thursday, January 22, 2009 3:43 PM
Subject: pthread with agentx . help please


> Dears,
>
> i am using agentx to implement customized MIBs, along with MIBs in my
> situation i do have another module to initialize within the agentx.c,
> this module listens on a UDP port, is for perhaps listening to
> customised notification from other agent or NEs.
>
> When i put them together, they did not worked, did debugged quite a bit,
> then used pthread for the purpose, can you please guide me for the
> following options:
>
> 1. will pthread work  or
> 2. may i create another agentx agent for that purpose.
>
> which of the solution is better and/or efficient if i want to keep the
> proceesing in single process space.
>
> please do help and comment on the situation.
>
> Regards,
>
> -zeeshan
> www.advancedims.com
>
>
> --
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> ___
> 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 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: Error out on snmpwalk command.

2009-01-22 Thread Nikos Balkanas
Hi,

1) Does it timeout always in the same MIB?
2) While hanging, can it process any other snmp commands? (can you do an 
snmpget at the same time?)
3) Do you get timeouts with other OIDs?
4) Increase logging. What is the last thing you see? Does it log throughout 
the problem?
5) If you leave it does it timeout? What does timeout say in the message?

You can try to reproduce through gdb. Interrupt the debugger and use "where" 
to see the top snmp function in the stack at the time. Continue. Interrupt 
again and check if anything has changed.

BR,
Nikos
- Original Message - 
From: "Dave Shield" 
To: "Paul Hogan" 
Cc: "Nikos Balkanas" ; 

Sent: Thursday, January 22, 2009 11:32 AM
Subject: Re: Error out on snmpwalk command.


> 2009/1/21 Paul Hogan :
>>  Interesting thing about it is, if I wait for a couple of minutes and try 
>> again it kicks out the first part
>> of the response again and then times out.  If I try it immediately after 
>> it times out right away.  Strange.
>
> That sounds like the situation described in
>http://www.net-snmp.org/wiki/index.php/FAQ:Applications_07
>
> Dave 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: libsensors.so.1 => not found

2009-01-20 Thread Nikos Balkanas
Try it first to see if it works, it only takes ~1'. It would be interesting 
to see in the configuration logs, where it picked up libsensors.so.1. If it 
doesn't work then add /usr/local/lib to your /etc/ldso.conf, make distclean, 
recompile and recheck ldd.

BR,
Nikos
- Original Message - 
From: "Mike Ayers" 
To: ; ; "Nikos 
Balkanas" 
Sent: Wednesday, January 21, 2009 1:16 AM
Subject: RE: libsensors.so.1 => not found



> From: PoWah Wong [mailto:wong_po...@yahoo.ca]
> Sent: Tuesday, January 20, 2009 3:04 PM

> I do not find libsensors.so.1 but find libsensors.so.3.
>
> # ls -l /usr/local/lib/libsensors.so*
> lrwxrwxrwx1 root root   19 Jan 20 15:26
> /usr/local/lib/libsensors.so.3 -> libsensors.so.3.0.4
> -rwxr-xr-x1 root root   143447 Jan 25  2007
> /usr/local/lib/libsensors.so.3.0.4
>
> I create a symbolic link.
> Is this a good solution?
> # ln -s /usr/local/lib/libsensors.so.3 /usr/local/lib/libsensors.so.1

I'm not certain, but I believe that is always a bad thing to do.  I believe 
that major versions of dynamic libraries are generally considered 
incompatible.  I would recommend re-compiling your net-snmp on that machine 
to pick up the new sensors library, but, again, I am not an expert on these 
things.


HTH,

Mike 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: libsensors.so.1 => not found

2009-01-20 Thread Nikos Balkanas
Hi,

Do a find / -name "libsensors.so.1" to see

1) if it exists
2) where it is located

Then just make sure that you add the path to /etc/ldso.conf.

BR,
Nikos
- Original Message - 
From: "PoWah Wong" 
To: 
Sent: Tuesday, January 20, 2009 10:08 PM
Subject: libsensors.so.1 => not found


>I had "libsensors.so.1 => not found" error for snmpd.
> The system had lm_sensors-2.8.6-1rh so
> how to make the snmpd depend on that?
>
> # ldd /usr/local/sbin/snmpd
>libnetsnmpmibs.so.9 => /usr/local/lib/libnetsnmpmibs.so.9 
> (0x40017000)
>libnetsnmpagent.so.9 => /usr/local/lib/libnetsnmpagent.so.9 
> (0x400be000)
>libnetsnmphelpers.so.9 => /usr/local/lib/libnetsnmphelpers.so.9 
> (0x400fa000)
>libnetsnmp.so.9 => /usr/local/lib/libnetsnmp.so.9 (0x40118000)
>libdl.so.2 => /lib/libdl.so.2 (0x401c5000)
>libm.so.6 => /lib/libm.so.6 (0x402c3000)
>libsensors.so.1 => not found
>libc.so.6 => /lib/libc.so.6 (0x402e5000)
>/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x4000)
>
> # ls -l /usr/local/lib/libsensors*
> lrwxrwxrwx1 root root   19 Jan 16 16:56 
> /usr/local/lib/libsensors.so.3 -> libsensors.so.3.0.4
> -rwxr-xr-x1 root root   143447 Jan 25  2007 
> /usr/local/lib/libsensors.so.3.0.4
>
> # rpm -ivh lm_sensors-2.5.5-6.i386.rpm
> Preparing...### 
> [100%]
> package lm_sensors-2.8.6-1rh (which is newer than lm_sensors-2.5.5-6) is 
> already installed
> file /etc/sensors.conf from install of lm_sensors-2.5.5-6 conflicts with 
> file from package lm_sensors-2.8.6-1rh
>
>
> OS is RH7.2.
>
>
>
>
>  __
> Looking for the perfect gift? Give the gift of Flickr!
>
> http://www.flickr.com/gift/
>
> --
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> ___
> 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 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: Error out on snmpwalk command.

2009-01-20 Thread Nikos Balkanas
Hi,

I get timeouts when a MIB is not implemented or missimplemented in the code. 
I have Solaris, so my HOST-RESOURCES are quite different. Does it happen 
with other trees as well? What do the logs say?

BR,
Nikos
- Original Message - 
From: "Paul Hogan" 
To: 
Sent: Tuesday, January 20, 2009 10:18 PM
Subject: Error out on snmpwalk command.


I am getting the following when I run and snmpwalk command on a HP UX 
Itanium system running 11.23.

/usr/local/bin/./snmpwalk -v 2c -c SPOT localhost .1.3.6.1.2.1.25.3.2
HOST-RESOURCES-MIB::hrDeviceIndex.768 = INTEGER: 768
HOST-RESOURCES-MIB::hrDeviceIndex.769 = INTEGER: 769
HOST-RESOURCES-MIB::hrDeviceIndex.770 = INTEGER: 770
HOST-RESOURCES-MIB::hrDeviceIndex.771 = INTEGER: 771
HOST-RESOURCES-MIB::hrDeviceIndex.772 = INTEGER: 772
HOST-RESOURCES-MIB::hrDeviceIndex.773 = INTEGER: 773
HOST-RESOURCES-MIB::hrDeviceIndex.774 = INTEGER: 774
HOST-RESOURCES-MIB::hrDeviceIndex.775 = INTEGER: 775
HOST-RESOURCES-MIB::hrDeviceIndex.1025 = INTEGER: 1025
HOST-RESOURCES-MIB::hrDeviceIndex.1026 = INTEGER: 1026
HOST-RESOURCES-MIB::hrDeviceIndex.1027 = INTEGER: 1027
HOST-RESOURCES-MIB::hrDeviceIndex.1028 = INTEGER: 1028
HOST-RESOURCES-MIB::hrDeviceIndex.1029 = INTEGER: 1029
HOST-RESOURCES-MIB::hrDeviceIndex.1030 = INTEGER: 1030
HOST-RESOURCES-MIB::hrDeviceIndex.1031 = INTEGER: 1031
HOST-RESOURCES-MIB::hrDeviceIndex.1032 = INTEGER: 1032
Timeout: No Response from localhost

It starts to respond then it fails.  Localhost resolves on the box.  Compile 
and install of agent 5.4.2.1 went in with no problem.  Any ideas on this?

Paul R. Hogan
Computer System Engineer
Enterprise Information Technology
HAWORTH, INC.

One Haworth Center
Holland, MI 49423

direct 616.393.3756
fax 616.396.9389

paul.ho...@haworth.com
www.haworth.com

NOTICE OF CONFIDENTIALITY: The contents of this e-mail message and any 
attachments are intended for the addressee(s) named in this message. This 
communication is intended to be and to remain confidential. If you are not 
the intended recipient of this message, or if this message has been 
addressed to you in error, please immediately alert the sender by reply 
e-mail and then delete this message and its attachments. Do not deliver, 
distribute or copy this message and/or any attachments and, if you are not 
the intended recipient, unless immediately and permanently deleted, 
recipient hereby agrees to protect this transmission and any documents, 
files or previous messages attached (confidential information) in the same 
manner in which recipient acts to protect his/her/its own confidential 
information.


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: net-snmp dlmod support

2009-01-20 Thread Nikos Balkanas
Hi,

What happens if you configure without the "with-ldflags" option? (make 
distclean first)

BR,
Nikos
- Original Message - 
From: "Ansa Ahammed" 
To: ; 

Sent: Tuesday, January 20, 2009 12:23 PM
Subject: net-snmp dlmod support


> Hi,
>
> I am using net-snmp-5.4 package for my application. I want to support
> dlmod for my Enterprise specific MIB files.
>
> i used the following options to configure the package:
>
> ./configure --with-cc=powerpc-linux-gcc --with-ld=powerpc-linux-gcc
> --with-ldflags="-lpthread" --with-ar=powerpc-linux-ar --host=powerpc
> --target=powerpc-linux-gnu --build=i686-pc-linux-gnu
> --with-endianness=big --prefix=/tmp/snmp/usr/local --enable-shared
> --with-defaults --with-PACKAGE=Net-SNMP
>
> When i buildthe package ,its not creating the .so files ..only static
> libraries are getting created ...
>
> (By default it will create shared objects it seemsBut that too is
> not working for me)
>
> Please give me the suggestions if i am doing anything wrong in the
> configure command...
>
>
> Thanks and Regards,
> Ansa
>
>
> --
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> ___
> 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 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: compile error when upgrading from 5.1.4.2 to 5.4.2.1 with gcc 2.96

2009-01-19 Thread Nikos Balkanas
Hi,

Please follow Mike's suggestions.

There is no issue with net-snmp compilation instructions. 5.4.2.1 builds 
fine. What you say is that an included file in 5.1.4.2 (no longer supported) 
is not part of the 5.4.2.1 distribution. That's perfectly legit. Although 
authors try to be as backwards compatible as possible, there is no guarantee 
that the sources will be the same between versions.

BR,
Nikos
- Original Message - 
From: "PoWah Wong" 
To: 
Sent: Tuesday, January 20, 2009 5:13 AM
Subject: Re: compile error when upgrading from 5.1.4.2 to 5.4.2.1 with gcc 
2.96


> --- On Mon, 1/19/09, Nikos Balkanas  wrote:
>
>> From: Nikos Balkanas 
>> Subject: Re: compile error when upgrading from 5.1.4.2 to 5.4.2.1 with 
>> gcc 2.96
>> To: wong_po...@yahoo.ca, net-snmp-users@lists.sourceforge.net
>> Received: Monday, January 19, 2009, 6:35 PM
>> Hi,
>>
>> This problem is not from compiling net-snmp, but from your
>> own code. If you are depending on net-snmp for the missing
>> include file "oamp_shm.h" it doesn't exist in
>> 5.4.2.1.
>>
>> BR,
>> Nikos
>
> The file "oamp_shm.h" is not missing, that is why net-snmp-5.1.4.2 
> compile.
> If I use the compile instructions generated by 5.1.4.2 to compile 5.2.5.1, 
> 5.3.2.3 or 5.4.2.1, then they all compile ok.
> The question is, in 5.4.2.1, how to generate the same compile instructions 
> generated by 5.1.4.2 (i.e. gcc -I../../include ...) ?
>
>
>  __
> Be smarter than spam. See how smart SpamGuard is at giving junk email the 
> boot with the All-new Yahoo! Mail.  Click on Options in Mail and switch to 
> New Mail today or register for free at http://mail.yahoo.ca
>
> --
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> ___
> 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 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: compile error when upgrading from 5.1.4.2 to 5.4.2.1 with gcc 2.96

2009-01-19 Thread Nikos Balkanas
I choose to avoid this, since the next thing i know i will be called to 
support the code itself! :-)

BR,
Nikos
- Original Message - 
From: "Mike Ayers" 
To: "Nikos Balkanas" ; ; 

Sent: Tuesday, January 20, 2009 1:44 AM
Subject: RE: compile error when upgrading from 5.1.4.2 to 5.4.2.1 with gcc 
2.96


> From: Nikos Balkanas [mailto:nbalka...@gmail.com]
> Sent: Monday, January 19, 2009 3:35 PM

> This problem is not from compiling net-snmp, but from your
> own code. If you
> are depending on net-snmp for the missing include file
> "oamp_shm.h" it
> doesn't exist in 5.4.2.1.

Aw, won't you throw our friend a bone and say whether the line should be 
deleted or changed?  Please?


Thanks,

Mike 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: compile error when upgrading from 5.1.4.2 to 5.4.2.1 with gcc 2.96

2009-01-19 Thread Nikos Balkanas
Hi,

This problem is not from compiling net-snmp, but from your own code. If you 
are depending on net-snmp for the missing include file "oamp_shm.h" it 
doesn't exist in 5.4.2.1.

BR,
Nikos
- Original Message - 
From: "PoWah Wong" 
To: 
Sent: Tuesday, January 20, 2009 12:14 AM
Subject: compile error when upgrading from 5.1.4.2 to 5.4.2.1 with gcc 2.96


> My snmp program can compile ok with net-snmp-5.1.4.2.
> I want to use the newer (upgrade to) net-snmp 5.2.5.1, 5.3.2.3 or  5.4.2.1 
> and all three versions have the same compile errors.
> $ gcc -v
> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
> gcc version 2.96 2731 (Red Hat Linux 7.1 2.96-98)
> I have to use this old gcc compiler because I still need to support the 
> old RedHat OS.
> I do not understand why
> How to fix the compile error?
>
> My 5.1.4.2 makefile is:
> all: clean
> tar -xzf net-snmp-5.1.4.2.tar.gz
> mkdir net-snmp-5.1.4.2/agent/mibgroup/mymibs
> cp mymibs/* net-snmp-5.1.4.2/agent/mibgroup/mymibs
> cd net-snmp-5.1.4.2 ;\
> rm -f config.cache
> cd net-snmp-5.1.4.2 ;\
> ./configure --with-libs=/usr/local/lib/libsensors.a --with-defaults 
> --with-openssl=/ 
>  --with-mib-modules="mymibs/chrysalisUtsp 
> ucd-snmp/lmSensors" --with-out-mib-modules="agent_mibs utilities"
> cd net-snmp-5.1.4.2 ;\
> make -f Makefile
>
> clean:
> rm -rf net-snmp-5.1.4.2
>
>
> My 5.4.2.1 makefile is:
> all: clean
> tar -xzf net-snmp-5.4.2.1.tar.gz
> mkdir net-snmp-5.4.2.1/agent/mibgroup/mymibs
> cp mymibs/* net-snmp-5.4.2.1/agent/mibgroup/mymibs
> cd net-snmp-5.4.2.1 ;\
> rm -f config.cache
> cd net-snmp-5.4.2.1 ;\
> ./configure --with-libs=/usr/local/lib/libsensors.a --with-defaults 
> --with-openssl=/ 
>  --with-mib-modules="mymibs/chrysalisUtsp 
> ucd-snmp/lmSensors" --with-out-mib-modules="agent_mibs utilities"
> cd net-snmp-5.4.2.1 ;\
> make -f Makefile
>
> clean:
> rm -rf net-snmp-5.4.2.1
>
>
>
> The working 5.1.4.2 compile output is:
> ...
> /bin/sh ../../libtool  --mode=compile 
> gcc -I../../include -I../../include -I. -I../.. -I. -I./../.. 
> -I./../../snmplib 
>  -I./.. -I..   -g -O2 -Dlinux  -c -o mymibs/myprod.lo mymibs/myprod.c
> mkdir mymibs/.libs
> gcc -I../../include -I../../include -I. -I../.. -I. -I./../.. 
> -I./../../snmplib 
>  -I./.. -I.. -g -O2 -Dlinux -c mymibs/myprod.c  -fPIC -DPIC -o 
> mymibs/.libs/myprod.lo
> gcc -I../../include -I../../include -I. -I../.. -I. -I./../.. 
> -I./../../snmplib 
>  -I./.. -I.. -g -O2 -Dlinux -c mymibs/myprod.c -o mymibs/myprod.o 
>  >/dev/null 2>&1
> mv -f mymibs/.libs/myprod.lo mymibs/myprod.lo
> /bin/sh ../../libtool  --mode=compile 
> gcc -I../../include -I../../include -I. -I../.. -I. -I./../.. 
> -I./../../snmplib 
>  -I./.. -I..   -g -O2 -Dlinux  -c -o ucd-snmp/lmSensors.lo 
> ucd-snmp/lmSensors.c
> mkdir ucd-snmp/.libs
> ...
>
> The failed 5.4.2.1 compile output is:
> ...
> /bin/sh ../../libtool  --mode=compile 
> gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib 
>-g -O2 -Dlinux=linux  -fno-strict-aliasing -I/usr/local/include 
> -D_LARGEFILE_SOURCE 
>  -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm  
> -I/usr/local/lib/perl5/5.8.3/i686-linux/CORE 
>-c -o mymibs/myprod.lo mymibs/myprod.c
> mkdir mymibs/.libs
> gcc -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib 
>  -g -O2 -Dlinux=linux -fno-strict-aliasing -I/usr/local/include 
> -D_LARGEFILE_SOURCE 
>  -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm 
> -I/usr/local/lib/perl5/5.8.3/i686-linux/CORE 
>  -c mymibs/myprod.c  -fPIC -DPIC -o mymibs/.libs/myprod.o
> mymibs/myprod.c:31:51: ../../../hwapi_dir/source/oamp_shm.h: No such file 
> or directory
> make[3]: *** [mymibs/myprod.lo] Error 1
>
>
>
>
>
>  __
> Connect with friends from any web browser - no download required. Try the 
> new Yahoo! Canada Messenger for the Web BETA at 
> http://ca.messenger.yahoo.com/webmessengerpromo.php
>
> --
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> ___
> 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 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: Table custom handlers

2009-01-15 Thread Nikos Balkanas
Thanx for the tip. 

Changed code to point to *table_info->indexes->val.integer

BR,
Nikos
- Original Message - 
From: "Dave Shield" 
To: "Nikos Balkanas" 
Cc: 
Sent: Thursday, January 15, 2009 10:25 AM
Subject: Re: Table custom handlers


> 2009/1/14 Nikos Balkanas :
>> That's great. I tried it and looks fine:
>>
>> Changed column = table_info->colnum
>> Changed row = *table_info->index_oid
> 
> 'index_oid' would work as well.
> And for an integer-indexes table, it probably doesn't make
> much difference, since it's just a single integer value anyway.
> 
> But in general - particularly for string- or multiple-indexed tables,
> you're better off using the 'table_info->indexes' field, where the
> index values have already been extracted for you.
> 
> Dave

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: Table custom handlers

2009-01-14 Thread Nikos Balkanas
Hi Dave,

That's great. I tried it and looks fine:

Changed column = table_info->colnum
Changed row = *table_info->index_oid

That really made my day,

Nikos
- Original Message - 
From: "Dave Shield" 
To: "Nikos Balkanas" 
Cc: "Wes Hardaker" ; 

Sent: Wednesday, January 14, 2009 5:15 PM
Subject: Re: Table custom handlers


> 2009/1/6 Nikos Balkanas :
>> I need to get the changed row index.
>
>
>for (request = requests; request; request = request->next) {
>table_info = netsnmp_extract_table_info(request);
>/*
> * table_info->colnum contains the column number requested
> */
>/*
> * table_info->indexes contains a linked list of snmp variable
> * bindings for the indexes of the table.  Values in the list have
> * been set corresponding to the indexes of the request
> */
>
>}
>
>
> Dave 


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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: net-snmp compile problem

2009-01-14 Thread Nikos Balkanas

Do you have the error messages in Greek? It would be easier to read :-)

BR,
Nikos
- Original Message - 
From: "spectrum" 

To: 
Sent: Wednesday, January 14, 2009 10:47 AM
Subject: net-snmp compile problem



Hello,
have a compile problem with Net-SNMP 5.4.2.1
./configure --enable-embedded-perl --enable-shared
proceed without any error.

make
...
gcc -I../include -I. -I../agent -I../agent/mibgroup -I../snmplib -g -O2 -Ulinux 
 -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -I/usr/local/include 
 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/lib/perl5/5.10.0/i386-linux-thread-multi/CORE 
 -c snmp_perl.c  -fPIC -DPIC -o .libs/snmp_perl.o

snmp_perl.c:1:20: error: EXTERN.h: ξΕΤ ΤΑΛΟΗΟ ΖΑΚΜΑ ΙΜΙ ΛΑΤΑΜΟΗΑ
In file included from snmp_perl.c:2:
/usr/lib/perl5/5.10.0/i386-linux-thread-multi/CORE/perl.h:948:21: error: 
embed.h: ξΕΤ ΤΑΛΟΗΟ ΖΑΚΜΑ ΙΜΙ ΛΑΤΑΜΟΗΑ
/usr/lib/perl5/5.10.0/i386-linux-thread-multi/CORE/perl.h:2382:19: error: 
handy.h: ξΕΤ ΤΑΛΟΗΟ ΖΑΚΜΑ ΙΜΙ ΛΑΤΑΜΟΗΑ
/usr/lib/perl5/5.10.0/i386-linux-thread-multi/CORE/perl.h:2560:24: error: 
unixish.h: ξΕΤ ΤΑΛΟΗΟ ΖΑΚΜΑ ΙΜΙ ΛΑΤΑΜΟΗΑ

...
...
In file included from ../include/net-snmp/utilities.h:54,
from ../include/net-snmp/net-snmp-includes.h:74,
from snmp_perl.c:5:
../include/net-snmp/library/container.h:455:32: error: macro "clear" 
passed 3 arguments, but takes just 0
../include/net-snmp/library/container.h:458:25: error: macro "clear" 
passed 3 arguments, but takes just 0

snmp_perl.c: χ ΖΥΞΛΓΙΙ  maybe_source_perl_startup':
snmp_perl.c:45: Π�ΕΔΥΠ�ΕΦΔΕΞΙΕ: Χ Π�ΙΣΧΑΙΧΑΞΙΙ ΓΕΜΟΕ Π�ΕΟΒ�ΑΪΥΕΤΣΡ Χ 
ΥΛΑΪΑΤΕΜΨ ΒΕΪ Π�ΙΧΕΔΕΞΙΡ ΤΙΠΑ

make[1]: *** [snmp_perl.lo] οΫΙΒΛΑ 1
make[1]: Leaving directory `/usr/src/net-snmp-5.4.2.1/agent'
make: *** [subdirs] οΫΙΒΛΑ 1



what's wrong?
thanks in advance.


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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




--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
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: Issues with snmpwalk and net-snmp 5.4.2.1 on HP UX.

2009-01-09 Thread Nikos Balkanas
I am surprised that your 32bit binary links to 64bit library and works. It 
shouldn't.

Let me see. Could you please post an ldd of your snmpd?

Thanks,
Nikos
- Original Message - 
From: "Paul Hogan" 
To: "Nikos Balkanas" ; "Mike Ayers" 
; 
Sent: Friday, January 09, 2009 9:59 PM
Subject: RE: Issues with snmpwalk and net-snmp 5.4.2.1 on HP UX.


OK,

File snmpwalk (good, one that works)
snmpwalk:   PA-RISC2.0 shared executable dynamically linked -not 
stripped

File snmpwalk (bad, one that doesn't work)
snmpwalk:   ELF-64 executable object file - PA-RISC 2.0 (LP64)

File /opt/iexpress/net-snmp/lib/libnetsnmp.sl.16
/opt/iexpress/net-snmp/lib/libnetsnmp.sl.16:ELF-64 shared object file - 
PA-RISC 2.0 (LP64)

It appears that when I try to run the 64bit version it fails (although the 
daemon starts up).  But when I try to run the 32 bit version it works. 
Should I try to compile using the 32 bit compiler?  I'm a little confused.

Paul R. Hogan
Computer System Engineer
Enterprise Information Technology
HAWORTH, INC.

One Haworth Center
Holland, MI 49423

direct 616.393.3756
fax 616.396.9389

paul.ho...@haworth.com
www.haworth.com

NOTICE OF CONFIDENTIALITY: The contents of this e-mail message and any 
attachments are intended for the addressee(s) named in this message. This 
communication is intended to be and to remain confidential. If you are not 
the intended recipient of this message, or if this message has been 
addressed to you in error, please immediately alert the sender by reply 
e-mail and then delete this message and its attachments. Do not deliver, 
distribute or copy this message and/or any attachments and, if you are not 
the intended recipient, unless immediately and permanently deleted, 
recipient hereby agrees to protect this transmission and any documents, 
files or previous messages attached (confidential information) in the same 
manner in which recipient acts to protect his/her/its own confidential 
information.


-----Original Message-
From: Nikos Balkanas [mailto:nbalka...@gmail.com]
Sent: Friday, January 09, 2009 2:12 PM
To: Paul Hogan; Mike Ayers; net-snmp-users@lists.sourceforge.net
Subject: Re: Issues with snmpwalk and net-snmp 5.4.2.1 on HP UX.

This is very strange output, indeed. In the second one you propably copied
wrong the left side. From what I see the first one (bad) links to 64bit
libraries. The second one links against 32bit libraries. Normally it should
give an error:

ELF 32 bad class

or vise versa. So I suspect that what you have are 2 different versions of
snmpwalk. One is 64 bits the other 32bits.
To verify that please type:

file snmpwalk (good)
file snmpwalk (bad)
file /opt/iexpress/net-snmp/lib/libnetsnmp.sl.16

and let's take it from there. My guess is that
/opt/iexpress/net-snmp/lib/libnetsnmp.sl.16 is 32bit. That's why it works
with the 32bit snmpwalk better. Please make clear which is the good and
which is the bad.

BR,
Nikos
- Original Message - 
From: "Paul Hogan" 
To: "Mike Ayers" ; "Nikos Balkanas"
; 
Sent: Friday, January 09, 2009 8:32 PM
Subject: RE: Issues with snmpwalk and net-snmp 5.4.2.1 on HP UX.


To your point I believe the issue lies with the different versions of
snmpwalk and the newer version 5.4.2.1.  From what I can tell now if I
compare the snmpwalk command that works with the one that does not here is
what I see:

It doesn't like this one.  Comes back with no response error.

holldb20|root:/opt/iexpress/net-snmp/bin # ldd snmpwalk
libnetsnmp.sl.16 => /opt/iexpress/net-snmp/lib/libnetsnmp.sl.16
libcrypto.sl.0 =>   /lib/pa20_64/libcrypto.sl.0
libgen.2 => /lib/pa20_64/libgen.2
libnm.sl => /lib/pa20_64/libnm.sl
libipv6.sl =>   /lib/pa20_64/libipv6.sl
libc.2 =>   /lib/pa20_64/libc.2
libcrypto.sl.0 =>   /lib/pa20_64/libcrypto.sl.0
libc.2 =>   /lib/pa20_64/libc.2
libgcc_s.sl =>
/opt/hp-gcc64-4.2.1/lib/gcc/hppa64-hp-hpux11.11/4.2.1/..
/../../libgcc_s.sl
libdl.1 =>  /lib/pa20_64/libdl.1
libc.2 =>   /lib/pa20_64/libc.2
libdl.1 =>  /usr/lib/pa20_64/libdl.1

It likes this version and runs correctly.

ldd snmpwalk
/usr/lib/libc.2 =>  /usr/lib/libc.2
/usr/lib/libdld.2 =>/usr/lib/libdld.2
/usr/lib/libc.2 =>  /usr/lib/libc.2
/usr/lib/libipv6.sl =>  /usr/lib/libipv6.sl
/usr/lib/libnm.sl =>/usr/lib/libnm.sl
/usr/lib/libelf.2 =>/usr/lib/libelf.2
/usr/lib/libgen.2 =>/usr/lib/libgen.2
/opt/iexpress/net-snmp/lib/libnetsnmp.sl.16 =>
/opt/iexpress/net-snmp/lib/libnetsnmp.sl.16
/usr/lib/libc.2 =>  /usr/lib/libc.2

Sooo, from what you are stating should I be adding /lib/pa20_64,
/opt/iexpress/net-snmp/lib/,
/opt/hp-gcc64-4.2.1/lib/gcc/hppa64-hp-hpux11.1

Re: Issues with snmpwalk and net-snmp 5.4.2.1 on HP UX.

2009-01-09 Thread Nikos Balkanas
This is very strange output, indeed. In the second one you propably copied 
wrong the left side. From what I see the first one (bad) links to 64bit 
libraries. The second one links against 32bit libraries. Normally it should 
give an error:

ELF 32 bad class

or vise versa. So I suspect that what you have are 2 different versions of 
snmpwalk. One is 64 bits the other 32bits.
To verify that please type:

file snmpwalk (good)
file snmpwalk (bad)
file /opt/iexpress/net-snmp/lib/libnetsnmp.sl.16

and let's take it from there. My guess is that 
/opt/iexpress/net-snmp/lib/libnetsnmp.sl.16 is 32bit. That's why it works 
with the 32bit snmpwalk better. Please make clear which is the good and 
which is the bad.

BR,
Nikos
- Original Message - 
From: "Paul Hogan" 
To: "Mike Ayers" ; "Nikos Balkanas" 
; 
Sent: Friday, January 09, 2009 8:32 PM
Subject: RE: Issues with snmpwalk and net-snmp 5.4.2.1 on HP UX.


To your point I believe the issue lies with the different versions of 
snmpwalk and the newer version 5.4.2.1.  From what I can tell now if I 
compare the snmpwalk command that works with the one that does not here is 
what I see:

It doesn't like this one.  Comes back with no response error.

holldb20|root:/opt/iexpress/net-snmp/bin # ldd snmpwalk
libnetsnmp.sl.16 => /opt/iexpress/net-snmp/lib/libnetsnmp.sl.16
libcrypto.sl.0 =>   /lib/pa20_64/libcrypto.sl.0
libgen.2 => /lib/pa20_64/libgen.2
libnm.sl => /lib/pa20_64/libnm.sl
libipv6.sl =>   /lib/pa20_64/libipv6.sl
libc.2 =>   /lib/pa20_64/libc.2
libcrypto.sl.0 =>   /lib/pa20_64/libcrypto.sl.0
libc.2 =>   /lib/pa20_64/libc.2
libgcc_s.sl => 
/opt/hp-gcc64-4.2.1/lib/gcc/hppa64-hp-hpux11.11/4.2.1/.. 
/../../libgcc_s.sl
libdl.1 =>  /lib/pa20_64/libdl.1
libc.2 =>   /lib/pa20_64/libc.2
libdl.1 =>  /usr/lib/pa20_64/libdl.1

It likes this version and runs correctly.

ldd snmpwalk
/usr/lib/libc.2 =>  /usr/lib/libc.2
/usr/lib/libdld.2 =>/usr/lib/libdld.2
/usr/lib/libc.2 =>  /usr/lib/libc.2
/usr/lib/libipv6.sl =>  /usr/lib/libipv6.sl
/usr/lib/libnm.sl =>/usr/lib/libnm.sl
/usr/lib/libelf.2 =>/usr/lib/libelf.2
/usr/lib/libgen.2 =>/usr/lib/libgen.2
/opt/iexpress/net-snmp/lib/libnetsnmp.sl.16 => 
/opt/iexpress/net-snmp/lib/libnetsnmp.sl.16
/usr/lib/libc.2 =>  /usr/lib/libc.2

Sooo, from what you are stating should I be adding /lib/pa20_64, 
/opt/iexpress/net-snmp/lib/, 
/opt/hp-gcc64-4.2.1/lib/gcc/hppa64-hp-hpux11.11/4.2.1/.. 
/../../ in order to get the appropriate version working?  There are no 
LD_LIBRARY_PATH variables set currently on the systems.  Hopefully this is 
the variable that you mean.

Paul R. Hogan
Computer System Engineer
Enterprise Information Technology
HAWORTH, INC.

One Haworth Center
Holland, MI 49423

direct 616.393.3756
fax 616.396.9389

paul.ho...@haworth.com
www.haworth.com

NOTICE OF CONFIDENTIALITY: The contents of this e-mail message and any 
attachments are intended for the addressee(s) named in this message. This 
communication is intended to be and to remain confidential. If you are not 
the intended recipient of this message, or if this message has been 
addressed to you in error, please immediately alert the sender by reply 
e-mail and then delete this message and its attachments. Do not deliver, 
distribute or copy this message and/or any attachments and, if you are not 
the intended recipient, unless immediately and permanently deleted, 
recipient hereby agrees to protect this transmission and any documents, 
files or previous messages attached (confidential information) in the same 
manner in which recipient acts to protect his/her/its own confidential 
information.

-Original Message-
From: Mike Ayers [mailto:mike_ay...@tvworks.com]
Sent: Thursday, January 08, 2009 8:02 PM
To: Paul Hogan; Nikos Balkanas; net-snmp-users@lists.sourceforge.net
Subject: RE: Issues with snmpwalk and net-snmp 5.4.2.1 on HP UX.

> From: Paul Hogan [mailto:paul.ho...@haworth.com]
> Sent: Thursday, January 08, 2009 7:10 AM

> Ahhh, yes.  The humor is good.  Thanks for that.  I wish I
> could explain why it doesn't work though...

Compare the paths in your build to those the system uses.  I'm guessing that 
$prefix/lib isn't in your library path (I forget which variable that is on 
HPUX - LIBPATH, maybe?), in which case you installed it to a place that 
won't be searched (you *did* `make install`, yes?).  This is why what you 
did worked, but it's still a dangerous thing to do - better to either update 
your search paths or use the various configure flags which allow you to 
specify which directories to install to so that you're using the same 
version everywhere.


HTH,

Re: Problem while running snmpwalk command

2009-01-09 Thread Nikos Balkanas
Hmmm... This seems a rather frequent issue in the group. Maybe a FAQ would be 
useful.

Type:

ldd $(which snmpwalk)

You should find some libraries missing. Make sure that you have them and add 
the path in either LD_LIBRARY_PATH (Solaris) or /etc/ld.so.conf (Linux).

BR,
Nikos
  - Original Message - 
  From: saurabh jain 
  To: net-snmp-users@lists.sourceforge.net 
  Sent: Friday, January 09, 2009 2:21 PM
  Subject: Problem while running snmpwalk command


  Dear Users 

  I have installed net-snmp-5.4.2.1. on my i386 machine using its sources code 
net-snmp-5.4.2.1.tar.gz . in /usr/src directory .



  I have used following command to do this:



  root@:/usr/src/net-snmp-5.4.2.1#  ./ configure  --with -perl -module

  root@:/usr/src/net-snmp-5.4.2.1#make 

  root@:/usr/src/net-snmp-5.4.2.1#make install 

  through which I am able to install snmp successfully on my PC.



  After this when I gave following command I got error message as shown below : 


  root@:/# snmpwalk -v1 -c public localhost
  snmpwalk: error while loading shared libraries: libnetsnmp.so.15: cannot open 
shared object file: No such file or directory


  Kindly help me how can I solve  this problem .

  Thanks and Regards 

  SAURABH   JAIN 





--


  --
  Check out the new SourceForge.net Marketplace.
  It is the best place to buy or sell services for
  just about anything Open Source.
  http://p.sf.net/sfu/Xq1LFB


--


  ___
  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
--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB___
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: Issues with snmpwalk and net-snmp 5.4.2.1 on HP UX.

2009-01-08 Thread Nikos Balkanas
Pitty! We would have corrected it in a while, with less effort and would have 
found out what was wrong with it. And you would end up with a cleaner system. 

Can you break it again?

Just kidding :-)

Nikos
  - Original Message - 
  From: Paul Hogan 
  To: Paul Hogan ; Nikos Balkanas ; net-snmp-users@lists.sourceforge.net 
  Sent: Thursday, January 08, 2009 4:23 PM
  Subject: RE: Issues with snmpwalk and net-snmp 5.4.2.1 on HP UX.


  Ok.  So I am a little shocked, but not completely.  I had to do some strange 
things, but now it is working.  I reinstalled the 5.4.1.2 version of net-snmp 
that comes from HP’s software depot.  This version fails on compile, because it 
doesn’t have all of the library files.  Then I restarted the 5.4.2.1 version 
that I downloaded and compiled on this box and now it works.  It is like the HP 
.depot install sets up some of the path and common files needed and then the 
5.4.2.1 version compiles correctly and runs once the other version is 
installed.  Not the cleanest thing, but it is working now.  Anyone else run 
into this before?

   

  Paul R. Hogan

  Computer System Engineer

  Enterprise Information Technology

  HAWORTH, INC.

   

  One Haworth Center

  Holland, MI 49423

   

  direct616.393.3756

  fax   616.396.9389

   

  paul.ho...@haworth.com

  www.haworth.com

   

  NOTICE OF CONFIDENTIALITY:  The contents of this e-mail message and any 
attachments are intended for the addressee(s) named in this message.  This 
communication is intended to be and to remain confidential.  If you are not the 
intended recipient of this message, or if this message has been addressed to 
you in error, please immediately alert the sender by reply e-mail and then 
delete this message and its attachments.  Do not deliver, distribute or copy 
this message and/or any attachments and, if you are not the intended recipient, 
unless immediately and permanently deleted, recipient hereby agrees to protect 
this transmission and any documents, files or previous messages attached 
(confidential information) in the same manner in which recipient acts to 
protect his/her/its own confidential information.

   

  From: Paul Hogan 
  Sent: Thursday, January 08, 2009 8:52 AM
  To: 'Nikos Balkanas'; net-snmp-users@lists.sourceforge.net
  Subject: RE: Issues with snmpwalk and net-snmp 5.4.2.1 on HP UX.

   

  When I run the ldd snmpwalk command the following output is given:

   

  ldd snmpwalk

  libnetsnmp.sl.16 => /opt/iexpress/net-snmp/lib/libnetsnmp.sl.16

  libcrypto.sl.0 =>   /lib/pa20_64/libcrypto.sl.0

  libgen.2 => /lib/pa20_64/libgen.2

  libnm.sl => /lib/pa20_64/libnm.sl

  libipv6.sl =>   /lib/pa20_64/libipv6.sl

  libc.2 =>   /lib/pa20_64/libc.2

  libcrypto.sl.0 =>   /lib/pa20_64/libcrypto.sl.0

  libc.2 =>   /lib/pa20_64/libc.2

  libgcc_s.sl =>  
/opt/hp-gcc64-4.2.1/lib/gcc/hppa64-hp-hpux11.11/4.2.1/../../../libgcc_s.sl

  libdl.1 =>  /lib/pa20_64/libdl.1

  libc.2 =>   /lib/pa20_64/libc.2

  libdl.1 =>  /usr/lib/pa20_64/libdl.1

   

  following commands show the daemon running:

   

  ps -ef |grep -i snmp

  root 25650 1  0  Jan  6  ? 0:47 
/opt/iexpress/net-snmp/sbin/snmpd -c /opt/iexpress/net-snmp/etc/snmp/snmpd.conf

   

  snmpd.conf file contains

   

  rocommunity public

   

  running snmpwalk command give following output:

   

  snmpwalk -v 1 –c public localhost .1.3.6.1.2.1.25.3.2  

   

  *public is changed to my own SNMP string in the snmpd.conf and on this line.

   

  Timeout: No Response from localhost

   

  Version of OS

   

  uname -a

  HP-UX hollap23 B.11.23 U 9000/800 2629134796 unlimited-user license

   

  Any thoughts?

   

   

   

  Paul R. Hogan

  Computer System Engineer

  Enterprise Information Technology

  HAWORTH, INC.

   

  One Haworth Center

  Holland, MI 49423

   

  direct616.393.3756

  fax   616.396.9389

   

  paul.ho...@haworth.com

  www.haworth.com

   

  NOTICE OF CONFIDENTIALITY:  The contents of this e-mail message and any 
attachments are intended for the addressee(s) named in this message.  This 
communication is intended to be and to remain confidential.  If you are not the 
intended recipient of this message, or if this message has been addressed to 
you in error, please immediately alert the sender by reply e-mail and then 
delete this message and its attachments.  Do not deliver, distribute or copy 
this message and/or any attachments and, if you are not the intended recipient, 
unless immediately and permanently deleted, recipient hereby agrees to protect 
this transmission and any documents, files or previous messages attached 
(confidential information) in the same manner in which recipient acts to 
protect his/her/its own confidential information.

   

  From: Nikos

Re: Issues with snmpwalk and net-snmp 5.4.2.1 on HP UX.

2009-01-08 Thread Nikos Balkanas
snmpwalk looks fine. Do the other snmp* commands (get,table,set) work? 
You seem to have a network problem.

Could you please post output from:

netstat -a | grep snmpd 
netstat -a | grep 161 (if the first one doesn't work)

ping localhost (1 ping is enough)

BR,
Nikos
- Original Message - 
  From: Paul Hogan 
  To: Nikos Balkanas ; net-snmp-users@lists.sourceforge.net 
  Sent: Thursday, January 08, 2009 3:51 PM
  Subject: RE: Issues with snmpwalk and net-snmp 5.4.2.1 on HP UX.


  When I run the ldd snmpwalk command the following output is given:

   

  ldd snmpwalk

  libnetsnmp.sl.16 => /opt/iexpress/net-snmp/lib/libnetsnmp.sl.16

  libcrypto.sl.0 =>   /lib/pa20_64/libcrypto.sl.0

  libgen.2 => /lib/pa20_64/libgen.2

  libnm.sl => /lib/pa20_64/libnm.sl

  libipv6.sl =>   /lib/pa20_64/libipv6.sl

  libc.2 =>   /lib/pa20_64/libc.2

  libcrypto.sl.0 =>   /lib/pa20_64/libcrypto.sl.0

  libc.2 =>   /lib/pa20_64/libc.2

  libgcc_s.sl =>  
/opt/hp-gcc64-4.2.1/lib/gcc/hppa64-hp-hpux11.11/4.2.1/../../../libgcc_s.sl

  libdl.1 =>  /lib/pa20_64/libdl.1

  libc.2 =>   /lib/pa20_64/libc.2

  libdl.1 =>  /usr/lib/pa20_64/libdl.1

   

  following commands show the daemon running:

   

  ps -ef |grep -i snmp

  root 25650 1  0  Jan  6  ? 0:47 
/opt/iexpress/net-snmp/sbin/snmpd -c /opt/iexpress/net-snmp/etc/snmp/snmpd.conf

   

  snmpd.conf file contains

   

  rocommunity public

   

  running snmpwalk command give following output:

   

  snmpwalk -v 1 –c public localhost .1.3.6.1.2.1.25.3.2  

   

  *public is changed to my own SNMP string in the snmpd.conf and on this line.

   

  Timeout: No Response from localhost

   

  Version of OS

   

  uname -a

  HP-UX hollap23 B.11.23 U 9000/800 2629134796 unlimited-user license

   

  Any thoughts?

   

   

   

  Paul R. Hogan

  Computer System Engineer

  Enterprise Information Technology

  HAWORTH, INC.

   

  One Haworth Center

  Holland, MI 49423

   

  direct616.393.3756

  fax   616.396.9389

   

  paul.ho...@haworth.com

  www.haworth.com

   

  NOTICE OF CONFIDENTIALITY:  The contents of this e-mail message and any 
attachments are intended for the addressee(s) named in this message.  This 
communication is intended to be and to remain confidential.  If you are not the 
intended recipient of this message, or if this message has been addressed to 
you in error, please immediately alert the sender by reply e-mail and then 
delete this message and its attachments.  Do not deliver, distribute or copy 
this message and/or any attachments and, if you are not the intended recipient, 
unless immediately and permanently deleted, recipient hereby agrees to protect 
this transmission and any documents, files or previous messages attached 
(confidential information) in the same manner in which recipient acts to 
protect his/her/its own confidential information.

   

  From: Nikos Balkanas [mailto:nbalka...@gmail.com] 
  Sent: Wednesday, January 07, 2009 5:42 PM
  To: Paul Hogan; net-snmp-users@lists.sourceforge.net
  Subject: Re: Issues with snmpwalk and net-snmp 5.4.2.1 on HP UX.

   

  What is your default snmp agent?

   

  Do an

   

  ldd snmpwalk

   

  I suspect that you are not linking to right libraries and your snmpwalk is 
malfunctioning.

   

  If that fails try:

   

  snmpd -f -L (-Dall)? - if you are filling lucky.

   

  and use snmpwalk.

   

  Does any snmp* command work?

   

  BR,

  Nikos

- Original Message - 

From: Paul Hogan 

To: net-snmp-users@lists.sourceforge.net 

Sent: Wednesday, January 07, 2009 11:04 PM

Subject: Issues with snmpwalk and net-snmp 5.4.2.1 on HP UX.

 

I have successfully compiled and installed this version of net-snmp on 2 
different HP UX boxes.  Both are running version 11.23 OS.  I can get the 
daemon to start and remain running, but when I try to run and snmpwalk command 
it returns with a generic: Timeout: No response error.  I have turned off the 
default snmp agent, and I have double checked that the snmpd.conf file is 
correctly configured.  I also turned on logging for the snmpd daemon, but there 
are no errors reported.  What else should I check in order to get this working? 
 Any ideas what could be wrong?

 

Paul R. Hogan

Computer System Engineer

Enterprise Information Technology

HAWORTH, INC.

 

One Haworth Center

Holland, MI 49423

 

direct616.393.3756

fax   616.396.9389

 

paul.ho...@haworth.com

www.haworth.com

 

NOTICE OF CONFIDENTIALITY:  The contents of this e-mail message and any 
attachments are intended for the addressee(s) named in this message.  This 
communication is intended to be and to remain confidential.  If you are not the 
intended reci

Re: Issues with snmpwalk and net-snmp 5.4.2.1 on HP UX.

2009-01-07 Thread Nikos Balkanas
What is your default snmp agent?

Do an

ldd snmpwalk

I suspect that you are not linking to right libraries and your snmpwalk is 
malfunctioning.

If that fails try:

snmpd -f -L (-Dall)? - if you are filling lucky.

and use snmpwalk.

Does any snmp* command work?

BR,
Nikos
  - Original Message - 
  From: Paul Hogan 
  To: net-snmp-users@lists.sourceforge.net 
  Sent: Wednesday, January 07, 2009 11:04 PM
  Subject: Issues with snmpwalk and net-snmp 5.4.2.1 on HP UX.


  I have successfully compiled and installed this version of net-snmp on 2 
different HP UX boxes.  Both are running version 11.23 OS.  I can get the 
daemon to start and remain running, but when I try to run and snmpwalk command 
it returns with a generic: Timeout: No response error.  I have turned off the 
default snmp agent, and I have double checked that the snmpd.conf file is 
correctly configured.  I also turned on logging for the snmpd daemon, but there 
are no errors reported.  What else should I check in order to get this working? 
 Any ideas what could be wrong?

   

  Paul R. Hogan

  Computer System Engineer

  Enterprise Information Technology

  HAWORTH, INC.

   

  One Haworth Center

  Holland, MI 49423

   

  direct616.393.3756

  fax   616.396.9389

   

  paul.ho...@haworth.com

  www.haworth.com

   

  NOTICE OF CONFIDENTIALITY:  The contents of this e-mail message and any 
attachments are intended for the addressee(s) named in this message.  This 
communication is intended to be and to remain confidential.  If you are not the 
intended recipient of this message, or if this message has been addressed to 
you in error, please immediately alert the sender by reply e-mail and then 
delete this message and its attachments.  Do not deliver, distribute or copy 
this message and/or any attachments and, if you are not the intended recipient, 
unless immediately and permanently deleted, recipient hereby agrees to protect 
this transmission and any documents, files or previous messages attached 
(confidential information) in the same manner in which recipient acts to 
protect his/her/its own confidential information.

   



--


  --
  Check out the new SourceForge.net Marketplace.
  It is the best place to buy or sell services for
  just about anything Open Source.
  http://p.sf.net/sfu/Xq1LFB


--


  ___
  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
--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB___
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: Shared Library Problem....

2009-01-07 Thread Nikos Balkanas
Yes, that should be it. I am riding Solaris for the past year or so, and since 
there is no ld.so.conf or ldconfig here, I've forgotten all these...

BR,
Nikos
  - Original Message - 
  From: Patrick J Kobly 
  To: Nikos Balkanas 
  Cc: maksud ; net-snmp-users@lists.sourceforge.net 
  Sent: Wednesday, January 07, 2009 9:41 PM
  Subject: Re: Shared Library Problem


  I suspect he was saying that he added /usr/local/lib to /etc/ld.so.conf.  
This is (one of) the correct way(s) to do this.

  /usr/local/lib is not a trusted library path for the dynamic linker/loader 
(at least in Fedora).  Adding it to ld.so.conf forces the linker/loader to 
consider the libraries in /usr/local/lib before /usr/lib and /lib

  PK

  Nikos Balkanas wrote: 
Glad could help. However I think it would be better to modify your 
LD_LIBRARY_PATH. Putting libraries in /etc (if I read you correctly) is not 
recommended in Unix. Furthermore /usr/local/lib is a very important path and 
you will need it again.

BR,
Nikos
  - Original Message - 
  From: maksud 
  To: Nikos Balkanas 
  Cc: net-snmp-users@lists.sourceforge.net 
  Sent: Wednesday, January 07, 2009 6:23 PM
  Subject: Re: Shared Library Problem


  Thanks. You had let me to the solution. However I did not modify the 
LD_LIBRARY_PATH. My fedora distro had a preinstalled net-snmp libraries. I just 
added /usr/local/lib in /etc/.. some folder. and run ldconfig to refresh the 
cache. Now it is running without any problem. 


  Thanks 
  Maksud


  -- 



  Patrick Kobly, CISSP



  T: 403-274-9033

  C: 403-463-6141

  F: 866-786-9459

  56 388 Sandarac Dr NW
  Calgary, Alberta
  T3K 4E3
  http://www.kobly.com
  
  


<>--
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB___
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: Shared Library Problem....

2009-01-07 Thread Nikos Balkanas
Glad could help. However I think it would be better to modify your 
LD_LIBRARY_PATH. Putting libraries in /etc (if I read you correctly) is not 
recommended in Unix. Furthermore /usr/local/lib is a very important path and 
you will need it again.

BR,
Nikos
  - Original Message - 
  From: maksud 
  To: Nikos Balkanas 
  Cc: net-snmp-users@lists.sourceforge.net 
  Sent: Wednesday, January 07, 2009 6:23 PM
  Subject: Re: Shared Library Problem


  Thanks. You had let me to the solution. However I did not modify the 
LD_LIBRARY_PATH. My fedora distro had a preinstalled net-snmp libraries. I just 
added /usr/local/lib in /etc/.. some folder. and run ldconfig to refresh the 
cache. Now it is running without any problem.


  Thanks
  Maksud




  On Tue, Jan 6, 2009 at 5:33 PM, Nikos Balkanas  wrote:

Hi,

Fortunately this is an easy to fix problem (more or less).

First do:

1) ldd my_snmp_agent

This will tell you of the default libraries used. What's for any missing 
ones or wrong type.

2) Correct your LD_LIBRARY_PATH. Try a new ldd with the corrected path.

3) If (2) fails, you will need to recompile your agent with the correct 
LD_LIBRARY_PATH, and repeat ldd with the correct environment.

BR,
Nikos

  - Original Message - 
  From: maksud 
  To: net-snmp-users@lists.sourceforge.net 
  Sent: Tuesday, January 06, 2009 7:16 AM
  Subject: Shared Library Problem


  Hi,
  This is rather a peculiar problem. I had installed NetSNMP 5.3.1 without 
any problem in my Fedora Core 8 distribution and used it. I had implemented 
many tables using mib2c -c mib2c.mfd.conf files. So far no problem.

  But, in the past two days I couldn't install it on my other PC's which 
also features Fedora Core 8.
  First I get the following errors when I install 5.4.1


[r...@localhost SNMPAgent]# ./my_snmp_agent -f 
netsnmp_assert !"registration != duplicate" failed agent_registry.c:535 
netsnmp_subtree_load()
netsnmp_assert !"registration != duplicate" failed agent_registry.c:535 
netsnmp_subtree_load()
netsnmp_assert !"registration != duplicate" failed agent_registry.c:535 
netsnmp_subtree_load()
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-TYPES): At line 0 in (none)
Cannot find module (UCD-DISKIO-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (MTA-MIB): At line 0 in (none)
Cannot find module (NETWORK-SERVICES-MIB): At line 0 in (none)
Cannot find module (LM-SENSORS-MIB): At line 0 in (none)
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-SCHEDULE-MIB): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (IPV6-ICMP-MIB): At line 0 in (none)
Cannot find module (IPV6-MIB): At line 0 in (none)
Cannot find module (IPV6-TCP-MIB): At line 0 in (none)
Cannot find module (IPV6-UDP-MIB): At line 0 in (none)
Cannot find module (IP-FORWARD-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-EXTEND-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
Cannot find module (NET-SNMP-VACM-MIB): At line 0 in (none)
Warning: Failed to connect to the agentx master agent ([NIL]): 
Successfully created container
In Container Load...


  Then I uninstalled the version and installed 5.3.1 instead. At the 
beginning it was working well. But now it stopped working and I get 


[r...@localhost ~]# cd workspace/SNMP_Agent/
[r...@localhost SNMP_Agent]# ./my_snmp_agent -f
./my_snmp_agent: error while loading shared libraries: 
libnetsnmpagent.so.10: cannot open 

Re: Cannot seem to get the notification sinks table compiled in

2009-01-06 Thread Nikos Balkanas
You can get the header object identifion for each MIB file and snmpwalk them 
:-)

- Original Message - 
From: "Shachar Shemesh" 
To: "Nikos Balkanas" 
Cc: 
Sent: Tuesday, January 06, 2009 10:07 AM
Subject: Re: Cannot seem to get the notification sinks table compiled in


> Nikos Balkanas wrote:
>> Hi,
>>
>> Do you have it in the default_mibs_install in your config.log?
>>
> It would appear the answer is "no". My config.log has:
> default_mibs_install=' SNMPv2-MIB.txt RFC1213-MIB.txt 
> SNMP-VIEW-BASED-ACM-MIB.txt SNMP-COMMUNITY-MIB.txt SNMP-FRAMEWORK-MIB.txt 
> SNMP-MPD-MIB.txt SNMP-USER-BASED-SM-MIB.txt SNMP-USER-BASED-SM-MIB.txt'
>
> The main question is why. Also, it was my understanding that MIBs are not 
> even required in order to run an agent. Why does the list of MIBs matter?
>> Just a wild guess. Do you have all prerequisite mibs compiled in?
>>
>> SNMPv2-SMI
>> SNMPv2-TC
>> SNMP-FRAMEWORK-MIB
>> SNMP-TARGET-MIB
>> SNMPv2-CONF
>>
> How do I check that? At first it complained about "Target" not being 
> available, so I added it (removed it from the --with-out-mibs list), and 
> it doesn't complain any more.
>
> Thanks,
> Shachar 


--
___
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: Retrieving Bit-Field/Hex-String with Perl

2009-01-06 Thread Nikos Balkanas
Sorry for budding in...

Actually, according to the link that Mike posted, you should altogether 
uninstall Net::SNMP, as it will clash with the snmp/net-snmp perl module. 
Please read on the link on how to get the right perl module...

BR,
Nikos
- Original Message - 
From: "Peter Daum" 
To: 
Sent: Tuesday, January 06, 2009 10:04 AM
Subject: Re: Retrieving Bit-Field/Hex-String with Perl


> Hi,
>
> Mike Ayers wrote:
>>> From: Peter Daum [mailto:gator...@yahoo.de]
>>> Sent: Saturday, January 03, 2009 3:22 AM
>>
>>> I am trying to retrieve a bit field containing the error
>>> status of a printer.
>>>
>>> With the command line snmpget program, this works:
>>>
>>> # snmpget -v1 -cpublic printer .1.3.6.1.2.1.25.3.5.1.2.1
>>> HOST-RESOURCES-MIB::hrPrinterDetectedErrorState.1 = Hex-STRING: 00
>>>
>>> With the Net::SNMP module, I can also retrieve the value;
>>>
>>> When I do the same with Net-SNMP, I always get an empty string,
>>> regardless of the actual value:
>>>
>>> my $session = new SNMP::Session(
>>>  DestHost => $host, Version => 1, Community => 'public');
>>> my $result = $session->get($oid));
>>>
>>> Other attributes with "normal" string values are no problem.
>>> Is there anything special I have to do to retrieve binary values?
>>
>> You could try using the net-snmp perl module...
>>
>> http://www.net-snmp.org/wiki/index.php/Which_Perl_module_should_I_use
>
> Did you mean "Net::SNMP"?
>
> I did (see above). I have the impression, that Net-SNMP could have
> some advantages (if it worked ;) but since I can't solve this issue
> (and it seems like nobody else knows what's going on and is willing to
> share the knowledge), at the momement that's just what I do ...
>
> Regards,
>Peter
>
>
> --
> ___
> 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 


--
___
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: Shared Library Problem....

2009-01-06 Thread Nikos Balkanas
Hi,

Fortunately this is an easy to fix problem (more or less).

First do:

1) ldd my_snmp_agent

This will tell you of the default libraries used. What's for any missing ones 
or wrong type.

2) Correct your LD_LIBRARY_PATH. Try a new ldd with the corrected path.

3) If (2) fails, you will need to recompile your agent with the correct 
LD_LIBRARY_PATH, and repeat ldd with the correct environment.

BR,
Nikos

  - Original Message - 
  From: maksud 
  To: net-snmp-users@lists.sourceforge.net 
  Sent: Tuesday, January 06, 2009 7:16 AM
  Subject: Shared Library Problem


  Hi,
  This is rather a peculiar problem. I had installed NetSNMP 5.3.1 without any 
problem in my Fedora Core 8 distribution and used it. I had implemented many 
tables using mib2c -c mib2c.mfd.conf files. So far no problem.

  But, in the past two days I couldn't install it on my other PC's which also 
features Fedora Core 8.
  First I get the following errors when I install 5.4.1


[r...@localhost SNMPAgent]# ./my_snmp_agent -f 
netsnmp_assert !"registration != duplicate" failed agent_registry.c:535 
netsnmp_subtree_load()
netsnmp_assert !"registration != duplicate" failed agent_registry.c:535 
netsnmp_subtree_load()
netsnmp_assert !"registration != duplicate" failed agent_registry.c:535 
netsnmp_subtree_load()
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-TYPES): At line 0 in (none)
Cannot find module (UCD-DISKIO-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line 0 in (none)
Cannot find module (UDP-MIB): At line 0 in (none)
Cannot find module (MTA-MIB): At line 0 in (none)
Cannot find module (NETWORK-SERVICES-MIB): At line 0 in (none)
Cannot find module (LM-SENSORS-MIB): At line 0 in (none)
Cannot find module (IP-MIB): At line 0 in (none)
Cannot find module (IF-MIB): At line 0 in (none)
Cannot find module (SNMPv2-MIB): At line 0 in (none)
Cannot find module (SNMPv2-SMI): At line 0 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none)
Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none)
Cannot find module (DISMAN-SCHEDULE-MIB): At line 0 in (none)
Cannot find module (UCD-SNMP-MIB): At line 0 in (none)
Cannot find module (UCD-DEMO-MIB): At line 0 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 0 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 0 in (none)
Cannot find module (SNMP-MPD-MIB): At line 0 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 0 in (none)
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 0 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 0 in (none)
Cannot find module (IPV6-ICMP-MIB): At line 0 in (none)
Cannot find module (IPV6-MIB): At line 0 in (none)
Cannot find module (IPV6-TCP-MIB): At line 0 in (none)
Cannot find module (IPV6-UDP-MIB): At line 0 in (none)
Cannot find module (IP-FORWARD-MIB): At line 0 in (none)
Cannot find module (NET-SNMP-EXTEND-MIB): At line 0 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 0 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 0 in (none)
Cannot find module (SNMPv2-TM): At line 0 in (none)
Cannot find module (NET-SNMP-VACM-MIB): At line 0 in (none)
Warning: Failed to connect to the agentx master agent ([NIL]): 
Successfully created container
In Container Load...


  Then I uninstalled the version and installed 5.3.1 instead. At the beginning 
it was working well. But now it stopped working and I get 


[r...@localhost ~]# cd workspace/SNMP_Agent/
[r...@localhost SNMP_Agent]# ./my_snmp_agent -f
./my_snmp_agent: error while loading shared libraries: 
libnetsnmpagent.so.10: cannot open shared object file: No such file or directory
[r...@localhost SNMP_Agent]# 


  That is I can not start my subagent. I can run the agent snmpd and could see 
the valuse of ifTable and get proper result. But I just can not start my 
subagent. It compiles well but can't start.

  I have seen the librarys in /usr/local/lib but I can't understant why they 
are not loaded.

  Hope you could help me with the problem.

  Maksud



--


  --



--


  ___
  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
--
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
P

Re: Cannot seem to get the notification sinks table compiled in

2009-01-05 Thread Nikos Balkanas
Hi,

Do you have it in the default_mibs_install in your config.log?

Just a wild guess. Do you have all prerequisite mibs compiled in?

SNMPv2-SMI
SNMPv2-TC
SNMP-FRAMEWORK-MIB
SNMP-TARGET-MIB
SNMPv2-CONF

BR,
Nikos

- Original Message - 
From: "Shachar Shemesh" 
To: 
Sent: Monday, January 05, 2009 4:36 PM
Subject: Cannot seem to get the notification sinks table compiled in


> Hi all,
>
> I'm doing a cross-compile for an embedded system. I use the following
> command line to compile net-snmp:
> ../configure --build='i686-pc-linux-gnu'
> --host='arm-unknown-linux-uclibcgnueabi' --prefix='/usr' --sysconfdir=/etc 
> \
>--with-endianness=little \
>--enable-mini-agent --disable-applications
> --disable-manuals --disable-scripts \
>--disable-des --disable-mibs --disable-mib-loading
> --disable-snmpv1 --disable-snmpv2c \
>--disable-privacy --disable-embedded-perl \
>--with-defaults \
>--with-transposrts=UDP \
>--with-default-snmp-version=3 --with-mibs="" \
>--with-sys-contact="" --with-sys-location="" \
>--with-logfile="none"
> --with-persistent-directory=/var/lib/net-snmp \
>--with-out-mib-modules="mibII ucd_snmp agent_mibs agentx
> utilities disman/event disman/schedule host smux" \
>--with-mib-modules="host/hr_system"
>
>
> As far as I can understand, the "notificaiton" mib (1.3.6.1.6.3.13.1.1)
> was supposed to be included by that command line. It is not. I have also
> tried adding "notification" to the "--with-mib-modules", to no avail:
>
> $ snmpbulkwalk -uadmin 192.168.40.99 1.3.6.1.6.3.13
> SNMP-NOTIFICATION-MIB::snmpNotificationMIB = No Such Object available on
> this agent at this OID
>
> Any idea/help would be welcome
>
> Shachar
>
> --
> ___
> 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 


--
___
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: Table custom handlers

2009-01-05 Thread Nikos Balkanas
Dear Wes,

Thanks again for the valuable info.

I'm afraid I will impose a bit more on this.

I looked at both of the suggestions:

1) row_merge is not for me, since I only have 1 writable column/table.

2) I also checked the iterator_helper. It has the oid code you suggested. It 
is also pretty involved and, as you mentioned, a bit heavy. By fitting its 
logic to my data, I can make it much simpler and faster. I need only 1 thing 
to do it.

I need to get the changed row index. I looked everywhere, requests, reginfo, 
reqinfo, handler. Couldn't find it. There is an index in the requests 
structure, at the right place, but it is the wrong one. I considered using 
the build_oid_noalloc to generate the index oids, but my row indeces list is 
NULL. I could of course regenerate the list by looping through the rows. I 
hope I am not asking too much.

I am using netsnmp_table_data_set from data_set.c example.

Hopefully, this is the last piece missing to complete the puzzle.

BR,
Nikos

- Original Message - 
From: "Wes Hardaker" 
To: "Nikos Balkanas" 
Cc: 
Sent: Monday, January 05, 2009 6:14 PM
Subject: Re: Table custom handlers


>>>>>> On Sun, 4 Jan 2009 02:59:33 +0200, "Nikos Balkanas" 
>>>>>>  said:
>
> NB> I know how to get the values for each row/column. If I keep the old
> NB> values in an array, I could iterate through them and do it; I was
> NB> wondering if there is a better way to do it through a flag that i am
> NB> missing or something.
>
> There are multiple ways of doing it and depending on which type of
> internal data structure you have helps decide how to do it.  Generally
> speaking, you need to look at the incoming index values pulled out of
> the OIDs for the SET and use that data to look up the rows in your
> current data.  Then you go through the SET phases and replace the old
> values with the new at the appropriate point (keeping the older ones
> around till the FREE or UNDO phases).
>
> Many of the table handlers help you do this sort of thing (eg the
> iterator helper helps you walk through your data, but is inefficient).
> If you're writing your own without any of the above helpers it'll take
> more work.
>
> You might at least look at the row_merge helper, which groups all the
> incoming requests together by each row so you can safely loop through
> the request chain and know they're all affecting the same row.
> -- 
> Wes Hardaker
> Sparta, Inc. 


--
___
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: core dump

2009-01-05 Thread Nikos Balkanas
Actually I am using the exact same setup, but in a global zone. Compiled it 
and run it in 64bit Solaris 10.5 (intel CPU). Runs and compiles with no 
problems. Still testing/developing though, not production.

Did you compile with Sun's gcc? You know you can analyze your core both by 
gcc and sun tools.

BR,
Nikos
- Original Message - 
From: "Thomas Anders" 
To: "Hindley Nick" 
Cc: 
Sent: Monday, January 05, 2009 3:50 PM
Subject: Re: core dump


> Hindley Nick schrieb:
>>  net-snmp-5.4.2.1 which I'm running on solaris10 (in a zone)
>
> Please file a bug on http://www.net-snmp.org/bugs so it won't get lost.
>
>
> +Thomas
>
> --
> ___
> 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 


--
___
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: netsnmp_create_handler_registration

2009-01-05 Thread Nikos Balkanas
Many thanks,

For pointing me in the right direction.

It took me some time with the debugger to find out where I can get this 
mysterious (x) - well I did know that it was the reqinfo->mode pointer you 
explained, but I didn't know how to get it -.

Converting my .so to executable, so that I can use the debugger, I 
discovered amidst a few function pointers, that custom handlers are actually 
called with 4 arguments. This I discovered no more or less by comparing 
function addresses to my own handler address:

__inline__ static int handler(netsnmp_mib_handler *handler, 
netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *areqinfo, 
netsnmp_request_info *reqinfo)

Uptill now I thought that it was just an empty variable list (Remember an 
older mail of mine asking about calling conventions for handlers?). So the 
required variable is areqinfo->mode.

I think it deserves both a FAQ and a wiki spot. I have to leave on a 
business trip, but when I come back (end of January) I intend to document my 
experiences with custom handlers. Maybe you can tell me then how best to go 
about it.

BR,
Nikos
- Original Message - 
From: "Wes Hardaker" 
To: "Nikos Balkanas" 
Cc: 
Sent: Monday, January 05, 2009 6:19 PM
Subject: Re: netsnmp_create_handler_registration


>>>>>> On Sat, 3 Jan 2009 15:33:51 +0200, "Nikos Balkanas" 
>>>>>>  said:
>
> NB> During a SET operation the custom handler will be called 4 times, 2
> NB> with old values and 2 with new ones (Reserve1, Reserve2, Action,
> NB> Commit).
>
> The values in the varbinds are always the new ones (IE, the ones from
> the SET packet).
>
> NB> If the same handler is used also for GET operations
> NB> (HANDLER_CAN_RWRITE) will be called once only (let's call it
> NB> Reserve1).
>
> It's called GET actually :-)
>
> NB> How can one distinguish between GET and SET calls?
>
> The reqinfo->mode variable will be set to one of (snmp_agent.h):
>
> #define MODE_GET  SNMP_MSG_GET
> #define MODE_GETNEXT  SNMP_MSG_GETNEXT
> #define MODE_GETBULK  SNMP_MSG_GETBULK
> #define MODE_GET_STASHSNMP_MSG_INTERNAL_GET_STASH
>
> #define MODE_SET_BEGINSNMP_MSG_INTERNAL_SET_BEGIN
> #define MODE_SET_RESERVE1 SNMP_MSG_INTERNAL_SET_RESERVE1
> #define MODE_SET_RESERVE2 SNMP_MSG_INTERNAL_SET_RESERVE2
> #define MODE_SET_ACTION   SNMP_MSG_INTERNAL_SET_ACTION
> #define MODE_SET_COMMIT   SNMP_MSG_INTERNAL_SET_COMMIT
> #define MODE_SET_FREE SNMP_MSG_INTERNAL_SET_FREE
> #define MODE_SET_UNDO SNMP_MSG_INTERNAL_SET_UNDO
>
> There is even a MODE_IS_GET(x) macro that tells you if the incoming mode
> is a GET type vs a SET type operation.
>
>
> -- 
> Wes Hardaker
> Sparta, Inc. 


--
___
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: IPV6 Address handling

2009-01-05 Thread Nikos Balkanas
Hi,

 Ipv6Address is defined in IPV6-TC.txt as an OCTET_STRING size 16:

"This data type is used to model IPv6 addresses.
This is a binary string of 16 octets in network
byte-order."

BR,
Nikos
  - Original Message - 
  From: jayesh km 
  To: net-snmp 
  Sent: Monday, January 05, 2009 9:07 AM
  Subject: IPV6 Address handling


  Hi,

  I need to handle a MIB variable which is IPv6 address. Can someone please 
tell me how handle it in my code? What ASN type (like ASN_IPADDRESS) should i 
use and also what should be the datatype for the variable? (is it a character 
array?)

  Thanks in advance,
  Jayesh KM



--
  Bring your gang together. Do your thing. Find your favourite Yahoo! Group.


--


  --



--


  ___
  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
--
___
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: Integrating net-SNMP agent into my application

2009-01-04 Thread Nikos Balkanas
You are correct about the default.

However, this is not the case with Solaris. Anyone can access the Unix 
socket.
So, you say that even in Linux, given the Unix socket credentials support, 
agentx doesn't support it?

BR,
Nikos

- Original Message - 
From: "Vincent Bernat" 
To: "Nikos Balkanas" 
Cc: 
Sent: Sunday, January 04, 2009 3:23 PM
Subject: Re: Integrating net-SNMP agent into my application


OoO Peu avant le début de l'après-midi du dimanche 04 janvier 2009, vers
13:51, "Nikos Balkanas"  disaitΒ :

> 1) Default agentx configuration (master agentx) is TCP:705 from
> anywhere. This is not the default Unix socket as told in th man
> pages. It should be restricted in the configuration and not let as is.

Default  agentx configuration  is  /var/agentx/master. If  it fails,  it
fallback to TCP. This is done in agentx_config_init():

,
| netsnmp_register_default_domain("agentx", "unix");
| netsnmp_register_default_target("agentx", "unix", 
NETSNMP_AGENTX_SOCKET);
| #define val(x) __STRING(x)
| netsnmp_register_default_target("agentx", "tcp", ":" 
val(AGENTX_PORT));
`

> 2) Permissions can be restricted to localhost only. That is good, but
> still any local user can hijack root snmp sessions (application,
> server, etc.). Permissions on the unix socket affect the permissions
> on the file itself, i.e. noone can inject snmp commands from the file
> system, which is a good thing. Still any local user can use a subagent
> and without any authentication can exploit the whole snmp server tree.

If you use an  Unix socket, the only way to connect  to the master agent
is to  connect to this socket. On  Linux, the rights set  on this socket
and  on the  directory containing  this  socket will  be checked  before
connection is allowed. I don't know if this is done on other Unixes.

> Unfortunately sockets, unix or TCP, do not support permissions in
> their protocol.

Unix sockets  allow credential transport (SCM_CREDENTIALS)  on Linux and
on many BSD.  This is not done in NetSNMP however.
-- 
panic("huh?\n");
2.2.16 /usr/src/linux/arch/i386/kernel/smp.c 


--
___
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: Integrating net-SNMP agent into my application

2009-01-04 Thread Nikos Balkanas
Yes, that did it. But there are still some lingering security concerns:

1) Default agentx configuration (master agentx) is TCP:705 from anywhere. 
This is not the default Unix socket as told in th man pages. It should be 
restricted in the configuration and not let as is.
2) Permissions can be restricted to localhost only. That is good, but still 
any local user can hijack root snmp sessions (application, server, etc.). 
Permissions on the unix socket affect the permissions on the file itself, 
i.e. noone can inject snmp commands from the file system, which is a good 
thing. Still any local user can use a subagent and without any 
authentication can exploit the whole snmp server tree.

Unfortunately sockets, unix or TCP, do not support permissions in their 
protocol. Propably a good thing since they run on transport layer 4 and any 
aaa is layer 7. I still feel strongly that authentication should be 
implemented at the agentx client, encrypted for snmp v3, and with a very 
short timeout, as applicable to applications.

Many thanx,
Nikos
- Original Message - 
From: "Vincent Bernat" 
To: 
Sent: Sunday, January 04, 2009 1:59 PM
Subject: Re: Integrating net-SNMP agent into my application


> OoO Pendant le temps de midi du dimanche 04 janvier 2009, vers 12:58, je
> disais:
>
>> Since   you  are   on  Unix,   unix   socket  should   be  the   default
>> (/var/agentx/master).  With just "master  agentx" in  your configuration
>> file, don't you  get a socket at /var/agentx/master? If  not, do you run
>> snmpd with "-x" option?
>
> Otherwise, the problem may be because /var/agentx does not exist. Create 
> it.
> -- 
> Make sure your code "does nothing" gracefully.
>- The Elements of Programming Style (Kernighan & Plauger)
>
> --
> ___
> 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 


--
___
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: Integrating net-SNMP agent into my application

2009-01-04 Thread Nikos Balkanas
Thanx,

I tried these suggestions. localhost works fine. Couldn't get, though, unix 
sockets to work.
It creates the unix socket OK, but the example-daemon fails to connect:

Warning: Failed to connect to the agentx master agent ([NIL]):

snmpd.conf:

master agentx
agentXSocket unix:/tmp/master

ls -la /tmp/master:

srwxr-xr-x   1 root root   0 Jan  4 13:17 /tmp/master

I imagine that example daemon needs to be told of the Unix socket. Any 
ideas?

BR,
Nikos

- Original Message - 
From: "Vincent Bernat" 
To: 
Sent: Sunday, January 04, 2009 11:16 AM
Subject: Re: Integrating net-SNMP agent into my application


> OoO  En cette nuit  nuageuse du  dimanche 04  janvier 2009,  vers 01:32,
> "Nikos Balkanas"  disaitΒ :
>
>> It is a TCP/IP socket.  I am afraid i don't follow you. Sockets do not 
>> have
>> any rights. Anyone can read/write  to them. That's what makes Internet
>> work.
>
> Bydefault,   thisisa   _Unix_socket.   Somethinglike
> /var/agentx/master.  You can  set the  permission you  want on  it using
> agentXPerms in snmpd.conf.
>
>> I didn't know you can restrict AgentX to accept connections from 
>> localhost
>> only. How do you configure this?
>
> You need to use agentXSocket option with something like tcp:localhost:705.
> -- 
> /*
>  * We used to try various strange things. Let's not.
>  */
> 2.2.16 /usr/src/linux/fs/buffer.c
>
> --
> ___
> 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
> 


--
___
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: Table custom handlers

2009-01-03 Thread Nikos Balkanas
Actually let me rephrase that:

I know how to get the values for each row/column. If I keep the old values in 
an array, I could iterate through them and do it; I was wondering if there is a 
better way to do it through a flag that i am missing or something. 

I was looking both at the rowstatus_column and the my_change_data, but do not 
seem to change value during the modification.

BR,
Nikos
  - Original Message - 
  From: Nikos Balkanas 
  To: net-snmp-users@lists.sourceforge.net 
  Sent: Saturday, January 03, 2009 3:41 PM
  Subject: Table custom handlers


  Hi,

  During a SET operation for a table how do I know which rows have been 
modified? Any example to look at?

  Thanks,
  Nikos--
___
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: Integrating net-SNMP agent into my application

2009-01-03 Thread Nikos Balkanas
It is a TCP/IP socket.  I am afraid i don't follow you. Sockets do not have 
any rights. Anyone can read/write to them. That's what makes Internet work.

Just try telneting to the port and you are talking to AgentX. The fact that 
the underlying agent runs as root means only just that any possible 
exploitation that ends up to a shell would give a root shell.

I didn't know you can restrict AgentX to accept connections from localhost 
only. How do you configure this?

BR,
Nikos
- Original Message - 
From: "Vincent Bernat" 
To: 
Sent: Sunday, January 04, 2009 12:02 AM
Subject: Re: Integrating net-SNMP agent into my application


> OoO En ce dΓ©but de soirΓ©e  du samedi 03 janvier 2009, vers 21:34, "Nikos
> Balkanas"  disaitΒ :
>
>> Yes, but there are security concerns. Agentx doesn't require 
>> authentication
>> and opens up TCP 705. Anyone with access to port 705 on your server can
>> hijack your snmpd master agent, server and application.
>
> Well, it depends. By default, on Unix, it is a socket which is used. You
> can  set whatever  rights  you want  on  it (only  writable  by root  by
> default).
>
> You can also starts AgentX for localhost only.
> -- 
> BOFH excuse #422:
> Someone else stole your IP address, call the Internet detectives!
>
> --
> ___
> 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
> 


--
___
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: Integrating net-SNMP agent into my application

2009-01-03 Thread Nikos Balkanas
Yes, but there are security concerns. Agentx doesn't require authentication 
and opens up TCP 705. Anyone with access to port 705 on your server can 
hijack your snmpd master agent, server and application.

I prefer using my own authenticated secure protocol.

BR,
Nikos
- Original Message - 
From: "Bart Cornelissen" 
To: 
Sent: Saturday, January 03, 2009 4:42 PM
Subject: Re: Integrating net-SNMP agent into my application


> On Sat, Jan 3, 2009 at 3:24 PM, Vincent Bernat  wrote:
>>
>> Using  subagent (AgentX),  you will  write something  that will  talk to
>> snmpd using  AgentX protocol. I  think this is  what you want to  do and
>> this is usually  the way to go. The subagent  will be tightly integrated
>> into your  application, so it  will be easy  to access any  variable you
>> need or call  any function you need without  building a protocol between
>> this subagent and your application.
>
> This is indeed what I was looking for.
> It seems like this is also explained further down in the "Writing a
> Subagent" tutorial:
> http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent#Instrumenting_your_own_code_with_agentx_subagent_support
>
> Thanks for the help!
>
> --
> ___
> 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 


--
___
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: Integrating net-SNMP agent into my application

2009-01-03 Thread Nikos Balkanas
In every system you need to have snmp support you need to have the master 
agent running.

MIB files are just configuration files that the master agent reads. You do 
not plug them into any code and expect them to do anything. If you are lucky 
mib2c can generate an snmp API skeleton for you to make your snmp calls. You 
still need to develop your own application interface from scratch.

All tutorials show how to modify the master agent to support your MIB 
variables. It is not recommended to code snmp in your application (although 
you could), since you would have to add support for the whole snmp tree 
(system, traps, etc.). You would need this since there can be only be one 
agent listening on  UDP 169 (default snmp port). If you just modify the 
master agent, he will do all the other stuff for you.

You will need to create a backdoor TCP protocol from your application to 
talk to your module. This can be anything you decide.

BR,
Nikos


- Original Message - 
From: "Bart Cornelissen" 
To: 
Sent: Saturday, January 03, 2009 3:36 PM
Subject: Re: Integrating net-SNMP agent into my application


> Thanks for the reply.
>
> On Sat, Jan 3, 2009 at 12:09 PM, Nikos Balkanas  
> wrote:
>>
>> I am doing the exact same thing, still not finished, but further along 
>> the way.
>> The documentation is very clear on that. Please check the tutorials:
>>
>> 1) Subagent 
>> http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent
>> 2) Shared object
>> http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Dynamically_Loadable_Object
>> 3) Chaging the master agent
>> http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_MIB_Module
>
> If I understand it right, these tutorials describe how I can plug my
> own MIB module, with knowledge of how to access my server
> application's variables, into the agent. Since I don't want to (and I
> guess I'm not supposed to either) incorporate my entire server into
> this module, the MIB module will have to communicate with my server
> application somehow.
>
>> All of these provide a custom handler placeholder that you can place your
>> own code to interface with your application. Of course you will need to 
>> add
>> support from your application to serve these requests and fire traps.
>
> Yes, but this is still unclear to me. Am I supposed to start the agent
> and my server application as two separate processes, and make them
> communicate with each other (through the MIB module)? Or can I just
> plug the Net-SNMP agent into my server application, and have my MIB
> module retrieve the needed information through simple function calls?
>
> -- Bart
>
>
>> Start by writing your own MIB (definition) file describing your 
>> variables.
>> Then try mib2c to see if it can generate the code for you from the MIB. I
>> couldn't get it to work for me (Solaris 10.5), so I had to tough it out 
>> from
>> scratch using the examples 
>> http://www.net-snmp.org/dev/agent/examples.html
>>
>> BR,
>> Nikos
>>
>> - Original Message - From: "Bart Cornelissen"
>> 
>> To: 
>> Sent: Saturday, January 03, 2009 12:43 PM
>> Subject: Integrating net-SNMP agent into my application
>>
>>
>>> Hi,
>>>
>>> We have written a server application that we would like to extend with
>>> some monitoring support. The goal is to expose some variables that
>>> describe the status of these servers, so their status can be easily
>>> visualized with a remote application.
>>> Is there a way to integrate the Net-SNMP agent module into our
>>> application? The documentation only seems to mention how to extend the
>>> agent application, but not the other way around.  Reorganizing our
>>> project so that the servers start up from within the Net-SNMP agents
>>> seems a way too drastic change, since the monitoring should be an
>>> optional feature anyway.
>>>
>>> Or am I looking at it the wrong way?  I don't have any experience with
>>> Net-SNMP, or SNMP even.
>>>
>>> Thanks,
>>> Bart
>
> --
> ___
> 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 


--
___
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


Table custom handlers

2009-01-03 Thread Nikos Balkanas
Hi,

During a SET operation for a table how do I know which rows have been modified? 
Any example to look at?

Thanks,
Nikos--
___
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


netsnmp_create_handler_registration

2009-01-03 Thread Nikos Balkanas
Hi,

During a SET operation the custom handler will be called 4 times, 2 with old 
values and 2 with new ones (Reserve1, Reserve2, Action, Commit). If the same 
handler is used also for GET operations (HANDLER_CAN_RWRITE) will be called 
once only (let's call it Reserve1). How can one distinguish between GET and SET 
calls? Or even better can anyone tell apart the different stages alltogether 
from another within the custom handler?

This is mostly for efficiency reasons. I could read the table from the 
application in all stages before action, but if the table has a lot of data it 
creates a lot of unnecessary I/O and delays. An example:

dotable -> Reserve1? -> Is it get or set? If get I need I/O and remain on 
Reserve1. If set do nothing and advance to Reserve2. 
dotable-> Reserve2? -> Is it new get Reserve1 or old set Reserve2? If get need 
I/O and stay on Reserve1. If set do nothing and advance to Action.

Variables are identical in these cases and do not help in discriminating them.

TIA,
Nikos--
___
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: Integrating net-SNMP agent into my application

2009-01-03 Thread Nikos Balkanas
Hi,

This is the right group for helping people doing just that. In fact I am 
doing the exact same thing, still not finished, but further along the way. 
The documentation is very clear on that. Please check the tutorials:

1) Subagenthttp://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Subagent
2) Shared object 
http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_Dynamically_Loadable_Object
3) Chaging the master agent 
http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_MIB_Module

All of these provide a custom handler placeholder that you can place your 
own code to interface with your application. Of course you will need to add 
support from your application to serve these requests and fire traps.

Start by writing your own MIB (definition) file describing your variables. 
Then try mib2c to see if it can generate the code for you from the MIB. I 
couldn't get it to work for me (Solaris 10.5), so I had to tough it out from 
scratch using the examples http://www.net-snmp.org/dev/agent/examples.html

BR,
Nikos

- Original Message - 
From: "Bart Cornelissen" 
To: 
Sent: Saturday, January 03, 2009 12:43 PM
Subject: Integrating net-SNMP agent into my application


> Hi,
>
> We have written a server application that we would like to extend with
> some monitoring support. The goal is to expose some variables that
> describe the status of these servers, so their status can be easily
> visualized with a remote application.
> Is there a way to integrate the Net-SNMP agent module into our
> application? The documentation only seems to mention how to extend the
> agent application, but not the other way around.  Reorganizing our
> project so that the servers start up from within the Net-SNMP agents
> seems a way too drastic change, since the monitoring should be an
> optional feature anyway.
>
> Or am I looking at it the wrong way?  I don't have any experience with
> Net-SNMP, or SNMP even.
>
> Thanks,
> Bart
>
> --
> ___
> 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 


--
___
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: Register_int handler

2009-01-02 Thread Nikos Balkanas
My comments were about the dangers of opensource in general. Didn't intend 
to be offensive about it.

The fact that a lot of people disappear after getting what they need, is a 
matter of personal responsibility and giving back. That said, one has to 
realize that snmp is a "side project" to other applications by nature. As 
such it tends to get less attention afterwards.

The trap I mentioned is real. It is not my company to make the decision to 
move to another vendor. But it is my responsibility to work it out, as far 
as I can. If the choice didn't exist from the beginning, things might have 
been simpler for me.

I have contributed a lot to opensource and continue to do so in various 
projects. Depending on the support I get, I intend to give back starting 
from the items I gripe about.

One has also to consider that this is Holiday period, and Ron's feedback, so 
participation is naturally reduced.

BR,
Nikos

- Original Message - 
From: "Wes Hardaker" 
To: "Nikos Balkanas" 
Cc: "Wes Hardaker" ; 

Sent: Friday, January 02, 2009 7:43 PM
Subject: Re: Register_int handler


>>>>>> On Fri, 2 Jan 2009 19:11:33 +0200, "Nikos Balkanas" 
>>>>>>  said:
>
> NB> This is a multithreaded agent. What happens if 2 or more simultaneous
> NB> calls try to set the same variable? How can I tell apart the different
> NB> states of the same set request? Is there a unique ID or something?
>
> Net-SNMP does not support a multi-threaded agent at all.  There are
> people that have done it carefully by putting a threaded
> interface/calling-system between the agent and the mib code, but it has
> to be done carefully and has never been documented.  (I actually have
> ideas on how to do something fairly automatically, but haven't had the
> time/energy/finances to make it happen).
>
> NB> There are broken tutorials and outdated examples & documentation. I
> NB> have unanswered questions 2 weeks old, (broken mib2c, netsnmp 5.1.1
> NB> coding) which by now are irrelevant, since I was forced to move on
> NB> to alternative options.
>
> If you're offering to help, we'd certainly appreciate it.  There is
> always a lot of work to be done.  5.1.1 is quite old, which is why I
> haven't personally responded to it at least.
>
> NB> However, an open source project, not maintained, just gives bad name
> NB> to the whole movement.
>
> It's maintained.  The number of users with question, however, might
> outweigh the developers available to answer.  I wouldn't say that's
> not-maintained.  Under-maintained compared to demand, however, is a more
> adequate description.  Getting users to help write documentation for
> things they've learned has always been a challenge.  I've even consulted
> for multiple companies that needed help but had no interest in funding
> documentation.  EG, "fix/write the code but don't spend the effort to
> produce documentation".  Documentation is always an issue with most
> projects.
>
> NB> If it comes to no support from the more experienced users to
> NB> newcomers, the basis of open source, maybe it would be better for
> NB> everyone involved just to pull the plug on it.
>
> Open source projects are either contributed to by the users, or they're
> not.  In the case of Net-SNMP, there are huge numbers of users that ask
> questions, demand fixes and are never heard from again once they've been
> satisified.  IE, the ratio of users to contributers is extremely poor.
> Given that I'm proud of the development team that does exist and has
> been helping with little personal gain to show for it.  The people that
> have been recruited as core developers are, for the most part, extremely
> friendly, answer huge numbers of questions, and contribute code and
> their personal time for very little gain other than to know they've
> helped the community at large.  In the face of negative statements like
> yours, they still keep coming back and helping when they have the time
> and helping folks out whenever they can.
>
> If you truly feel you're not getting the resources you need from the
> answers on the list, then I do suggest you move to a different project.
> If you need 24/7 urgent help, I strongly recommend SNMP Research's
> agent development kit.  They offer a fantastic product with a fantastic
> support team (I know many of them personally) and I'm sure they'll help
> you with everything you need once you buy their license kit.  I'd
> suggest that's a better fit for you since you've indicated you're in
> need of professional quality support and immediate answers.  Good luck!
> -- 
> Wes Hardaker
> Sparta, Inc. 


--
___
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: Register_int handler

2009-01-02 Thread Nikos Balkanas
Thanx for the reponse.

This is a multithreaded agent. What happens if 2 or more simultaneous calls 
try to set the same variable? How can I tell apart the different states of 
the same set request? Is there a unique ID or something?

I presume returning 0 means success, anything else failure.

As far as the rest of your comments, I appreciate your input and apologize 
for my behaviour. However, I am complaining because I would like to see 
developers frequenting the group and picking up some of the load. There are 
broken tutorials and outdated examples & documentation. I have unanswered 
questions 2 weeks old, (broken mib2c, netsnmp 5.1.1 coding) which by now are 
irrelevant, since I was forced to move on  to alternative options.
I appreciate the voluntary contribution of the involved people. However, an 
open source project, not maintained, just gives bad name to the whole 
movement. As long as it exists, people are expecting us to provide them with 
solutions based on it. If it comes to no support from the more experienced 
users to newcomers, the basis of open source, maybe it would be better for 
everyone involved just to pull the plug on it.

Of course I am not referring to you, since you are the only one helping out 
and have done a remarkable job closing up issues since you returned.

BR,
Nikos
- Original Message - 
From: "Wes Hardaker" 
To: "Nikos Balkanas" 
Cc: 
Sent: Friday, January 02, 2009 5:16 PM
Subject: Re: Register_int handler


>>>>>> On Thu, 1 Jan 2009 23:30:12 +0200, "Nikos Balkanas" 
>>>>>>  said:
>
> NB> Hi,
> NB> During development of my own handlers, after putting a trace on the
> NB> handler I notice that it is called 4 times during an snmpset
> NB> operation. 2 with the old value and 2 with the new value. This apart
> NB> from dangerous, seems a waste of resources to do a simple set. What
> NB> instance does each call respresent? Can I avoid it? Am I doing
> NB> something wrong?
>
> See the flow diagram and description of SET processing here:
>
> http://net-snmp.sourceforge.net/wiki/index.php/TUT:Writing_a_MIB_Module#Set_Processing
>
> Please don't post your not a bunch of times within 24 hours and complain
> that no one is answering.  It only annoys people that volunteer their
> time to help answer questions without being paid for it.
> -- 
> Wes Hardaker
> Sparta, Inc. 


--
___
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: Register_int handler

2009-01-02 Thread Nikos Balkanas
Hi,

Is there any place I could find specifications for the custom handlers (calling 
conventions, return values, etc)?

TIA
Nikos
  - Original Message - 
  From: Nikos Balkanas 
  To: net-snmp-users@lists.sourceforge.net 
  Sent: Friday, January 02, 2009 12:09 PM
  Subject: Re: Register_int handler


  Hi,

  Any ideas? It is rather urgent.

  Thanx,
  Nikos
- Original Message - 
From: Nikos Balkanas 
To: net-snmp-users@lists.sourceforge.net 
Sent: Thursday, January 01, 2009 11:30 PM
Subject: Register_int handler


Hi,

During development of my own handlers, after putting a trace on the handler 
I notice that it is called 4 times during an snmpset operation. 2 with the old 
value and 2 with the new value. This apart from dangerous, seems a waste of 
resources to do a simple set. What instance does each call respresent? Can I 
avoid it? Am I doing something wrong?

Server2:~/work/snmp-> snmpset 127.0.0.1 iwSetMode = 4
IANWAP-MIB::iwSetMode = INTEGER: restart(4)
.
.
.
nkssnmpd: info: setMode ~> mode = 3
nkssnmpd: info: setMode ~> mode = 3
nkssnmpd: info: setMode ~> mode = 4
nkssnmpd: info: setMode ~> mode = 4
.
.
.

My registration. mode is a static enum:

netsnmp_register_int_instance("iwSetMode",
 mode_oid,
OID_LENGTH(mode_oid),
(void *)&mode, (void *)setMode);

PS I would love to pass arguments to setMode, but I have tried several 
function pointers (i.e. void (*setMode)(int mode)) and don't work. Any 
suggestions on that?

Thanx,
Nikos--
___
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: Register_int handler

2009-01-02 Thread Nikos Balkanas
Hi,

Any ideas? It is rather urgent.

Thanx,
Nikos
  - Original Message - 
  From: Nikos Balkanas 
  To: net-snmp-users@lists.sourceforge.net 
  Sent: Thursday, January 01, 2009 11:30 PM
  Subject: Register_int handler


  Hi,

  During development of my own handlers, after putting a trace on the handler I 
notice that it is called 4 times during an snmpset operation. 2 with the old 
value and 2 with the new value. This apart from dangerous, seems a waste of 
resources to do a simple set. What instance does each call respresent? Can I 
avoid it? Am I doing something wrong?

  Server2:~/work/snmp-> snmpset 127.0.0.1 iwSetMode = 4
  IANWAP-MIB::iwSetMode = INTEGER: restart(4)
  .
  .
  .
  nkssnmpd: info: setMode ~> mode = 3
  nkssnmpd: info: setMode ~> mode = 3
  nkssnmpd: info: setMode ~> mode = 4
  nkssnmpd: info: setMode ~> mode = 4
  .
  .
  .

  My registration. mode is a static enum:

  netsnmp_register_int_instance("iwSetMode",
   mode_oid,
  OID_LENGTH(mode_oid),
  (void *)&mode, (void *)setMode);

  PS I would love to pass arguments to setMode, but I have tried several 
function pointers (i.e. void (*setMode)(int mode)) and don't work. Any 
suggestions on that?

  Thanx,
  Nikos--
___
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: starting snmpd daemon

2009-01-02 Thread Nikos Balkanas
Could you please enter the following line in your init script (start case):

env > /tmp/snmpd.env

Reboot.

Repeat from your shell (different file):

env > /tmp/snmpd.out

diff those 2 files. If you don't see the problem, post the diff and your 
init script (cross out any sensitive info).

BR,
Nikos


- Original Message - 
From: "Ambika Tripathy" 
To: "'Mike Ayers'" ; 

Sent: Friday, January 02, 2009 10:30 AM
Subject: RE: starting snmpd daemon


> Hi,
>
> I am using Ubuntu 64 it OS (8.04.1).
>
> I have created the snmpd script file and updated rc.d for that as
>
> update-rc.d snmpd start 51 S .
>
> After reboot, ps -A | grep snmp shows snmpd running. But when I execute
> snmpwalk -v 2c -c public 10.4.0.215 .1.3.6.1.4.1.32404 the values are 
> coming
> as 0. But actual value of my server is not zero.
>
> Even when I stop the rc.d process and execute the snmpd from command line
> the output is coming perfectly.
> The cli command is #/usr/local/sbin/snmpd
>
> How can I configure rc.d process so that I can start snmpd automatically
> during system reboot using ubuntu OS.
>
> Br,
> Ambika
>
>
>
> -Original Message-
> From: Ambika Pr. Tripathy [mailto:trip...@nethawk.fi]
> Sent: Thursday, January 01, 2009 6:15 PM
> To: Mike Ayers; Ambika Tripathy; net-snmp-users@lists.sourceforge.net
> Subject: RE: starting snmpd daemon
>
>
> Hi,
>
> The location of snmpd is /usr/local/sbin/
>
> And i am executing init.d script as a root user.
>
> br,
> Ambika
>
>
>>-- Original Message --
>>Subject: RE: starting snmpd daemon
>>Date: Fri, 26 Dec 2008 11:01:13 -0800
>>From: "Mike Ayers" 
>>To: "Ambika Tripathy" ,
>>
>>
>>
>>> From: Ambika Tripathy [mailto:ambika.tripa...@nethawkgroup.com]
>>> Sent: Friday, December 26, 2008 3:42 AM
>>
>>> I am facing a peculiar problem when I try to start my snmpd
>>> using rc.d. The problem is when I try to extract OID values
>>> using snmpwalk for my enterprise OID it is always coming as
>>> 0. But when I execute the snmpd manually from command line
>>> the perfect values are coming.
>>
>> What is the location of the snmpd that you start manually?
>>
>> Are you running the init.d script as root?
>>
>>
>> HTH,
>>
>>Mike
>>
>>---
> ---
>>___
>>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
>>
>
> Ambika Prasad Tripathy
>
> NetHawk Networks India Pvt. Ltd.
> Mob: +91-94375 47730
> mail: ambika.tripa...@nethawkgroup.com
> web: www.nethawk.fi
>
>
>
>
>
> --
> ___
> 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 


--
___
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: sysUpTime returns an error

2009-01-01 Thread Nikos Balkanas
Yes. You can see clearly the definition of sysUpTime in the snmpwalk output. 
You have no problems with MIBs. In fact using either MIBs for sysUpTime (RFC 
or DISMAN) will get you the same result, because they are getting it from 
the same place:


mib-2->system->sysUpTime->sysUptimeInstance

as you can see from the walk.

I am sorry for keeping you this late.  This is my configuration (snmpd.conf) 
with passwords crossed out. Replace all xxx with your passwords. It works 
fine for me. Please back up yours, take mein and restart snmpd and test 
again.


BR,
Nikos

- Original Message - 
From: "Tanya Brudner" 
To: "Nikos Balkanas" ; 


Sent: Thursday, January 01, 2009 11:58 PM
Subject: RE: sysUpTime returns an error


Nikos,

The file - renamed.
The snmpd - restarted.
The snmpget returns the exact same error as before
("DISMAN-EVENT-MIB::sysUpTimeInstance = No such Object available on this
agent at this OID").
(If using the specific RFC1213-MIB reference, I get the same error text,
just for the correct mib ("RFC1213-MIB::sysUpTime.0..")

The snmptranslate worked properly this time - please see the attached
file.


Thanks again, very very much!

-Tanya


-Original Message-
From: Nikos Balkanas [mailto:nbalka...@gmail.com]
Sent: Thursday, January 01, 2009 23:29
To: Tanya Brudner; net-snmp-users@lists.sourceforge.net
Subject: Re: sysUpTime returns an error

Looks like your sysUptime is correctly set.
DISMAN-EVENT-MIB seems to have some issue.

Please:
mv /usr/local/share/snmp/mibs/DISMAN-EVENT-MIB.txt.1
/usr/local/share/snmp/mibs/DISMAN-EVENT-MIB.txt

restart snmpd.

snmpget 127.0.0.1 sysUpTime.0

If this doesn't work, one last output from:

snmptranslate -M+. -m DISMAN-EVENT-MIB -Tp -IR mib-2

Thanx,
Nikos
- Original Message - 
From: "Tanya Brudner" 

To: "Nikos Balkanas" ;

Sent: Thursday, January 01, 2009 10:55 PM
Subject: RE: sysUpTime returns an error


Thanks,

The output you requested:

+-- -R-- TimeTicks sysUpTime(3)

(keeping my fingers crossed)
-Tanya



-Original Message-
From: Nikos Balkanas [mailto:nbalka...@gmail.com]
Sent: Thursday, January 01, 2009 22:14
To: Tanya Brudner; net-snmp-users@lists.sourceforge.net
Subject: Re: sysUpTime returns an error

Thanx. I think I see something. If you can please mail me also (1 line
output):

snmptranslate -M+. -m SNMPv2-MIB -Tp -IR sysUpTime

BR,
Nikos
- Original Message - 
From: "Tanya Brudner" 

To: "Nikos Balkanas" ;

Sent: Thursday, January 01, 2009 9:56 PM
Subject: RE: sysUpTime returns an error


Hi Nikos,

In the attached file are the snmpwalk result (I'm not sure what to make
of it, really :) ), and the 'ls' output.

Thanks again,

-Tanya


-Original Message-
From: Nikos Balkanas [mailto:nbalka...@gmail.com]
Sent: Thursday, January 01, 2009 21:29
To: Tanya Brudner; net-snmp-users@lists.sourceforge.net
Subject: Re: sysUpTime returns an error

Please run:

ls -la /usr/local/share/snmp/mibs/DISMAN*

and also:

snmpwalk 127.0.0.1 dismanEventMIB

And send output.

Thanx,
Nikos
- Original Message - 
From: "Tanya Brudner" 

To: 
Sent: Thursday, January 01, 2009 8:56 PM
Subject: RE: sysUpTime returns an error



Hi,

Thanks again but I am still a bit confused:

My access rights (as defined in the /etc/snmp/snmpd.conf) (almost from
the sample file) are defined as following:

Com2sec my-sec-ro default public
Com2sec my-sec-rw default private

Group my-ro-group v1 my-sec-ro
Group my-rw-group v1 my-sec-rw
Group my-ro-group usm my-sec-ro
Group my-rw-group usm my-sec-rw

View all included .1

access my-rw-group "" v1  noauth exact all all none
access my-ro-group "" v1  noauth exact all none none
access my-rw-group "" usm  noauth exact all all none
access my-ro-group "" usm  noauth exact all none none

rwuser myuser authPriv (the user is created directly by putting the
createUser directive in the /var/lib/... snmpd.conf file).

Perhaps there is anything wrong here, or you can advice on something
else I could try...

Thanks again,

-Tanya

-Original Message-
From: Wes Hardaker [mailto:harda...@users.sourceforge.net]
Sent: Wednesday, December 31, 2008 18:47
To: Tanya Brudner
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: sysUpTime returns an error


On Tue, 30 Dec 2008 22:23:01 +0200, "Tanya Brudner"

 said:

TB> I have a problem with Get-request on a single mib: SysUpTime.

TB> On a snmpget -v3 . system.sysUpTime.0, it returns
TB> ""DISMAN-EVENT-MIB::sysUpTimeInstance = No such Object available

on

this
TB> agent at this OID"

It looks like you don't have access rights to that object.  Check your
access control settings, or check that the agent was compiled to

include

the system group (it should have been unless you're doing something
odd).

The DISMAN-EVENT-MIB part is actually just 

Register_int handler

2009-01-01 Thread Nikos Balkanas
Hi,

During development of my own handlers, after putting a trace on the handler I 
notice that it is called 4 times during an snmpset operation. 2 with the old 
value and 2 with the new value. This apart from dangerous, seems a waste of 
resources to do a simple set. What instance does each call respresent? Can I 
avoid it? Am I doing something wrong?

Server2:~/work/snmp-> snmpset 127.0.0.1 iwSetMode = 4
IANWAP-MIB::iwSetMode = INTEGER: restart(4)
.
.
.
nkssnmpd: info: setMode ~> mode = 3
nkssnmpd: info: setMode ~> mode = 3
nkssnmpd: info: setMode ~> mode = 4
nkssnmpd: info: setMode ~> mode = 4
.
.
.

My registration. mode is a static enum:

netsnmp_register_int_instance("iwSetMode",
 mode_oid,
OID_LENGTH(mode_oid),
(void *)&mode, (void *)setMode);

PS I would love to pass arguments to setMode, but I have tried several function 
pointers (i.e. void (*setMode)(int mode)) and don't work. Any suggestions on 
that?

Thanx,
Nikos--
___
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: sysUpTime returns an error

2009-01-01 Thread Nikos Balkanas
Looks like your sysUptime is correctly set.
DISMAN-EVENT-MIB seems to have some issue.

Please:
mv /usr/local/share/snmp/mibs/DISMAN-EVENT-MIB.txt.1 
/usr/local/share/snmp/mibs/DISMAN-EVENT-MIB.txt

restart snmpd.

snmpget 127.0.0.1 sysUpTime.0

If this doesn't work, one last output from:

snmptranslate -M+. -m DISMAN-EVENT-MIB -Tp -IR mib-2

Thanx,
Nikos
- Original Message - 
From: "Tanya Brudner" 
To: "Nikos Balkanas" ; 

Sent: Thursday, January 01, 2009 10:55 PM
Subject: RE: sysUpTime returns an error


Thanks,

The output you requested:

+-- -R-- TimeTicks sysUpTime(3)

(keeping my fingers crossed)
-Tanya



-Original Message-
From: Nikos Balkanas [mailto:nbalka...@gmail.com]
Sent: Thursday, January 01, 2009 22:14
To: Tanya Brudner; net-snmp-users@lists.sourceforge.net
Subject: Re: sysUpTime returns an error

Thanx. I think I see something. If you can please mail me also (1 line
output):

snmptranslate -M+. -m SNMPv2-MIB -Tp -IR sysUpTime

BR,
Nikos
- Original Message - 
From: "Tanya Brudner" 
To: "Nikos Balkanas" ;

Sent: Thursday, January 01, 2009 9:56 PM
Subject: RE: sysUpTime returns an error


Hi Nikos,

In the attached file are the snmpwalk result (I'm not sure what to make
of it, really :) ), and the 'ls' output.

Thanks again,

-Tanya


-Original Message-
From: Nikos Balkanas [mailto:nbalka...@gmail.com]
Sent: Thursday, January 01, 2009 21:29
To: Tanya Brudner; net-snmp-users@lists.sourceforge.net
Subject: Re: sysUpTime returns an error

Please run:

ls -la /usr/local/share/snmp/mibs/DISMAN*

and also:

snmpwalk 127.0.0.1 dismanEventMIB

And send output.

Thanx,
Nikos
- Original Message - 
From: "Tanya Brudner" 
To: 
Sent: Thursday, January 01, 2009 8:56 PM
Subject: RE: sysUpTime returns an error


> Hi,
>
> Thanks again but I am still a bit confused:
>
> My access rights (as defined in the /etc/snmp/snmpd.conf) (almost from
> the sample file) are defined as following:
>
> Com2sec my-sec-ro default public
> Com2sec my-sec-rw default private
>
> Group my-ro-group v1 my-sec-ro
> Group my-rw-group v1 my-sec-rw
> Group my-ro-group usm my-sec-ro
> Group my-rw-group usm my-sec-rw
>
> View all included .1
>
> access my-rw-group "" v1  noauth exact all all none
> access my-ro-group "" v1  noauth exact all none none
> access my-rw-group "" usm  noauth exact all all none
> access my-ro-group "" usm  noauth exact all none none
>
> rwuser myuser authPriv (the user is created directly by putting the
> createUser directive in the /var/lib/... snmpd.conf file).
>
> Perhaps there is anything wrong here, or you can advice on something
> else I could try...
>
> Thanks again,
>
> -Tanya
>
> -Original Message-
> From: Wes Hardaker [mailto:harda...@users.sourceforge.net]
> Sent: Wednesday, December 31, 2008 18:47
> To: Tanya Brudner
> Cc: net-snmp-users@lists.sourceforge.net
> Subject: Re: sysUpTime returns an error
>
>>>>>> On Tue, 30 Dec 2008 22:23:01 +0200, "Tanya Brudner"
>  said:
>
> TB> I have a problem with Get-request on a single mib: SysUpTime.
>
> TB> On a snmpget -v3 . system.sysUpTime.0, it returns
> TB> ""DISMAN-EVENT-MIB::sysUpTimeInstance = No such Object available
on
> this
> TB> agent at this OID"
>
> It looks like you don't have access rights to that object.  Check your
> access control settings, or check that the agent was compiled to
include
> the system group (it should have been unless you're doing something
> odd).
>
> The DISMAN-EVENT-MIB part is actually just misleading.  It is the
right
> object.  The DISMAN-EVENT-MIB defines the scalar instance as something
> special for it's own purposes.  Just ignore that part in your error
> comment as it's not relevant to your problem.
> -- 
> Wes Hardaker
> Sparta, Inc.
>
>

--
> ___
> 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



--
___
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: sysUpTime returns an error

2009-01-01 Thread Nikos Balkanas
Thanx. I think I see something. If you can please mail me also (1 line 
output):

snmptranslate -M+. -m SNMPv2-MIB -Tp -IR sysUpTime

BR,
Nikos
- Original Message - 
From: "Tanya Brudner" 
To: "Nikos Balkanas" ; 

Sent: Thursday, January 01, 2009 9:56 PM
Subject: RE: sysUpTime returns an error


Hi Nikos,

In the attached file are the snmpwalk result (I'm not sure what to make
of it, really :) ), and the 'ls' output.

Thanks again,

-Tanya


-----Original Message-
From: Nikos Balkanas [mailto:nbalka...@gmail.com]
Sent: Thursday, January 01, 2009 21:29
To: Tanya Brudner; net-snmp-users@lists.sourceforge.net
Subject: Re: sysUpTime returns an error

Please run:

ls -la /usr/local/share/snmp/mibs/DISMAN*

and also:

snmpwalk 127.0.0.1 dismanEventMIB

And send output.

Thanx,
Nikos
- Original Message - 
From: "Tanya Brudner" 
To: 
Sent: Thursday, January 01, 2009 8:56 PM
Subject: RE: sysUpTime returns an error


> Hi,
>
> Thanks again but I am still a bit confused:
>
> My access rights (as defined in the /etc/snmp/snmpd.conf) (almost from
> the sample file) are defined as following:
>
> Com2sec my-sec-ro default public
> Com2sec my-sec-rw default private
>
> Group my-ro-group v1 my-sec-ro
> Group my-rw-group v1 my-sec-rw
> Group my-ro-group usm my-sec-ro
> Group my-rw-group usm my-sec-rw
>
> View all included .1
>
> access my-rw-group "" v1  noauth exact all all none
> access my-ro-group "" v1  noauth exact all none none
> access my-rw-group "" usm  noauth exact all all none
> access my-ro-group "" usm  noauth exact all none none
>
> rwuser myuser authPriv (the user is created directly by putting the
> createUser directive in the /var/lib/... snmpd.conf file).
>
> Perhaps there is anything wrong here, or you can advice on something
> else I could try...
>
> Thanks again,
>
> -Tanya
>
> -Original Message-
> From: Wes Hardaker [mailto:harda...@users.sourceforge.net]
> Sent: Wednesday, December 31, 2008 18:47
> To: Tanya Brudner
> Cc: net-snmp-users@lists.sourceforge.net
> Subject: Re: sysUpTime returns an error
>
>>>>>> On Tue, 30 Dec 2008 22:23:01 +0200, "Tanya Brudner"
>  said:
>
> TB> I have a problem with Get-request on a single mib: SysUpTime.
>
> TB> On a snmpget -v3 . system.sysUpTime.0, it returns
> TB> ""DISMAN-EVENT-MIB::sysUpTimeInstance = No such Object available
on
> this
> TB> agent at this OID"
>
> It looks like you don't have access rights to that object.  Check your
> access control settings, or check that the agent was compiled to
include
> the system group (it should have been unless you're doing something
> odd).
>
> The DISMAN-EVENT-MIB part is actually just misleading.  It is the
right
> object.  The DISMAN-EVENT-MIB defines the scalar instance as something
> special for it's own purposes.  Just ignore that part in your error
> comment as it's not relevant to your problem.
> -- 
> Wes Hardaker
> Sparta, Inc.
>
>

--
> ___
> 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



--
___
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: sysUpTime returns an error

2009-01-01 Thread Nikos Balkanas
Please run:

ls -la /usr/local/share/snmp/mibs/DISMAN*

and also:

snmpwalk 127.0.0.1 dismanEventMIB

And send output.

Thanx,
Nikos
- Original Message - 
From: "Tanya Brudner" 
To: 
Sent: Thursday, January 01, 2009 8:56 PM
Subject: RE: sysUpTime returns an error


> Hi,
>
> Thanks again but I am still a bit confused:
>
> My access rights (as defined in the /etc/snmp/snmpd.conf) (almost from
> the sample file) are defined as following:
>
> Com2sec my-sec-ro default public
> Com2sec my-sec-rw default private
>
> Group my-ro-group v1 my-sec-ro
> Group my-rw-group v1 my-sec-rw
> Group my-ro-group usm my-sec-ro
> Group my-rw-group usm my-sec-rw
>
> View all included .1
>
> access my-rw-group "" v1  noauth exact all all none
> access my-ro-group "" v1  noauth exact all none none
> access my-rw-group "" usm  noauth exact all all none
> access my-ro-group "" usm  noauth exact all none none
>
> rwuser myuser authPriv (the user is created directly by putting the
> createUser directive in the /var/lib/... snmpd.conf file).
>
> Perhaps there is anything wrong here, or you can advice on something
> else I could try...
>
> Thanks again,
>
> -Tanya
>
> -Original Message-
> From: Wes Hardaker [mailto:harda...@users.sourceforge.net]
> Sent: Wednesday, December 31, 2008 18:47
> To: Tanya Brudner
> Cc: net-snmp-users@lists.sourceforge.net
> Subject: Re: sysUpTime returns an error
>
>> On Tue, 30 Dec 2008 22:23:01 +0200, "Tanya Brudner"
>  said:
>
> TB> I have a problem with Get-request on a single mib: SysUpTime.
>
> TB> On a snmpget -v3 . system.sysUpTime.0, it returns
> TB> ""DISMAN-EVENT-MIB::sysUpTimeInstance = No such Object available on
> this
> TB> agent at this OID"
>
> It looks like you don't have access rights to that object.  Check your
> access control settings, or check that the agent was compiled to include
> the system group (it should have been unless you're doing something
> odd).
>
> The DISMAN-EVENT-MIB part is actually just misleading.  It is the right
> object.  The DISMAN-EVENT-MIB defines the scalar instance as something
> special for it's own purposes.  Just ignore that part in your error
> comment as it's not relevant to your problem.
> -- 
> Wes Hardaker
> Sparta, Inc.
>
> --
> ___
> 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 


--
___
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: Shared library exit handle

2009-01-01 Thread Nikos Balkanas
Please disregard. As described in the example the exit handle is deinit_myapp. 
Sorry for spamming.

Happy New Year.
Nikos
  - Original Message - 
  From: Nikos Balkanas 
  To: net-snmp-users@lists.sourceforge.net 
  Sent: Wednesday, December 31, 2008 5:42 PM
  Subject: Shared library exit handle


  Hi,

  I am using the shared library approach to interface my application with snmpd.

  The entry handle is clearly defined:

  init_myapp()

  I was wondering what is the exit handle? I need to do some housekeeping 
before unloading the library.

  I have tried:

  exit_myapp()

  but it doesn't work.

  Thanx,
  Nikos--
___
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: enum registration

2008-12-31 Thread Nikos Balkanas
I presume then that there is no register_enum. Correct?

BR,
Nikos
- Original Message - 
From: "Wes Hardaker" 
To: "Nikos Balkanas" 
Cc: "Wes Hardaker" ; 

Sent: Wednesday, December 31, 2008 8:28 PM
Subject: Re: enum registration


>>>>>> On Wed, 31 Dec 2008 20:26:52 +0200, "Nikos Balkanas" 
>>>>>>  said:
>
> NB> net-snmp automatically does type checking according to the
> NB> MIB. I.e. it will reject strings if the mib says integer.
>
> The manager code in net-snmp automatically dose type checking (unless
> you turn it off).  The agent code, however, doesn't.  Although some
> mib2c templates do auto-produce code that does the type checking.  The
> default register_int utility you were using does *not* check incoming
> values for legal range.
> -- 
> Wes Hardaker
> Sparta, Inc. 


--
___
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: enum registration

2008-12-31 Thread Nikos Balkanas
Hi,

net-snmp automatically does type checking according to the MIB. I.e. it will 
reject strings if the mib says integer.

Is it for certain that it doesn't constraint enums (through some strange MIB 
setting or other configuration)?

Thanx,
Nikos
- Original Message - 
From: "Wes Hardaker" 
To: "Nikos Balkanas" 
Cc: 
Sent: Wednesday, December 31, 2008 7:11 PM
Subject: Re: enum registration


>>>>>> On Sun, 28 Dec 2008 13:47:47 +0200, "Nikos Balkanas" 
>>>>>>  said:
>
> NB> I am registering an enum scalar, but I don't know how to restrict
> NB> snmpset just to the enum values:
>
> You'll need to implement a subhandler and pass that into your
> registration function instead of the NULL.  And then in that, check if
> you're processing a SET and force an error if it's out of bounds.
> -- 
> Wes Hardaker
> Sparta, Inc. 


--
___
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


Shared library exit handle

2008-12-31 Thread Nikos Balkanas
Hi,

I am using the shared library approach to interface my application with snmpd.

The entry handle is clearly defined:

init_myapp()

I was wondering what is the exit handle? I need to do some housekeeping before 
unloading the library.

I have tried:

exit_myapp()

but it doesn't work.

Thanx,
Nikos--
___
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: sysUpTime returns an error

2008-12-31 Thread Nikos Balkanas
Or maybe:
snmpwalk 127.0.0.1 | grep DISMAN-EVENT-MIB

To check if DISMAN-EVENT-MIB is even loaded.

BR,
Nikos
  - Original Message - 
  From: venkatasuresh.pamidip...@emerson.com 
  To: tan...@ceragon.com ; net-snmp-users@lists.sourceforge.net 
  Sent: Wednesday, December 31, 2008 1:22 PM
  Subject: RE: sysUpTime returns an error


  Hi Tanya,

  NET-SNMP-AGENT-MIB has defined a table "nsModuleTable" which will list all 
the OIDs that are registered at SNMPD. Can you just give the following snmp 
command on one of the objects of this table to see if the OID sysUpTime is 
registered or not. The OID of sysUpTime is "1.3.6.1.2.1.1.3". In the snmpwalk 
output, the sysUpTime OID should be present as an index of one of the rows. If 
it is not present, sysUpTime is not registered at SNMPD and is the root-cause 
of this problem. 

  So, can you please try this command ..?
  snmpwalk -v2c -c public localhost -m 
/usr/share/snmp/mibs/NET-SNMP-AGENT-MIB.txt nsModuleTimeout

  Thanks & Regards,
  Suresh.



--
  From: Tanya Brudner [mailto:tan...@ceragon.com] 
  Sent: Wednesday, December 31, 2008 3:50 PM
  To: Pamidipati, Suresh [NETPWR/INDIA/HYDE]; 
net-snmp-users@lists.sourceforge.net
  Subject: RE: sysUpTime returns an error


  Hi Suresh and thanks for your help,

   

  I tried doing exactly what you advised; however I only see the rest of the 
system mibs – out of the 7, I see 6. I see them properly. I can change them – 
everything works fine.

  Only the sysUpTime is giving me trouble J

   

  Any other thoughts?

   

  Thanks in advance, 

   

  -Tanya

   

   

  From: venkatasuresh.pamidip...@emerson.com 
[mailto:venkatasuresh.pamidip...@emerson.com] 
  Sent: Wednesday, December 31, 2008 08:59
  To: Tanya Brudner; net-snmp-users@lists.sourceforge.net
  Subject: RE: sysUpTime returns an error

   

  Hi Tanya,

   

  It looks like SNMPD is trying to return the value of "sysUpTimeInstance" 
defined by DISMAN-EVENT-MIB. Can you please try giving the request on sysUpTime 
defined by RFC1213-MIB.? For example, run the following command.

   

  export MIBDIRS=/usr/share/snmp/mibs

  snmpwalk -v2c -c public localhost -m /usr/share/snmp/mibs/RFC1213-MIB.txt 
system

   

  Please make sure that the file "/usr/share/snmp/mibs/RFC1213-MIB.txt" exists 
on your system.

   

  Regards,

  Suresh.

   


--

  From: Tanya Brudner [mailto:tan...@ceragon.com] 
  Sent: Wednesday, December 31, 2008 1:53 AM
  To: net-snmp-users@lists.sourceforge.net
  Subject: sysUpTime returns an error

  Hi and thanks for all your help,

   

  I am new to SNMP, so I thank you for your patience J

   

  I have a problem with Get-request on a single mib: SysUpTime. 

  On a snmpget –v3 ….. system.sysUpTime.0, it returns 
“”DISMAN-EVENT-MIB::sysUpTimeInstance = No such Object available on this agent 
at this OID”

   

  The rest of the system subtree (and rest of the mibs, actually) return the 
correct values. 

   

  If I run snmptranslate –IR sysUpTime, I get the correct answer.

   

  What is this “confusion” and what is it caused by? 

   

  Thanks in advance, and Happy New Year,

   

  -Tanya

   



--


  --



--


  ___
  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
--
___
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: Timeout while DNS lookups fail

2008-12-31 Thread Nikos Balkanas
Yes, informsink (not infosink), trapsink and trapess are snmpd.conf 
parameters that take a host trap receiver as argument. If this host is by 
name, it will try to query DNS.

Hosts is good and negates any DNS query.

If you don't have any IP address or hostnames, where do you get the reverse 
DNS lookup then?

What OS are you using and what is your hosts entry in /etc/nsswitch.conf?

DNS lookups (reverse or straight) are always application dependent, never 
OS. That means that explicit code in the application is used to invoke it. 
DNS implementation is OS depended. Smtp servers (mail) use reverse DNS 
sometimes to verify sender address.

BR,
Nikos
- Original Message - 
From: "Pete Kelly" 
To: 
Sent: Wednesday, December 31, 2008 1:25 AM
Subject: Re: Timeout while DNS lookups fail


>I don't follow the "Try specifying infosink or trapess by IPaddress"
> comment.  Is this referencing net-snmp configuration settings?
>
> There is nothing on the machine on which net-snmp is running, that
> references either an IP address or a name for the trap senders
> specifically to try and eliminate any DNS lookups.  That includes hosts,
> bind, or resolv.conf.
>
> Thanks,
> Pete
>
> Nikos Balkanas wrote:
>> Try specifying infosink or trapess by IPaddress. It shouldn't query DNS
>> if address is already in dotted format.
>>
>> Cheers,
>> Nikos
>> - Original Message - From: "Pete Kelly" 
>> To: 
>> Sent: Tuesday, December 30, 2008 1:37 AM
>> Subject: Timeout while DNS lookups fail
>>
>>
>>> Greetings:
>>>
>>> We are using the tools to collect traps from telephone network
>>> equipment, think cabinet along the highway, where there are lots (could
>>> be hundreds or thousands) of devices, none of which have a reverse DNS
>>> lookup entry.
>>>
>>> There appears to be a mechanism where, with no named running (not
>>> installed) and with an empty resolv.conf file, the traps get delayed
>>> while a reverse DNS query times out.  There appears to be little or no
>>> delay when there are few traps but with numerous devices and many traps
>>> the delay can get quite lengthy.
>>>
>>> Is there a setting to disable this behavior in net-snmp?
>>> or
>>> Is this even a behavior of net-snmp but rather is it related to the
>>> operating system?
>>>
>>> Thanks,
>>> Pete
>>> -- 
>>> Pete Kelly
>>> Cordell Inc.
>>> 909-971-9100
>>>
>>> --
>>>
>>> ___
>>> 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
>
> --
> ___
> 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 


--
___
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: Timeout while DNS lookups fail

2008-12-30 Thread Nikos Balkanas
Try specifying infosink or trapess by IPaddress. It shouldn't query DNS if 
address is already in dotted format.

Cheers,
Nikos
- Original Message - 
From: "Pete Kelly" 
To: 
Sent: Tuesday, December 30, 2008 1:37 AM
Subject: Timeout while DNS lookups fail


> Greetings:
>
> We are using the tools to collect traps from telephone network
> equipment, think cabinet along the highway, where there are lots (could
> be hundreds or thousands) of devices, none of which have a reverse DNS
> lookup entry.
>
> There appears to be a mechanism where, with no named running (not
> installed) and with an empty resolv.conf file, the traps get delayed
> while a reverse DNS query times out.  There appears to be little or no
> delay when there are few traps but with numerous devices and many traps
> the delay can get quite lengthy.
>
> Is there a setting to disable this behavior in net-snmp?
> or
> Is this even a behavior of net-snmp but rather is it related to the
> operating system?
>
> Thanks,
> Pete
> -- 
> Pete Kelly
> Cordell Inc.
> 909-971-9100
>
> --
> ___
> 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 


--
___
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: Question about snmptrapd to bind the same port for IPv4 and IPv6

2008-12-29 Thread Nikos Balkanas
Maybe the port is already in use. Have you checked with netstat before running 
snmptrapd? Does the error appear without specifying udp6?

BR,
Nikos
  - Original Message - 
  From: Hui Zhang 
  To: 'net-snmp-users@lists.sourceforge.net' 
  Sent: Monday, December 22, 2008 10:34 PM
  Subject: Question about snmptrapd to bind the same port for IPv4 and IPv6 


  Hi,

  I have problem to run the snmptrapd from Net-Snmp 5.4.2.1 when I tried to 
bind the same port for  IPv4 and IPv6. I built it using --disable-agent and 
--enable-ipv6.

   

  snmptrapd udp:165,udp6:165

   

   

  It shows “Address already in use”.

   

  Any one has clue? 

   

  Thanks,

   

   

  Hui 



--


  --



--


  ___
  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
--
___
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: Registering a String variable...

2008-12-28 Thread Nikos Balkanas
Please disregard. I found it out at the watched.c example.

BR,
Nikos
  - Original Message - 
  From: Nikos Balkanas 
  To: net-snmp-users@lists.sourceforge.net 
  Sent: Sunday, December 28, 2008 1:55 PM
  Subject: Registering a String variable...


  Hi,

  I don't know how to register string (as in displayString) variables. mib2c 
doesn't work for me. Any examples or example code?

  Thanx,
  Nikos--
___
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


Registering a String variable...

2008-12-28 Thread Nikos Balkanas
Hi,

I don't know how to register string (as in displayString) variables. mib2c 
doesn't work for me. Any examples or example code?

Thanx,
Nikos--
___
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


enum registration

2008-12-28 Thread Nikos Balkanas
Hi,

I am a newbie in snmp coding, vetarn in C. I am struggling through my own code 
since mib2c doesn't work (Solaris 10.5, snmpd 5.4.1).

I am registering an enum scalar, but I don't know how to restrict snmpset just 
to the enum values:


static enum
{
notConnected,
run,
suspend,
isolate,
restart,
shut
} setMode;

netsnmp_register_int_instance("setMode",
mode_oid,
OID_LENGTH(mode_oid),
&setMode, NULL);

Server2:~/work/kannel/snmp-> snmpset 127.0.0.1 setMode = 15
IANWAP-MIB::setMode = INTEGER: 15

It should accept SET only for 0 - 5. Any ideas?

Thanx,
Nikos--
___
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: starting snmpd daemon

2008-12-26 Thread Nikos Balkanas
Yes I may have a guess.
Your environment is different when you run as a user. In particular It doesn't 
look you are reading your mibs from sbmp.conf during startup.

BR,
Nikos
  - Original Message - 
  From: Ambika Tripathy 
  To: net-snmp-users@lists.sourceforge.net 
  Sent: Friday, December 26, 2008 1:42 PM
  Subject: starting snmpd daemon


  Hi Users,

   

  I am facing a peculiar problem when I try to start my snmpd using rc.d. The 
problem is when I try to extract OID values using snmpwalk for my enterprise 
OID it is always coming as 0. But when I execute the snmpd manually from 
command line the perfect values are coming.

   

  My SNMPD file present in /etc/init.d/ and it looks like:

   

  #! /bin/sh -e

  # Check for daemon presence

   

  export PATH=/sbin:/usr/local/sbin:/bin:/usr/local/bin

   

  . /lib/lsb/init-functions

  test -x /usr/local/sbin/snmpd || exit 0

  test -x /usr/local/sbin/snmptrapd || exit 0

   

   

  TRAPDRUN=no

  TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'

   

  # Cd to / before starting any daemons.

  cd /

   

   

   

  case "$1" in

start)

  echo -n "Starting network management services:"

  if [ "$SNMPDRUN" = "yes" -a -f /usr/local/share/snmp/snmpd.conf ]; then

#start-stop-daemon --quiet --start --exec /usr/local/sbin/snmpd &

/usr/local/sbin/snmpd

echo -n " snmpd"

  fi

  if [ "$TRAPDRUN" = "yes" -a -f /usr/local/share/snmp/snmptrapd.conf ]; 
then

start-stop-daemon --quiet --start --exec /usr/local/sbin/snmptrapd  -- 
$TRAPDOPTS &

echo -n " snmptrapd"

  fi

  echo "."

  ;;

stop)

  echo -n "Stopping network management services:"

  start-stop-daemon --quiet --stop --oknodo --exec /usr/local/sbin/snmpd

  echo -n " snmpd"

  start-stop-daemon --quiet --stop --oknodo --exec /usr/local/sbin/snmptrapd

  echo -n " snmptrapd"

  echo "."

  ;;

*)

 log_success_msg "Usage: /etc/init.d/snmpd {start|stop}"

 exit 1

  ;;esac

  exit 0

   

  Does anyone have any idea about the cause?

   

  Br,

  Ambika

   



--


  --



--


  ___
  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
--
___
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: snmp v3 authentication

2008-12-23 Thread Nikos Balkanas
Thanx for the tip.

I had created the rwuser with net-snmp-config, but given the option I didn't 
specify a passphrase. That invalidated the snmpd.conf entry. I believe that 
authors should handle this point more elegantly. What is the use of creating 
a rwuser in snmpd.conf if it is not validated and therefore useless? Except 
maybe for the poor user who sees his name in snmpd.conf, gets a message 
"Unknown user name" and gets completely confused...

I would like to ask another question:
For snmpv3 authentication to complete I need to specify context with 
snmpvacm. When I try (as described in man pages):

snmpvacm -u xxx -A x -l authNoPriv localhost createSec2Group 3 xxx 
RWGroup

I get:

Error in packet.
Reason: inconsistentValue (The set value is illegal or unsupported in some 
way)
Failed object: SNMP-VIEW-BASED-ACM-MIB::vacmSecurityToGroupStatus.3."xxx"

If I try any other model other than 3 it succeeds. But according to man 
pages we are not allowed to use any other value than 3 (snmp v3).

BR,
Nikos

- Original Message - 
From: "Thomas Anders" 
To: "Nikos Balkanas" 
Cc: 
Sent: Tuesday, December 23, 2008 12:29 AM
Subject: Re: snmp v3 authentication


> Nikos Balkanas wrote:
>> Server2:~/work/.../snmp/tutorial-> snmpget -v 3 -u  127.0.0.1
>> sysUpTime.0
>> snmpget: Unknown user name (Sub-id not found: (top) -> sysUpTime)
>>
>> But I give user-name ()! snmpd is 5.4.1 and os is Solaris 10.5. I
>> also specify noAuthNoPriv in snmp.conf
>
> The *agent* (SNMP daemon) responded that it doesn't know that user and 
> snmpget displayed that result. Please check your agent configuration.
>
>
> +Thomas 


--
___
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: Broken mib2c ifTable make?

2008-12-22 Thread Nikos Balkanas
Thanks again. With Christmas Holidays just around the corner, tutorials not 
working and project deadline on the 10th of January, it is easy to loose 
hope

1) Unfortunately wiki pages point to these tutorials:
from: http://www.net-snmp.org/wiki/index.php/TUT:mib2c_General_Overview

...of the code (the MFD configuration file is the latest step towards this 
goal - see the MFD tutorial here).

or

General mib2c overview->mib2c.mfd.conf tutorial

Both of them link to the legacy: 
http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mfd/ that I used.

Has anybody tried doing it? Does it work or do you get the same undefined 
references as I do?

2) The files, as described in the tutorial, are generated by mib2c using 
just the MIB file. Is mib2c broken? I definitely run it against the 5.4.1 
agent I mentioned. This is from a binary Solaris package which came with the 
distro. I will try downloading and compiling the latest agent. Generated 
files:

defaults
ifTable-README-FIRST.txt
ifTable-README-ifTable.txt
ifTable.c
ifTable.h
ifTable_Makefile
ifTable_data_access.c
ifTable_data_access.h
ifTable_data_get.c
ifTable_data_get.h
ifTable_data_get.o
ifTable_data_set.c
ifTable_data_set.h
ifTable_data_set.o
ifTable_enums.h
ifTable_interface.c
ifTable_interface.h
ifTable_oids.h
ifTable_subagent.c

- Original Message - 
From: "Mike Ayers" 
To: "Nikos Balkanas" ; 

Sent: Tuesday, December 23, 2008 12:11 AM
Subject: RE: Broken mib2c ifTable make?


> From: Nikos Balkanas [mailto:nbalka...@gmail.com]
> Sent: Monday, December 22, 2008 1:57 PM

> First of all thanks for replying. With the low traffic in the
> group I was
> thinking it a lost cause.

You need much more patience than that...

> These are the exact directions from the tutorial:
>
> http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mfd/if-mib
> /ifTable/testing.html

Looking further up the tree, http://www.net-snmp.org/tutorial/tutorial-5/ 
accurately states, "Note Well: Most of these tutorials have been replaced by 
wiki versions of the same tutorials and most of these pages are now out of 
date by comparison. Please see the wiki Tutorials instead."

> Plus there is only one directory. make -f simply states to use the
> particular Makefile, not the default "Makefile".

I have no idea where those files came from, but I doubt they build against 
the current agent.


HTH,

Mike 


--
___
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: Broken mib2c ifTable make?

2008-12-22 Thread Nikos Balkanas
Thanks for replying.

There is no config.log. This is from a binary Solaris package from the 
distribution of Solaris 10.5.

I downloaded the mib from the tutorial web site and I run mib2c on it. For 
the first error, the offending lines are:

** ./ifTable_data_access.c ***
315:(rowreq_ctx->data.ifDescr_len <
316: (ifDescr_len* sizeof(ifDescr[0] {
320:rowreq_ctx->data.ifDescr_len = ifDescr_len* sizeof(ifDescr[0]);
321:memcpy( rowreq_ctx->data.ifDescr, ifDescr, ifDescr_len* 
sizeof(ifDescr[0]) );

that is undefined ifDescr_len in lines 316,320 and 321.

I grepped around all the source code that mib2c generated, and I couldn't 
find any references of ifDescr_len (ifdef or otherwise). Except in table.h 
within the data structure (line 315 is valid). No wonder it fails.

Have you managed to run the Tutorial? Is mib2c any good?

http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mfd/if-mib/ifTable/testing.html

BR,
Nikos
- Original Message - 
From: "Brian A. Seklecki" 
To: "Nikos Balkanas" 
Cc: 
Sent: Monday, December 22, 2008 10:07 PM
Subject: Re: Broken mib2c ifTable make?


>
>
>
> On Mon, 22 Dec 2008, Nikos Balkanas wrote:
>
>> Any ideas? Anyone?
>>
>
> pastebin your config.log
>
> I'm guessing there's a missing dependency that is erroneously failing
> non-critical (some kind of #ifdef insanity)
>
> ~BAS
>
>
>> BR,
>> Nikos
>>  - Original Message -
>>  From: Nikos Balkanas
>>  To: net-snmp-users@lists.sourceforge.net
>>  Sent: Monday, December 22, 2008 9:02 AM
>>  Subject: Broken mib2c ifTable make?
>>
>>
>>  Hi,





> --
>





> ___
> 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
> 


--
___
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: Broken mib2c ifTable make?

2008-12-22 Thread Nikos Balkanas
First of all thanks for replying. With the low traffic in the group I was 
thinking it a lost cause.

These are the exact directions from the tutorial:

http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mfd/if-mib/ifTable/testing.html

Plus there is only one directory. make -f simply states to use the 
particular Makefile, not the default "Makefile".

BR,
Nikos
- Original Message - 
From: "Mike Ayers" 
To: "Nikos Balkanas" ; 

Sent: Monday, December 22, 2008 10:18 PM
Subject: RE: Broken mib2c ifTable make?


> From: Nikos Balkanas [mailto:nbalka...@gmail.com]
> Sent: Monday, December 22, 2008 11:58 AM

> make -f ifTable_Makefile

I don't think you can do that.  I believe you must perform `make` in the top 
level directory and make everything.


HTH,

Mike 


--
___
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: Broken mib2c ifTable make?

2008-12-22 Thread Nikos Balkanas
Any ideas? Anyone?

BR,
Nikos
  - Original Message - 
  From: Nikos Balkanas 
  To: net-snmp-users@lists.sourceforge.net 
  Sent: Monday, December 22, 2008 9:02 AM
  Subject: Broken mib2c ifTable make?


  Hi,

  I am very new to snmp coding. I am going through the mib2c ifTable tutorial. 
My OS is Solaris 10.5 w/snmpd 5.4.1.

  Everything goes fine until the make command:

  make -f ifTable_Makefile
  gcc -I. `net-snmp-config --base-cflags` -Wall -Wstrict-prototypes   -c -o 
ifTable_data_access.o ifTable_data_access.c
  ifTable_data_access.c: In function `ifTable_container_load':
  ifTable_data_access.c:316: error: `ifDescr_len' undeclared (first use in this 
function)
  ifTable_data_access.c:316: error: (Each undeclared identifier is reported 
only once
  ifTable_data_access.c:316: error: for each function it appears in.)
  ifTable_data_access.c:316: error: `ifDescr' undeclared (first use in this 
function)
  ifTable_data_access.c:328: error: `ifType' undeclared (first use in this 
function)
  .
  .
  .

  I couldn't find anything in the FAQ or the mail archives. Help needed 
urgently.

  Thanx,
  Nikos
--
___
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


MIB help

2008-12-22 Thread Nikos Balkanas
Hi,

I am fairly new to snmp programming. I have developed my mibs. They pass OK 
through snmptranslate and smilint. However, the agent doesn't seem to load them:

Server2:~/work/.../snmp/tutorial-> snmpget -v 2c -c  127.0.0.1 sysUpTime.0
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (3467) 0:00:34.67  (OK)

Server2:~/work/.../snmp/mib2c-> snmptranslate -On IANWAP-MIB::ianCcmFlsDlr.0
.1.3.6.1.4.1.8843.1.1.1.2.0
Server2:~/work/.../snmp/mib2c-> snmpget -v 2c -c  127.0.0.1 
IANWAP-MIB::ianCcmFlsDlr.0
IANWAP-MIB::ianCcmFlsDlr.0 = No Such Object available on this agent at this OID 
 (NOK)

Server2:~/work/.../snmp/mib2c-> snmpwalk -v 1 -c  127.0.0.1 | grep 
ianCcmFlsDlr
HOST-RESOURCES-MIB::hrSWRunParameters.26236 = STRING: "ianCcmFlsDlr"

snmpd is 5.4.1, OS is Solaris 10.5. ~/.snmp.conf:

defVersion 3
defSecurityName
defSecurityLevelnoAuthNoPriv
mibs +IAN-SMI-MIB:IANWAP-MIB:NET-SNMP-TUTORIAL-MIB

I would appreciate any advise.

Thanx,
Nikos
--
___
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


snmp v3 authentication

2008-12-21 Thread Nikos Balkanas
Hi,

I don't seem to be able to make snmp v3 authentication work. Command line 
messages snmpget are very cryptic and not helpful:

Server2:~/work/.../snmp/tutorial-> snmpget -v 2c -c  127.0.0.1 sysUpTime.0
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (3467) 0:00:34.67

Server2:~/work/.../snmp/tutorial-> snmpget -v 3 -u  127.0.0.1 sysUpTime.0
snmpget: Unknown user name (Sub-id not found: (top) -> sysUpTime)

But I give user-name ()! snmpd is 5.4.1 and os is Solaris 10.5. I also 
specify noAuthNoPriv in snmp.conf

Thanx,
Nikos

~/.snmp/snmp.conf:
defVersion 3
defSecurityName
defSecurityLevelnoAuthNoPriv
mibs +NET-SNMP-TUTORIAL-MIB

/usr/local/share/snmp/snmpd.conf:
###
#
# snmpd.conf
#
#   - created by the snmpconf configuration program
#
###
# SECTION: Access Control Setup
#
#   This section defines who is allowed to talk to your running
#   snmp agent.

# rwuser: a SNMPv3 read-write user
#   arguments:  user [noauth|auth|priv] [restriction_oid]

rwuser  

# rwcommunity: a SNMPv1/SNMPv2c read-write access community name
#   arguments:  community [default|hostname|network/bits] [oid]

rwcommunity  


dlmod nstAgentPluginObject 
/export/home/nbal/work/kannel/snmp/tutorial/nstAgentPluginObject.so



###
# SECTION: Monitor Various Aspects of the Running Host
#
#   The following check up on various aspects of a host.

# proc: Check for processes that should be running.
# proc NAME [MAX=0] [MIN=0]
#...
# NAME:  the name of the process to check for.  It must match
#exactly (ie, http will not find httpd processes).
# MAX:   the maximum number allowed to be running.  Defaults to 0.
# MIN:   the minimum number to be running.  Defaults to 0.
#...
#   The results are reported in the prTable section of the UCD-SNMP-MIB tree
#   Special Case:  When the min and max numbers are both 0, it assumes
#   you want a max of infinity and a min of 1.

proc  sshd 1 1

# disk: Check for disk space usage of a partition.
#   The agent can check the amount of available disk space, and make
#   sure it is above a set limit...
#...
#disk PATH [MIN=10]
#...
#PATH:  mount path to the disk in question.
#MIN:   Disks with space below this value will have the Mib's errorFlag set.
#   Can be a raw byte value or a percentage followed by the %
#   symbol.  Default value = 10.
#...
#   The results are reported in the dskTable section of the UCD-SNMP-MIB tree

disk  / 1000
disk  /tmp 4

# SECTION: System Information Setup
#
#   This section defines some of the information reported in
#   the "system" mib group in the mibII tree.

# syslocation: The [typically physical] location of the system.
#   Note that setting this value here means that when trying to
#   perform an snmp SET operation to the sysLocation.0 variable will make
#   the agent return the "notWritable" error code.  IE, including
#   this token in the snmpd.conf file will disable write access to
#   the variable.
#   arguments:  location_string

# syscontact: The contact information for the administrator
#   Note that setting this value here means that when trying to
#   perform an snmp SET operation to the sysContact.0 variable will make
#   the agent return the "notWritable" error code.  IE, including
#   this token in the snmpd.conf file will disable write access to
#   the variable.
#   arguments:  contact_string

# sysservices: The proper value for the sysServices object.
#   arguments:  sysservices_number

sysservices 76



###
# SECTION: Trap Destinations
#
#   Here we define who the agent will send traps to.

# informsink: A SNMPv2c inform (acknowledged trap) receiver
#   arguments: host [community] [portnum]

# trapcommunity: Default trap sink community to use
#   arguments: community-string

trapcommunity  
# authtrapenable: Should we send traps when authentication failures occur
#   arguments: 1 | 2   (1 = yes, 2 = no)

authtrapenable  1







--
___
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


Broken mib2c ifTable make?

2008-12-21 Thread Nikos Balkanas
Hi,

I am very new to snmp coding. I am going through the mib2c ifTable tutorial. My 
OS is Solaris 10.5 w/snmpd 5.4.1.

Everything goes fine until the make command:

make -f ifTable_Makefile
gcc -I. `net-snmp-config --base-cflags` -Wall -Wstrict-prototypes   -c -o 
ifTable_data_access.o ifTable_data_access.c
ifTable_data_access.c: In function `ifTable_container_load':
ifTable_data_access.c:316: error: `ifDescr_len' undeclared (first use in this 
function)
ifTable_data_access.c:316: error: (Each undeclared identifier is reported only 
once
ifTable_data_access.c:316: error: for each function it appears in.)
ifTable_data_access.c:316: error: `ifDescr' undeclared (first use in this 
function)
ifTable_data_access.c:328: error: `ifType' undeclared (first use in this 
function)
.
.
.

I couldn't find anything in the FAQ or the mail archives. Help needed urgently.

Thanx,
Nikos
--
___
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


net-snmp 5.1.1 coding

2008-12-21 Thread Nikos Balkanas
Hi,

I am very new to snmp coding. I want to add snmp support to my appllication. I 
hope this is the right list. 
I would prefer to use the shared library approach if possible. I have gone 
through some of the 5.x tutorials in the site and created the MIBS.

Unfortunately the version that I have is 5.1.1, and doesn't seem to understand 
any of the 5.x tutorial directives (dlmod, etc.). Is there any place I could 
find specific 5.1.1 documentation (tutorials, example code, etc.)?

Thanx,
Nikos--
___
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