Re: Help, please. Can't get privacy to work

2004-09-22 Thread Dave Shield

  Ethereal reports that the reply to my encrypted PDU requesting 
  sysLocation is a value of 3 for 
  SNMP-USER-BASED-SM-MIB::usmStatsDecryptionErrors.0.

That would tend to indicate that it's the *agent* that can't
decode the incoming request properly.

  I infer that something about snmpd on my target isn't handling DES
 decryption.  . I know I read somewhere that I have to have
 to build snmpd with SSL to get encryption.

Yes - that's right.
The suite relies on the OpenSSL libraries (or equivalents) to implement
the various encryption algorithms.
   Nothing actually uses Secure Socket Layers as such - it's the
encryption routines themselves that we don't provide.


  How can I prove that snmpd has SSL build in?

U...

   a)   Try
snmpget  UCD-SNMP-MIB::versionConfigureOptions.0

That won't say explicitly, but will indicate how the suite was
configured (which may indicate if it either turned on or turned off
use of OpenSSL).


   b)   ldd  snmpd

That will show you which libraries are being linked to - any mention
of 'libcrypto' or something similar would tend to indicate that it
should support encrption

   c)   nm snmpd | grep -i encrypt

This should list 'sc_encrypt' regardless, but anything else is a Good Sign.

   d)   strings snmpd| grep -i encrypt
strings libnetsnmp.a | grep -i encrypt

If either of these include the message
Encryption support not enabled
(or similar) then you're out of luck.
(or at least would need to reconfigure/recompile)


Though in fact, the remote agent should probably be logging this anyway.
It might also be worth running the remote agent with  '-Dscapi'
and seeing what the debug output says.


A few things for you to try, anyway.


Dave



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Table Get Time Complexity O(k(n^2)) ??

2004-09-22 Thread Dave Shield

 When I try to walk or do table get from the client I get:
 This is like O(k*(n^2) complexity

 How can I make the scan more efficient??


  a)  Use 'snmpbulkwalk' (with v2c/3)
(which will try to get as much as possible in one go)

  b)  Use 'snmptable'
(which will walk the columns in parallel)

  c)  Implement your MIB using something other than the
'iterator' helper (which is not designed for efficiency)

  d)  If the table is stored in the correct order internally,
then set the flag NETSNMP_ITERATOR_FLAG_SORTED
in the initialisation routine:

netsnmp_iterator_info  *iinfo =
 SNMP_MALLOC_TYPEDEF(netsnmp_iterator_info);
iinfo-get_first_data_point = XXX_get_first_data_point;
iinfo-get_next_data_point  = XXX_get_next_data_point;
+   iinfo-flags |= NETSNMP_ITERATOR_FLAG_SORTED;



Dave



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: snmpd crashed by snmpwalk

2004-09-22 Thread John Blake
Title: RE: snmpd crashed by snmpwalk





Jim,
I had the same issue but it was because of a bug in SNMP. If there is no ip address on the interface, then it crashes. My OS is solaris.

http://sourceforge.net/tracker/?group_id=12694=112694=detail=755477



John
-Original Message-
From: Jim Su [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 21, 2004 11:19 PM
To: Net-Snmp-Users
Subject: snmpd crashed by snmpwalk



Hi Greeting:



 I encountered one snmpd crashed due to the snmpwalk timeout at the IF-MIB::ifNumber.0 . All the values before IF-MIB were returned. But there is time out on IF-MIB.

 I ran the snmpwalk to another host. It went through okay. The two systems have different OS level of Linux. The snmpd was developed and build on Linux 2.4.18 and then was 

 installed on Linux 2.4.21-mtd.1 All the snmpwalk on Linux 2.4.18 got returned values and didn't crash the snmpd.

 The system which was crashed by snmpwalk has OS Linux 2.4.21-mtd.1. 


 I have couple questions. If the OS level difference is critical then why the MIB values before IF-MIB are returned
 fine? It should not return anything from the beginning, right? Could it be some specific device interface hard to be recognized on the target machine which causing the crash? 

 However the man page of snmpwalk said - 


 If no OID argument is present, snmpwalk will search MIB-2. If the network entity has an error processing the
 request packet, an error packet will be returned and a message will be shown, helping to pinpoint why the
 request was malformed.


 If the tree search causes attempts to search beyond the end of the MIB, the message End of MIB will be displayed.

 This is how I ran snmpwalk - without giving a OID or name. 


 So if there is some unrecognized device IF on the target system most likely an error message is displayed. Shouldn't caused the crash, right?

 Any pointing to the direction of searching the cause is highly appreciated. Thanks in advance. 


-Jim
 [EMAIL PROTECTED] P1??z?7?f?-?+p)Av{h?h?*.?+ay?h?+y y???!z?(??5?n??%?Mzl??y???0?)j??jx^?m???l?)?




Re: Help, please. Can't get privacy to work

2004-09-22 Thread cnelson
 ...
   How can I prove that snmpd has SSL build in?
 
 U...
 
   a)   Try
   snmpget  UCD-SNMP-MIB::versionConfigureOptions.0
 
 That won't say explicitly, but will indicate how the suite was
 configured (which may indicate if it either turned on or turned off
 use of OpenSSL).

I get:

UCD-SNMP-MIB::versionConfigureOptions.0 = STRING: '--prefix=/usr' 
'--target=powerpc-linux' '--host=powerpc-linux' '--build=i386-pc-linux' 
'--with-endianness=big' '--with-cc=powerpc-linux-gcc' '--with-ar=powerpc-linux-ar' 
'--with-install-prefix=/IPm' '--with-cflags=-O2' '--disable-applications' 
'--disable-scripts' '--with-sys-location=Set location of switch' 
'--with-sys-contact=Set name (and e-mail) of contact for switch' 
'--with-logfile=/var/log/snmpd.log' '--with-default-snmp-version=3' 
'--with-persistent-directory=/var/net-snmp' 'build_alias=i386-pc-linux' 
'host_alias=powerpc-linux' 'target_alias=powerpc-linux'

Which _doesn't_ include ssl explicityly but does include SNMPv3 
(--with-default-snmp-version=3).  It seems that the configure script should either 
include SSL or complain if v3 is enabled and SSL isn't included.

   b)   ldd  snmpd
 
 That will show you which libraries are being linked to - any mention
 of 'libcrypto' or something similar would tend to indicate that it
 should support encrption

Alas, ldd isn't available on my target and ldd on the system where I cross-build 
doesn't seem to recognize the foreign binary as a program:

  $ ldd snmpd
  not a dynamic executable
  $ file snmpd
  snmpd: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1, dynamically 
linked (uses shared libs), stripped

   c)   nm snmpd | grep -i encrypt

  $ nm snmpd
  nm: snmpd: no symbols

 ...
   d)   strings snmpd| grep -i encrypt
   strings libnetsnmp.a | grep -i encrypt

That seems telling:

  $ strings libnetsnmp.so.5.1.1 | grep -i encrypt
  sc_encrypt
  USM encryption error
  Encryption support not enabled.
  sc_encrypt
  Encrypt function not defined.
  Encryption successful.
  couldn't malloc %d bytes for encrypted PDU
  encrypted sPDU
  Failed while parsing encrypted sPDU.


 If either of these include the message
Encryption support not enabled
   (or similar) then you're out of luck.
 (or at least would need to reconfigure/recompile)

OK.  I'll rebuild and see what I see.

 Though in fact, the remote agent should probably be logging this 
 anyway.

Yeah, that would be helpful.

 It might also be worth running the remote agent with  '-Dscapi'
 and seeing what the debug output says.

If rebuilding doesn't work...

 A few things for you to try, anyway.

Thanks.



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


snmptrapd traphandle error

2004-09-22 Thread Fernández Piñas, David

Hi all, I am running a compiled version of snmptrapd (NetSNMP 5.1) on a Windows 2000 
PC.

I get the next error when I specify a traphandle directive at snmptrapd.conf file:

make_tempfile: error creating file /tmp/snmpda01896

Has anybody see this message before? Any suggestion about solving this issue?

Best Regards,

David


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Dave
 Shield
 Sent: Wednesday, September 22, 2004 11:29 AM
 To: Asaf Matan
 Cc: [EMAIL PROTECTED]
 Subject: Re: Table Get Time Complexity O(k(n^2)) ?? 
 
 
 
  When I try to walk or do table get from the client I get:
  This is like O(k*(n^2) complexity
 
  How can I make the scan more efficient??
 
 
   a)  Use 'snmpbulkwalk' (with v2c/3)
   (which will try to get as much as possible in one go)
 
   b)  Use 'snmptable'
   (which will walk the columns in parallel)
 
   c)  Implement your MIB using something other than the
   'iterator' helper (which is not designed for efficiency)
 
   d)  If the table is stored in the correct order internally,
   then set the flag NETSNMP_ITERATOR_FLAG_SORTED
   in the initialisation routine:
 
   netsnmp_iterator_info  *iinfo =
SNMP_MALLOC_TYPEDEF(netsnmp_iterator_info);
   iinfo-get_first_data_point = XXX_get_first_data_point;
   iinfo-get_next_data_point  = XXX_get_next_data_point;
 + iinfo-flags |= NETSNMP_ITERATOR_FLAG_SORTED;
 
 
 
 Dave
 
 
 
 ---
 This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
 Project Admins to receive an Apple iPod Mini FREE for your 
 judgement on
 who ports your project to Linux PPC the best. Sponsored by IBM.
 Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
 ___
 Net-snmp-users mailing list
 [EMAIL PROTECTED]
 Please see the following page to unsubscribe or change other options:
 https://lists.sourceforge.net/lists/listinfo/net-snmp-users
 
---
Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene 
información de carácter confidencial exclusivamente dirigida a su destinatario o 
destinatarios. Queda prohibida su divulgación, copia o distribución a terceros sin la 
previa autorización escrita de Indra. En el caso de haber recibido este correo 
electrónico por error, se ruega notificar inmediatamente esta circunstancia mediante 
reenvío a la dirección electrónica del remitente.

The information in this e-mail and in any attachments is confidential and solely for 
the attention and use of the named addressee(s). You are hereby notified that any 
dissemination, distribution or copy of this communication is prohibited without the 
prior written consent of Indra. If you have received this communication in error, 
please, notify the sender by reply e-mail


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: snmptrapd traphandle error

2004-09-22 Thread Alex Burger
Hi David.
Fernández Piñas, David wrote:
Hi all, I am running a compiled version of snmptrapd (NetSNMP 5.1) on a Windows 2000 
PC.
I get the next error when I specify a traphandle directive at snmptrapd.conf file:
make_tempfile: error creating file /tmp/snmpda01896
Make sure you define a temporary path in 
win32/net-snmp/net-snmp-config.h.  The default path in 5.1 is:

#define NETSNMP_TEMP_FILE_PATTERN /tmp/snmpdXX
Try something like:
#define NETSNMP_TEMP_FILE_PATTERN c:/winnt/temp/snmpdXX
Make sure you use forward slashes, not back slashes.
If you created a c:\tmp folder it should work, but it's better to 
specify the full path as it will not work if you run snmptrapd from a 
different drive letter.

Alex

---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: snmptrapd traphandle error

2004-09-22 Thread Fernández Piñas, David

Thank you Alex, creating the c:\tmp directory (the easiest and quickest solution) has 
done the trick !!


 -Original Message-
 From: Alex Burger
 Sent: Wednesday, September 22, 2004 5:07 PM
 To: Fernández Piñas, David
 Cc: [EMAIL PROTECTED]
 Subject: Re: snmptrapd traphandle error
 
 
 
 Hi David.
 
 Fernández Piñas, David wrote:
  Hi all, I am running a compiled version of snmptrapd 
 (NetSNMP 5.1) on a Windows 2000 PC.
  
  I get the next error when I specify a traphandle directive 
 at snmptrapd.conf file:
  
  make_tempfile: error creating file /tmp/snmpda01896
 
 Make sure you define a temporary path in 
 win32/net-snmp/net-snmp-config.h.  The default path in 5.1 is:
 
 #define NETSNMP_TEMP_FILE_PATTERN /tmp/snmpdXX
 
 Try something like:
 
 #define NETSNMP_TEMP_FILE_PATTERN c:/winnt/temp/snmpdXX
 
 Make sure you use forward slashes, not back slashes.
 
 If you created a c:\tmp folder it should work, but it's better to 
 specify the full path as it will not work if you run snmptrapd from a 
 different drive letter.
 
 Alex
 
 
 
---
Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene 
información de carácter confidencial exclusivamente dirigida a su destinatario o 
destinatarios. Queda prohibida su divulgación, copia o distribución a terceros sin la 
previa autorización escrita de Indra. En el caso de haber recibido este correo 
electrónico por error, se ruega notificar inmediatamente esta circunstancia mediante 
reenvío a la dirección electrónica del remitente.

The information in this e-mail and in any attachments is confidential and solely for 
the attention and use of the named addressee(s). You are hereby notified that any 
dissemination, distribution or copy of this communication is prohibited without the 
prior written consent of Indra. If you have received this communication in error, 
please, notify the sender by reply e-mail


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


ssCpuRawWait on Linux 2.6?

2004-09-22 Thread Darren Gamble
Good day,

Is it possible to have net-snmp return ssCpuRawWait for Linux 2.6 kernels?
Wait CPU is tracked separately than Idle under 2.6, but, this object does
not exist under my agent.

Fedora Core 2, net-snmp-5-1.1 (the included RPM in the distro).  Googling on
this subject just revealed other people asking the same question.

Thanks in advance,


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Help, please. Can't get privacy to work

2004-09-22 Thread cnelson
My agent was missing ssl.  After much pain rebuilding, all it well.  Thanks.



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: waitpid for child processes invoked from agent

2004-09-22 Thread Users
On Mon, 20 Sep 2004 12:30:35 +0800 Jim wrote:
JS I do have the waitpid() routine inside the sa_handler of the daemon
JS which the snmpd get value from. The waitpid is as following - if
JS (waitpid(-1, status, WNOHANG)  0) { return; }

That is your problem. WNOHANG means don't wait for a child that hasn't exited
yet, and will return immediately if the child is still running. And specifying
a parameter of -1 will wait for any child, not necessarily the one you just
ran. Either take out WNOHANG to actually wait for the child to complete, or
periodically call waitpid as you do above to reap defunct processes.


-- 
Robert Story; NET-SNMP Junkie http://www.net-snmp.org/
irc://irc.freenode.net/#net-snmp  
Archive: http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users

You are lost in a twisty maze of little standards, all different. 


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: How to return an snmp error from a table handler routine

2004-09-22 Thread Users
On Mon, 13 Sep 2004 23:01:36 +0530 Virender wrote:
VSC I have used mib2c.iterate.conf to generate code for my tables.
VSC If I do not have a proper value to return for a get/getnext request in the
VSC handler routine and want to return to the request sending application a
VSC 'no name' or 'no such instance' error, how can I do so programatically?
VSC  
VSC I tried returning from the handler without setting the value  ( I set
VSC value using snmp_set_var_typed_value( ) ), but this gives unpredictable
VSC result in case of getnext.

You should be using netsnmp_request_set_error(requests, XXX);

-- 
Robert Story; NET-SNMP Junkie http://www.net-snmp.org/
irc://irc.freenode.net/#net-snmp  
Archive: http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users

You are lost in a twisty maze of little standards, all different. 


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: configure make problems

2004-09-22 Thread Users
On Wed, 22 Sep 2004 10:02:53 -0600 Carlos wrote:
CC  Instead of configuring them out, disable them at startup:
CC snmpd -I 
CC -hr_filesys,hr_swinst,hr_proc,hr_partition,hr_print,etc
CC 
CC Tried this but still getting MIBs dumped.  I don't see anything
CC wrong with the syntax.

Works for me (release 5.1.2):

$ agent/snmpd -Dmib_init -H 21 | grep hr_
mib_init: initializing: hr_system
mib_init: initializing: hr_storage
mib_init: initializing: hr_device
mib_init: initializing: hr_other
mib_init: initializing: hr_proc
mib_init: initializing: hr_network
mib_init: initializing: hr_print
mib_init: initializing: hr_disk
mib_init: initializing: hr_partition
mib_init: initializing: hr_filesys
mib_init: initializing: hr_swrun
mib_init: initializing: hr_swinst

$ agent/snmpd -Dmib_init -I -hr_other,hr_disk -H 21 | grep hr_
mib_init: initializing: hr_system
mib_init: initializing: hr_storage
mib_init: initializing: hr_device
mib_init: skipping: hr_other
mib_init: initializing: hr_proc
mib_init: initializing: hr_network
mib_init: initializing: hr_print
mib_init: skipping: hr_disk
mib_init: initializing: hr_partition
mib_init: initializing: hr_filesys
mib_init: initializing: hr_swrun
mib_init: initializing: hr_swinst


-- 
Robert Story; NET-SNMP Junkie http://www.net-snmp.org/
irc://irc.freenode.net/#net-snmp  
Archive: http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users

You are lost in a twisty maze of little standards, all different. 


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: How to return an snmp error from a table handler routine

2004-09-22 Thread Virender Singh Chauhan
Hi Rob,
Thanks.
And just for the records I found another way.

I can use snmp_set_var_typed_value(var, SNMP_NOSUCHINSTANCE, 0, 0 ) as well.
This too works.

Viren

-Original Message-
From: Robert Story (Users) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 23, 2004 12:56 AM
To: Virender Singh Chauhan
Cc: [EMAIL PROTECTED]
Subject: Re: How to return an snmp error from a table handler routine


On Mon, 13 Sep 2004 23:01:36 +0530 Virender wrote:
VSC I have used mib2c.iterate.conf to generate code for my tables. If I 
VSC do not have a proper value to return for a get/getnext request in 
VSC the handler routine and want to return to the request sending 
VSC application a 'no name' or 'no such instance' error, how can I do 
VSC so programatically?
VSC  
VSC I tried returning from the handler without setting the value  ( I 
VSC set value using snmp_set_var_typed_value( ) ), but this gives 
VSC unpredictable result in case of getnext.

You should be using netsnmp_request_set_error(requests, XXX);

-- 
Robert Story; NET-SNMP Junkie http://www.net-snmp.org/
irc://irc.freenode.net/#net-snmp  
Archive: http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users

You are lost in a twisty maze of little standards, all different. 



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: net-snmp agent and concurrency.

2004-09-22 Thread Users
On Wed, 22 Sep 2004 09:06:37 +0200 Asaf wrote:
AM I have question regarding net-snmp table access concurrency (net-snmp
AM 5.1.2):
AM 
AM If I open two snmp browser and view different table in each one of them.
AM Can one table walk command preempt the other?

A walk is simply a series of get-nexts. The requests for the two will be
intermingled. But only one request will be processed at a time. However, one
request can contain multiple varbinds (eg tableA.x and tableB.y).

-- 
Robert Story; NET-SNMP Junkie http://www.net-snmp.org/
irc://irc.freenode.net/#net-snmp  
Archive: http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users

You are lost in a twisty maze of little standards, all different. 


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: ssCpuRawWait on Linux 2.6?

2004-09-22 Thread Users
On Wed, 22 Sep 2004 12:55:09 -0600 Darren wrote:
DG Is it possible to have net-snmp return ssCpuRawWait for Linux 2.6 kernels?
DG Wait CPU is tracked separately than Idle under 2.6, but, this object does
DG not exist under my agent.

The agent probably hasn't been updated for 2.6. If you are handy with C, take a
hack at fixing it and sending in a patch. Otherwise, write up a bug report.

-- 
Robert Story; NET-SNMP Junkie http://www.net-snmp.org/
irc://irc.freenode.net/#net-snmp  
Archive: http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users

You are lost in a twisty maze of little standards, all different. 


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: ssCpuRawWait on Linux 2.6?

2004-09-22 Thread Darren Gamble
Good day,

 On Wed, 22 Sep 2004 12:55:09 -0600 Darren wrote:
 DG Is it possible to have net-snmp return ssCpuRawWait for Linux 2.6
 kernels?
 DG Wait CPU is tracked separately than Idle under 2.6, but, this object
 does
 DG not exist under my agent.
 
 The agent probably hasn't been updated for 2.6. If you are handy with C,
 take a
 hack at fixing it and sending in a patch. Otherwise, write up a bug
report.

My C is not fantastic, but I'll give it a go.  Could you just point me at
the file(s) I should be looking at?

Thanks,


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: configure make problems

2004-09-22 Thread Carlos Cantu
 $ agent/snmpd -Dmib_init -H 21 | grep hr_

 $ agent/snmpd -Dmib_init -I -hr_other,hr_disk -H 21 | grep hr_

Is mib_init a keyword I need in the options?  I was doing my call as:
snmpd -V -Dagentx -I -hr_other,hr_disk,etc

Thanks.



---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: waitpid for child processes invoked from agent

2004-09-22 Thread Jim Su
Hi Robert:

   Thanks a lot for your kind reply.
   It makes sense to me now. Just one more question to fully clarify this matter. From 
the description from man page. I have feeling that I have to set the value of pid to 
0 - which means to wait for any child process whose process group ID is equal to 
that of  the  calling  process. Meaning my program only wait for the specific child 
processes forked by the parent process. Of course I should take out the WNOHANG. 
   What it happened here is the typical problem while some one  inherit code from some 
existing source and  without fully understanding what exactly the effect of the 
function is. I learn new things every day. I really appreciate your guide. This user 
group list really beneficial to a lot people. You and many others generosity and the 
valuable offering really can't be measured by the material object. I deeply appreciate 
all your help.

-Jim 

-Original Message-
From: Robert Story (Users) [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 23, 2004 3:18 AM
To: Jim Su
Cc: [EMAIL PROTECTED]
Subject: Re: waitpid for child processes invoked from agent


On Mon, 20 Sep 2004 12:30:35 +0800 Jim wrote:
JS I do have the waitpid() routine inside the sa_handler of the daemon
JS which the snmpd get value from. The waitpid is as following - if
JS (waitpid(-1, status, WNOHANG)  0) { return; }

That is your problem. WNOHANG means don't wait for a child that hasn't exited
yet, and will return immediately if the child is still running. And specifying
a parameter of -1 will wait for any child, not necessarily the one you just
ran. Either take out WNOHANG to actually wait for the child to complete, or
periodically call waitpid as you do above to reap defunct processes.


-- 
Robert Story; NET-SNMP Junkie http://www.net-snmp.org/
irc://irc.freenode.net/#net-snmp  
Archive: http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users

You are lost in a twisty maze of little standards, all different. 


Re: ssCpuRawWait on Linux 2.6?

2004-09-22 Thread Users
On Wed, 22 Sep 2004 14:21:53 -0600 Darren wrote:
DG My C is not fantastic, but I'll give it a go.  Could you just point me at
DG the file(s) I should be looking at?

agent/mibgroup/ucd-snmp/vmstat.c


-- 
Robert Story; NET-SNMP Junkie http://www.net-snmp.org/
irc://irc.freenode.net/#net-snmp  
Archive: http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users

You are lost in a twisty maze of little standards, all different. 


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
Net-snmp-users mailing list
[EMAIL PROTECTED]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: snmpd crashed by snmpwalk

2004-09-22 Thread Jim Su
Title: RE: snmpd crashed by snmpwalk



Hi 
John:

 Thanks for the input. I did some 
experiment on my target machine. I asked the owner of the target machine to 
check if there is any card has no IP address. He found one and added the IP 
address. 
 The snmpwalk still crashed the 
system. TheOS isLinux. I am going to build a net-snmp only snmpd 
toexperiement that crashing is as you pointed.Doyou know is 
there any patchavailable? Or if this isfixed in a latest version? 
Mine is 5.1.1, quite new.From your experience is5.1.2 stable 
enough?
 I was told there is no such problem 
in ucd-4.2.5. I may back ward my application toucd-4x. But there is some 
know issues in ucd-4x too. Any suggestion?
 Tx.
-Jim

  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]On Behalf Of John 
  BlakeSent: Wednesday, September 22, 2004 8:44 PMTo: 'Jim 
  Su'; Net-Snmp-UsersSubject: RE: snmpd crashed by 
  snmpwalk
  Jim, I had the same issue 
  but it was because of a bug in SNMP. If there is no ip address on the 
  interface, then it crashes. My OS is solaris.
  http://sourceforge.net/tracker/?group_id=12694atid=112694func=detailaid=755477 
   
  John -Original 
  Message- From: Jim Su [mailto:[EMAIL PROTECTED]] 
  Sent: Tuesday, September 21, 2004 11:19 PM To: Net-Snmp-Users Subject: snmpd crashed by 
  snmpwalk 
  Hi Greeting: 
   I encountered one snmpd crashed due to the 
  snmpwalk timeout at the "IF-MIB::ifNumber.0 ". All the values before IF-MIB 
  were returned. But there is time out on IF-MIB.
   I ran the snmpwalk to another host. It went 
  through okay. The two systems have different OS level of Linux. The snmpd was 
  developed and build on "Linux 2.4.18" and then was 
   installed on "Linux 2.4.21-mtd.1" All the 
  snmpwalk on "Linux 2.4.18" got returned values and didn't crash 
  the snmpd.
   The system which was crashed by snmpwalk 
  has OS "Linux 2.4.21-mtd.1". 
   I have couple questions. If the OS level 
  difference is critical then why the MIB values before IF-MIB are 
  returned  fine? It should not 
  return anything from the beginning, right? Could it be some specific device 
  interface hard to be recognized on the target machine which causing the 
  crash? 
   However the man page of "snmpwalk" said - 
  
   "If no OID 
  argument is present, snmpwalk will search MIB-2. If the network entity 
  has an error processing the  request packet, an error packet 
  will be returned and a message will be shown, helping 
  to pinpoint why the  request was malformed. 
   If the tree 
  search causes attempts to search beyond the end of the MIB, the message "End 
  of MIB" will be displayed."
   This is how I ran 
  snmpwalk - without giving a OID or name. 
   So if there is some 
  unrecognized device "IF" on the target system most likely an error message is 
  displayed. Shouldn't caused the crash, right?
   Any pointing to the 
  direction of searching the cause is highly appreciated. Thanks in advance. 
  
  -Jim  [EMAIL PROTECTED] 
  P1??z?7?f?-?+p)Av{h?h?*.?+ay?h?+y 
  y???!z?(??5?n??%?Mzl??y???0?)j??jx^?m???l?)?