Engine ID discovery

2010-04-06 Thread sanjaykumar
Hi All,
I am going through the Engine ID discovery code.
Could someone explain me about this concept ??
When does it Required ??
How does Engine ID discovery process take place ?
Does it is standard or implementation dependent ???

Rgds,
Sanjay

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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 to configure net-snmp on uclinux(fork vfork)

2010-04-06 Thread Bart Van Assche
2010/4/6 黎明傲子 ll_j...@163.com

 I'm an embedded software engineer,recently I'm porting net-snmp on
 uclinux,my cross-compilation tools is arm-elf-, the configuration as
 follows:



 *./configure --build=i386-linux --host=arm-elf --target=arm-uclinux
 --disable-manuals --disable-applications --disable-scripts -enable-debugging
 --disable-testing --with-endianness=little --with-cc=arm-elf-gcc
 --with-ar=arm-elf-ar
 --prefix=/home/uClinux/AMLY/net-snmp-5.2.5.1/install
 --with-persistent-directory=/var/net-snmp --with-default-snmp-version=3
 --with-sys-contact=contact --with-sys-location=location
 --enable-shared=no --enable-mini-agent --with-ldflags=-elf2flt -Bstatic
 *

 * *

 My build process is successful,but when I run snmpd on my
 board(CPU:S3C2510)failed,as follows:



 *snmpd
 *[ ... ]



 As I know that uClinux does not implement fork(),so I modified the file
 $(net-snmp-5.2.5.1)/ include/net-snmp/net-snmp-config.h add a line #define
 fork vfork, however,I also can’t run snmpd on my board and deadlocks
 happened,so I hope you can give my some advices about this,thanks!


Have you already tried to pass flag -f to snmpd ? That way snmpd doesn't
invoke fork() or vfork(). You can start snmpd e.g. as follows if your shell
supports :

snmpd -f 

Bart.
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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: Engine ID discovery

2010-04-06 Thread Mike Ayers
 From: sanjaykumar [mailto:sanjay.ku...@globaledgesoft.com]
 Sent: Monday, April 05, 2010 11:05 PM

 I am going through the Engine ID discovery code.
 Could someone explain me about this concept ??
 When does it Required ??
 How does Engine ID discovery process take place ?
 Does it is standard or implementation dependent ???

http://datatracker.ietf.org/doc/rfc3414/

Section 4, Discovery, is what you're looking for.


HTH,

Mike

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: Seg fault when querying for the UDP table

2010-04-06 Thread Malathi Panyam

Hi Dave,
 I am still not able to solve the issue.. I tried to omit the 
if-mib in the make file and started seeing the errors like 
./.libs/libnetsnmpmibs.so: undefined reference to `Interface_Scan_Init'
./.libs/libnetsnmpmibs.so: undefined reference to `Interface_Scan_Next'
./.libs/libnetsnmpmibs.so: undefined reference to `run_exec_command'
./.libs/libnetsnmpagent.so: undefined reference to `vacm_standard_views'

I searched the lists and found your suggestion to omit other mibs like at. 
ip but still not able to compile. What other mibs need to be excluded?

With that being said, when we exclude the if-MIB and provide our own 
implementation, we need to provide support for these dependent mibs also?

Please help..

Regards,
Malathi


--- On Fri, 4/2/10, Malathi Panyam malathipan...@yahoo.com wrote:

From: Malathi Panyam malathipan...@yahoo.com
Subject: Re: Seg fault when querying for the UDP table
To: Dave Shield d.t.shi...@liverpool.ac.uk
Cc: net-snmp-users@lists.sourceforge.net
Date: Friday, April 2, 2010, 2:58 PM

Hi Dave,
 Further to my observations below, the line of the debug out put 
says 

trace: trace: ifTable_index_to_oid(): if-mib/ifTable/ifTable_interface.c, 432:
ifTable_index_to_oid(): if-mib/ifTable/ifTable_interface.c, 432:
verbose:ifTable:ifTable_index_to_oid: verbose:ifTable:ifTable_index_to_oid: 
called
called 

I would like to know, when I exclude the ifTable from the agent, why it has to 
ask the agent code for the ifTable details? it should be asking my
 subagent code right? 

While excluding the ifTable, I was excluding only at run time using 
I-ifTable, do we need to disable the IF-MIB in Net SNMP make file as well?? 
I tried doing that but it has other dependencies on other MIBs namely IP-MIB 
and it wont compile..

Am I in the right path?

Thanks and Regards,
Malathi

From: Malathi Panyam malathipan...@yahoo.com
To: Dave Shield d.t.shi...@liverpool.ac.uk
Cc: net-snmp-users@lists.sourceforge.net
Sent: Thu, April 1, 2010 9:19:26 AM
Subject: Re: Seg fault when querying for the UDP table


Hi Dave,
    If I dont use -DALL, I do not see any debug out other than the seg 
fault message.

This time I tried running only the standard agent and including all the 
modules.. Everything works fine. udpTable shows up without any issues..

The moment I exclude the ifTable it starts giving the segfault. So it looks 
like when I exclude the ifTable from the agent I should take care of 
something more??
Do we need to handle any other MIB code when ifTable is implemented by 
subagent? What are the other dependencies? 

Thanks for all your efforts.

Regards,
Malathi

From: Dave Shield d.t.shi...@liverpool.ac.uk
To: Malathi Panyam malathipan...@yahoo.com
Cc: net-snmp-users@lists.sourceforge.net
Sent: Thu, April 1, 2010 12:26:26 AM
Subject: Re: Seg fault when querying for the UDP table


On 31 March 2010 23:30, Malathi Panyam malathipan...@yahoo.com wrote:
     I tried using the debug flags you provided

No - you turned on *ALL* debugging.
So any useful information promptly gets buried in a mass of output.

There's also not a lot of point in turning on the udpEndpointTable
debug output if you also disable this module altogether.

I suggested that you turned on debugging, *OR* disabled the
module - two mutually exclusive alternatives.

Please try the original suggestion first - enable the selected
debugging tokens *only*, and leave all modules active.



 I would like to mention I do override the ifTable and ifXTable functionality
 in my subagent code..and we use Net SNMP
 5.4.2.1.

What happens if you don't run
 your subagent?
Try *just* starting the standard Net-SNMP agent, and
run a GetNext on the udpEndpointTable.

Does the agent crash?
What does the debug output look like?

Dave




  



  


  --
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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


hrStorage returns zero size values on all units

2010-04-06 Thread Perzon Berry
Hello

I have a problem with getting any size values from snmp. I have other
linux servers on other plattforms, and configuration/commands are used
in the same way and everything works as designed there. But on this
specific server, nothing is returned. I have tried to increase the
logging of snmpd but nothing relative gets logged about this error.

Kernel 2.6.18
Net-snmp 5.3.2.2
Plattform ppc64

Returned value from snmpwalk
HOST-RESOURCES-MIB::hrStorageIndex.1 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageIndex.2 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageIndex.3 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageIndex.4 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageIndex.5 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageIndex.6 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageType.1 = OID:
HOST-RESOURCES-TYPES::hrStorageOther
HOST-RESOURCES-MIB::hrStorageType.2 = OID:
HOST-RESOURCES-TYPES::hrStorageRam
HOST-RESOURCES-MIB::hrStorageType.3 = OID:
HOST-RESOURCES-TYPES::hrStorageVirtualMemory
HOST-RESOURCES-MIB::hrStorageType.4 = OID:
HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.5 = OID:
HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageType.6 = OID:
HOST-RESOURCES-TYPES::hrStorageNetworkDisk
HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Memory Buffers
HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Real Memory
HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Swap Space
HOST-RESOURCES-MIB::hrStorageDescr.4 = STRING: /
HOST-RESOURCES-MIB::hrStorageDescr.5 = STRING: /boot
HOST-RESOURCES-MIB::hrStorageDescr.6 = STRING: /pub
HOST-RESOURCES-MIB::hrStorageAllocationUnits.1 = INTEGER: 0 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.2 = INTEGER: 0 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.3 = INTEGER: 0 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.4 = INTEGER: 0 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.5 = INTEGER: 0 Bytes
HOST-RESOURCES-MIB::hrStorageAllocationUnits.6 = INTEGER: 0 Bytes
HOST-RESOURCES-MIB::hrStorageSize.1 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageSize.2 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageSize.3 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageSize.4 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageSize.5 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageSize.6 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.1 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.2 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.3 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.4 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.5 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageUsed.6 = INTEGER: 0
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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: Engine ID discovery

2010-04-06 Thread Dave Shield
On 6 April 2010 07:04, sanjaykumar sanjay.ku...@globaledgesoft.com wrote:
            I am going through the Engine ID discovery code.
 Could someone explain me about this concept ??

In order to use SNMPv3, it's necessary to know the engineID of the
agent (or strictly speaking, the authoritative SNMP engine - which is
the agent for GET* and SET requests).

One way to do this is to specify the engine ID explicitly
(e.g. via the -e command line option).   A number of other
SNMP toolkits work this way.

But the Net-SNMP code attempts to probe the remote agent
to discover this value, by sending a request without the engineID
in place.This request will fail, but the response that comes back
includes the engine ID (and possibly the boot count/uptime values
as well).
   The client can then re-send the request including this information,
and hopefully the request should then succeed.


Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: hrStorage returns zero size values on all units

2010-04-06 Thread Dave Shield
On 6 April 2010 07:31, Perzon Berry berry.per...@axfood.se wrote:
 I have a problem with getting any size values from snmp. I have other linux
 servers on other plattforms, and configuration/commands are used in the same
 way and everything works as designed there. But on this specific server,
 nothing is returned.

Is this the only PPC64 system you're running?
Or do you have other similar architectures that are working correctly?

What version of Linux are you running?

Is this code that you compiled yourself, or are you using
the vendor-supplied version of the agent?


 I have tried to increase the logging of snmpd but
 nothing relative gets logged about this error.

How exactly did you increase the logging?
What have you tried, and what did it report?


 Returned value from snmpwalk
 HOST-RESOURCES-MIB::hrStorageIndex.1 = INTEGER: 0
 HOST-RESOURCES-MIB::hrStorageIndex.2 = INTEGER: 0
 HOST-RESOURCES-MIB::hrStorageIndex.3 = INTEGER: 0
:

These are meant to be reporting the index for each row - i.e. repeating
the final number from the OID.  If this is returning 0 instead, that seems
to show something seriously wrong.

Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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


AW: snmptrapd.conf format1 and format2 tokens not being used?!

2010-04-06 Thread Schaatsbergen, Chris
 On Tue, 23 Mar 2010 16:06:19 +0100, Schaatsbergen, Chris 
 chris.schaatsber...@aleo-solar.de said:

CS format1 '%y-%m-%l ?%h:%j:%k ?%b ?%P ?%N ?%W ?%v\n' format2 '%y-%m-%l
CS ?%h:%j:%k ?%b ?%P ?%N ?%W ?%v\n' authCommunity log Cisco logOption f
CS /var/run/snmp-traps

CS But I tried loads of different settings for the formats already.

WH 1) Did you set the formatting for the SNMPv2 traps too?  IE, are you
   sure you're getting SNMPv1 traps in the first place?

WH 2) Make sure your config file is being read.  Run snmptrapd with -f -Le
   -Dread_config to see what it's doing.

Greetings Wes,

Thanks for your reply. 

I thought that was what the format2 was for? It is also in my original request, 
but I am very certain I get both SNMPv1 and SNMPv2 traps and neither work. Here 
is an excerpt of the config_read:

read_config: reading normal configuration tokens
read_config:  config path used for 
snmptrapd:/etc/snmp:/usr/share/snmp:/usr/lib/   
   snmp:/root/.snmp (persistent 
path:/var/lib/snmp)
read_config:  config dir: /etc/snmp
read_config: Reading configuration /etc/snmp/snmptrapd.conf
read_config: /etc/snmp/snmptrapd.conf:19 examining: format1 %V\n% Agent 
Address:
   %A \n Agent Hostname: %B \n Date: %H - %J - %K - %L - %M - %Y \n 
Enterprise OID  
: %N \n Trap Type: %W \n Trap Sub-Type: %q \n Community/Infosec 
Context: %P \n U
  ptime: %T \n Description: %W \n PDU Attribute/Value Pair 
Array:\n%v \n - 
 - \n
read_config: Found a parser.  Calling it: format1 / %V\n% Agent Address: %A \n 
A  
gent Hostname: %B \n Date: %H - %J - %K - %L - %M - %Y \n Enterprise OID: %N \n 
  
Trap Type: %W \n Trap Sub-Type: %q \n Community/Infosec Context: %P \n Uptime: 
%  
T \n Description: %W \n PDU Attribute/Value Pair Array:\n%v \n -- \n
read_config: /etc/snmp/snmptrapd.conf:20 examining: format2 %V\n% Agent 
Address:
   %A \n Agent Hostname: %B \n Date: %H - %J - %K - %L - %M - %Y \n 
Enterprise OID  
: %N \n Trap Type: %W \n Trap Sub-Type: %q \n Community/Infosec 
Context: %P \n U
  ptime: %T \n Description: %W \n PDU Attribute/Value Pair 
Array:\n%v \n - 
 - \n
read_config: Found a parser.  Calling it: format2 / %V\n% Agent Address: %A \n 
A  
gent Hostname: %B \n Date: %H - %J - %K - %L - %M - %Y \n Enterprise OID: %N \n 
  
Trap Type: %W \n Trap Sub-Type: %q \n Community/Infosec Context: %P \n Uptime: 
%  
T \n Description: %W \n PDU Attribute/Value Pair Array:\n%v \n -- \n
read_config: /etc/snmp/snmptrapd.conf:21 examining: authCommunity log Cisco
read_config: Found a parser.  Calling it: authCommunity / log Cisco
read_config: /etc/snmp/snmptrapd.conf:22 examining: logOption s 1
read_config: Found a parser.  Calling it: logOption / s 1
read_config: /etc/snmp/snmptrapd.conf:23 examining: logOption f 
/var/run/snmp-tr
  aps
read_config: Found a parser.  Calling it: logOption / f /var/run/snmp-traps
read_config: /etc/snmp/snmptrapd.local.conf: No such file or directory

I cannot see any error messages or such in there. As I mentioned, I have tried 
different formatting options, even very basic ones but nothing seems to work.

Thanks again,

Chris Schaatsbergen

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: hrStorage returns zero size values on all units

2010-04-06 Thread Perzon Berry
 I have a problem with getting any size values from snmp. I have other

 linux servers on other plattforms, and configuration/commands are
used 
 in the same way and everything works as designed there. But on this 
 specific server, nothing is returned.

 Is this the only PPC64 system you're running?
 Or do you have other similar architectures that are working correctly?

Yes, this is the only PPC64 system that I'm running. The others are
using x86_64

 What version of Linux are you running?

Redhat EL5

 Is this code that you compiled yourself, or are you using the
vendor-supplied version of the agent?

Vendor-supplied. I'll probably try to complie my own version and see if
I get the same result.


 I have tried to increase the logging of snmpd but nothing 
 relative gets logged about this error.

 How exactly did you increase the logging?
 What have you tried, and what did it report?

Basicly, I just started snmpd without forking to background and made
sure that all output came on stdout. Nothing more fancy than that

 Returned value from snmpwalk
 HOST-RESOURCES-MIB::hrStorageIndex.1 = INTEGER: 0
 HOST-RESOURCES-MIB::hrStorageIndex.2 = INTEGER: 0
 HOST-RESOURCES-MIB::hrStorageIndex.3 = INTEGER: 0
:

 These are meant to be reporting the index for each row - i.e.
repeating the final number from the OID.  If this is returning 0
instead, that seems to show something seriously wrong.

 Dave

Berry

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: hrStorage returns zero size values on all units

2010-04-06 Thread Dave Shield
On 6 April 2010 08:51, Perzon Berry berry.per...@axfood.se wrote:
 How exactly did you increase the logging?
 What have you tried, and what did it report?

 Basicly, I just started snmpd without forking to background and made
 sure that all output came on stdout. Nothing more fancy than that

Please try running snmpd using the debug options-Dhost,mem
and query the hrStorageTable again.   What does the agent report?

Are you running this as root, or as a normal user?

Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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


SV: hrStorage returns zero size values on all units

2010-04-06 Thread Perzon Berry
 Please try running snmpd using the debug options-Dhost,mem
 and query the hrStorageTable again.   What does the agent report?

Starting snmpd with the following command: /usr/sbin/snmpd -f -Lo
-Dhost,mem
Running the query with snmpget to minimize a long debug output. (let me
know if you want the entire snmpwalk output) snmpget -v 2c -c public
127.0.0.1 hrStorageSize.4 (.4 should return the size for '/' filesystem)

Output from snmpd

registered debug token host, 1
registered debug token mem, 1
NET-SNMP version 5.3.2.2
Connection from UDP: [127.0.0.1]:47105
host/hr_storage: var_hrstoreEntry: HOST-RESOURCES-MIB::hrStorageSize.4 1
(index 1 HOST-RESOURCES-MIB::hrStorageSize.1
(index 2 HOST-RESOURCES-MIB::hrStorageSize.2
(index 3 HOST-RESOURCES-MIB::hrStorageSize.3
(index 4 HOST-RESOURCES-MIB::hrStorageSize.4
host/hr_storage: ... get storage stats
HOST-RESOURCES-MIB::hrStorageSize.4

 Are you running this as root, or as a normal user?

Yes, I'm running as root

Another intressing thing is that I just downloaded the latests src and
compiled it. No errors during the compile. Copied the original
snmpd.conf file and started the fresh-compiled version of net-snmp. All
entired returned successfully. Everything looks like it should. Must be
something wrong the vendor-specific version that Redhat supplies.

Berry

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: hrStorage returns zero size values on all units

2010-04-06 Thread Dave Shield
On 6 April 2010 09:17, Perzon Berry berry.per...@axfood.se wrote:
 Another intressing thing is that I just downloaded the latests src and
 compiled it. No errors during the compile. Copied the original
 snmpd.conf file and started the fresh-compiled version of net-snmp. All
 entired returned successfully. Everything looks like it should. Must be
 something wrong the vendor-specific version that Redhat supplies.


That's good to hear.
  (Well, good for us - less so for you).

It might be worth trying with the 5.3.3 sources, to see whether this
is an issue with the 5.3.x line, which has been solved in later
releases.

Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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


SV: hrStorage returns zero size values on all units

2010-04-06 Thread Perzon Berry
 That's good to hear.
   (Well, good for us - less so for you).
 
 It might be worth trying with the 5.3.3 sources, to see whether this
is an issue with the 5.3.x line, which has been solved in later
releases.

I downloaded and compiled the 5.3.3 version, and it works aswell.
Everything is returned as it should. I will continue to use my compiled
5.5 version, as it works as it should. Thanks for the help in this case.

Best Regards
Berry

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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:Re: how to configure net-snmp on uclinux(fork vfork)

2010-04-06 Thread 黎明傲子



在2010-04-06 14:12:20,Bart Van Assche bvanass...@acm.org 写道:

2010/4/6 黎明傲子 ll_j...@163.com


I'm an embedded software engineer,recently I'm porting net-snmp on uclinux,my 
cross-compilation tools is arm-elf-, the configuration as follows:

 

./configure --build=i386-linux --host=arm-elf --target=arm-uclinux 
--disable-manuals --disable-applications --disable-scripts -enable-debugging 
--disable-testing --with-endianness=little --with-cc=arm-elf-gcc 
--with-ar=arm-elf-ar --prefix=/home/uClinux/AMLY/net-snmp-5.2.5.1/install 
--with-persistent-directory=/var/net-snmp --with-default-snmp-version=3 
--with-sys-contact=contact --with-sys-location=location 
--enable-shared=no --enable-mini-agent --with-ldflags=-elf2flt -Bstatic

 

My build process is successful,but when I run snmpd on my 
board(CPU:S3C2510)failed,as follows:

 

snmpd
[ ... ]

 

As I know that uClinux does not implement fork(),so I modified the file 
$(net-snmp-5.2.5.1)/ include/net-snmp/net-snmp-config.h add a line #define fork 
vfork, however,I also can’t run snmpd on my board and deadlocks happened,so I 
hope you can give my some advices about this,thanks!


Have you already tried to pass flag -f to snmpd ? That way snmpd doesn't invoke 
fork() or vfork(). You can start snmpd e.g. as follows if your shell supports 
:

snmpd -f 

Bart. 

 

Daer Bart:

I’m very glad to receive your reply, thanks! 

As your recommendation, I tried, In that way ,I did can only see one snmpd 
process, but how I can pass flag –c to read my configuration file snmpd.conf  
meanwhile ? 

 

if I do like these:

snmpd –f 

Through the ps command I did can only see one snmpd process but Mib browser 
can’t access my board.

 

snmpd –f

the snmpd process would be blocked, like deadlocks,has no improvement as 
before. 

 

snmpd –f –c /mnt/config/snmpd.conf 

Through the ps command I can’t see the snmpd process and Mib browser  also 
can’t access my board.

 --
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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: Engine ID discovery

2010-04-06 Thread sanjaykumar




Dave Shield wrote:

  On 6 April 2010 07:04, sanjaykumar sanjay.ku...@globaledgesoft.com wrote:
  
  
 I am going through the "Engine ID discovery" code.
Could someone explain me about this concept ??

  
  
In order to use SNMPv3, it's necessary to know the "engineID" of the
agent (or strictly speaking, the "authoritative SNMP engine" - which is
the agent for GET* and SET requests).

One way to do this is to specify the engine ID explicitly
(e.g. via the -e command line option).   A number of other
SNMP toolkits work this way.

But the Net-SNMP code attempts to probe the remote agent
to discover this value, by sending a request without the engineID
in place.This request will fail, but the response that comes back
includes the engine ID (and possibly the boot count/uptime values
as well).
   The client can then re-send the request including this information,
and hopefully the request should then succeed.


Dave

  

Hi Dave,

I am trying to send the snmp-inform to different SNMP-Manager.
But initially Engine ID is unavailable.
So we are sending the inform with WRONG engine ID, once we receive the
REPORT then we update the required data-structure 
then RESENT the inform request and it is working fine. Does it correct approach ???
or is there any standard violation ??

Or i need to discover the engine ID, first by sending the
GET request , Then send the inform request.

rgds,
Sanjay




--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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: Engine ID discovery

2010-04-06 Thread Dave Shield
On 6 April 2010 10:09, sanjaykumar sanjay.ku...@globaledgesoft.com wrote:
 So we are sending the inform with WRONG engine ID,
 once we receive the REPORT then we update the required data-structure
 then RESENT the inform request and it is working fine.  Does it correct
 approach ???

That's essentially the same approach as I described earlier.


 Or i need to discover the engine ID, first  by sending the GET request ,
 Then send the inform request.

It makes no difference whether you send a GET request
or an INFORM request - the message will be rejected in
either case (because it doesn't have the correct engineID).

Each approach will then process the rejection report in
exactly the same way (extracting the engineID and boot
count/uptime values).   So it really doesn't matter whether
you send a GET probe or an INFORM probe - either will
work, and either is valid.

Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: cache load never gets called

2010-04-06 Thread Dave Shield
On 30 March 2010 21:12, Kathy McLeod kmcl...@us.ibm.com wrote:
 I ran the mib2c to generate a cache handler for a file created using
 mib2c.table_data.conf.  The main function still works ok, but even tho I
 set the cache timeout value to -1, it never seems to expire.  I also tested
 with a timeout value of 60 and it didn't expire.  The only debug statements
 I get are the ones in the init and deinit routines.  I am not able to
 figure out what is wrong.

The cache helper is not getting injected into the helper chain correctly.
It needs to be inserted before the handler TABLE_TDATA_NAME
rather than TABLE_DATA_NAME.

I'll tweak the mib2c config file accordingly.

Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: Engine ID discovery

2010-04-06 Thread sanjaykumar




Hi,
  I have a real time situation.
Suppose I have to send inform to an ip addr. On that ip addr, snmptrapd
is not running.  

Approach 1. If we send get request with engine id NULL(engine id
discovery process) , then no response will come. Lets assume our retry
is 3, then we will send 3 get request for engine id discovery. As
response has not come, we will not send the snmp inform  

Approach 2: If we send snmp inform with wrong engine id(complete snmp
inform with all varbinds like device status, time etc), then also no
response will come. Lets assume our retry is 3, then we will send snmp
inform(with wrong engine id and complete varbinds details) 3 times. 

So my question is, if we follow approach
2, then is it valid as per the SNMP standard ??

Regard's
Sanjay 


Dave Shield wrote:

  On 6 April 2010 10:09, sanjaykumar sanjay.ku...@globaledgesoft.com wrote:
  
  
So we are sending the inform with WRONG engine ID,
once we receive the REPORT then we update the required data-structure
then RESENT the inform request and it is working fine. Does it correct
approach ???

  
  
That's essentially the same approach as I described earlier.


  
  
Or i need to discover the engine ID, first by sending the GET request ,
Then send the inform request.

  
  
It makes no difference whether you send a GET request
or an INFORM request - the message will be rejected in
either case (because it doesn't have the correct engineID).

Each approach will then process the rejection report in
exactly the same way (extracting the engineID and boot
count/uptime values).   So it really doesn't matter whether
you send a GET probe or an INFORM probe - either will
work, and either is valid.

Dave

  






--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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: Engine ID discovery

2010-04-06 Thread Dave Shield
On 6 April 2010 11:04, sanjaykumar sanjay.ku...@globaledgesoft.com wrote:
 Suppose I have to send inform to an ip addr. On that ip addr, snmptrapd is
 not running.

Then there's nothing to accept the notification.


 Approach 1. If we send get request with engine id NULL(engine id discovery
 process) , then no response will come. Lets assume our retry is 3, then we
 will send 3 get request for engine id discovery. As response has not come,
 we will not send the snmp inform

Which is reasonable, since there's nothing to accept it.

What I'm not 100% sure about is what happens if snmptrapd *is* running.
It would reject a GET request anyway, since it's a trap receiver, not an
SNMP agent.   But you'd need to work through the SNMPv3 Elements of
Procedure very carefully to check whether the engineID probe handling
is done before the invalid PDU is rejected, or not.

My guess is that it probably is, but I don't claim to be an SNMPv3 expert.
Check the specs.



 Approach 2: If we send snmp inform with wrong engine id(complete snmp inform
 with all varbinds like device status, time etc), then also no response will
 come. Lets assume our retry is 3, then we will send snmp inform(with wrong
 engine id and complete varbinds details) 3 times.

This feels safer - you're sending a probe request that would be accepted
as valid by the receiving engine.   So there's no likelihood that it will be
dropped before returning the error response.
   It *probably* makes no difference, but it feels safer to me.


 So my question is, if we follow approach 2, then is it  valid as per the
 SNMP standard ??

Yes.  I believe so.


Mike - do you wish to comment further?


Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: monitor -S option doesn't work

2010-04-06 Thread Dave Shield
On 1 April 2010 23:13, X Z b...@live.com wrote:
 I am using 5.3.2.2, for RHEL5 x86_64. I tried download the newer source
 (5.5) but it didn't compile on my machine.

Hmmm...  it might be worth trying to identify and fix that problem.
What exactly were the errors?


There were recent patches applied
 to 5.3.2.2, the latest patch is dated on Aug 24, 2009 for memory leak fixes.

That sounds like a RedHat-supplied patch.
We did apply a patch to fix memory leaks in the DisMan code,
but that was back in June 2007.


  If possible, could you please let me know what the patch for the -S
 option so that I can add it to the patch list for 5.3.2.2?

Remember that I've no idea what RedHat have done with our code.
And I don't have a version of 5.3.2.2 to work with.
But the current 5.3.x code certainly handles -S sensibly.

Try downloading and compiling 5.3.3.


(If you've got the source to 5.3.2.2, then the most likely files
to update would be mteTrigger.c, mteTriggerConf.c and mteTriggerTable.c.
See
   
http://net-snmp.svn.sourceforge.net/viewvc/net-snmp/branches/V5-3-patches/net-snmp/agent/mibgroup/disman/event/mteTrigger.c?view=log
   
http://net-snmp.svn.sourceforge.net/viewvc/net-snmp/branches/V5-3-patches/net-snmp/agent/mibgroup/disman/event/mteTriggerConf.c?view=log
   
http://net-snmp.svn.sourceforge.net/viewvc/net-snmp/branches/V5-3-patches/net-snmp/agent/mibgroup/disman/event/mteTriggerTable.c?view=log
for details of recent changes.  But it would probably be
easier to just copy the 5.3.3 versions of these files into the 5.3.2.2
source tree)


Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: Open ssl support.

2010-04-06 Thread Dave Shield
On 12 March 2010 14:04, sudheer mygapula mygapula.sudh...@gmail.com wrote:
 I need to have binaries with inbuild OpenSSL support .

What architecture are you talking about?

We provide binaries for Linux (Fedora 11) and Windows.
Which of these are you referring to?

The Linux binaries should link with the (separate) OpenSSL
libraries that come as part of the operating system.
   I'm not sure what the status is of the Windows binaries.


Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: implement mib with python

2010-04-06 Thread Dave Shield
On 3 April 2010 00:09, Wes Hardaker harda...@users.sourceforge.net wrote:
 TC in the faq, i read this ..the agent can also support MIB modules
 TC implemented in perl or (from 5.4) python.

 Yes, that's an error.  I don't believe anyone has done agent side work
 for python yet.  Just perl.

My apologies.
I've updated the FAQ to correct this misunderstanding.

Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: building 32-bit net-snmp on x86_64-bit kernel Linux

2010-04-06 Thread Dave Shield
On 5 April 2010 16:42,  prakash.mi...@bnymellon.com wrote:
 configure still picking 64 bit perl library.


 my configure command:

 ./configure --with-cflags=-m32 --with-ldflags=-m32

 --with-libs=-L/usr/lib/perl5/5.8.8/i686-linux-thread-multi-64int/CORE/libperl.a

Well, yes - if you explicitly tell it to use the 64-bit version of the
perl library,
then naturally that's what it will pick up.

What happens if you run configure with *just* the cflags and ldflags options?

Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: Strange behavior on linkUpDownNotifications‏

2010-04-06 Thread Dave Shield
2010/3/29 X Z b...@live.com:
 I finally can receive link up/down traps. But here is the strange behavior:
 1. link up/down traps only sent after the snmpd is restarted.  If I don't
 restart snmpd, there were no link up/down traps sent.
 2. There were too many link up/down traps after snmpd is restarted. I
 usually saw 3 link up traps and 6 link down traps even if I only brought
 down and up the interface once.
 3. There were only one coldStart trap and one nsShutdown trap as expected.
 Does anyone know the reason? I search the email archives and seems that
 other people had the same issue before, and one response to the problem was
 that's expected behavior. I don't quite understand why the above behavior
 happened?
 Does anyone know how to make link up/down traps work?


Are you still using your own monitor/event definitions?
Have you tried using the built-in implementation of these traps?
  (i.e. linkUpDownNotifications yes)

Which version of the agent are you using?

Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: Help on Index out of range error ‏

2010-04-06 Thread Dave Shield
2010/4/5 X Z b...@live.com:
 Sorry for the typo. I modified the MIB text so that the index and table name
 are easy to read, but I forgot to change this Index name, it should be
 MyIndex.

No - it should be myIndex.
MIB object names must start with a lower-case letter.



 I got rid of the index out of range error by defining index to be a smaller
 range. It seems 4294967295 is too big for unsigned32.

Hmmm...
That should be OK.

I can certainly query entries in the DisMan Event-MIB mteObjectsTable,
which has an index of syntax Unsigned32 (1..4294967295)



  
 But now I got a
 different error saying that no such instance currently exists at this oid.

Note that this is an error from the agent-side,
The range error will be coming from the snmpget tool,
which probably never even sent a request to the agent.
   (You can check this by adding the '-d' flag, to display a
raw dump of the request and response packets).


 I can do snmpwalk on the same table. So I wonder if it's related
 to the iterator MIB table implementation?

Please post the full text of your MIB module code (as an attachment),
so we can investigate properly.


Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: Seg fault when querying for the UDP table

2010-04-06 Thread Dave Shield
On 2 April 2010 22:58, Malathi Panyam malathipan...@yahoo.com wrote:
 I would like to know, when I exclude the ifTable from the agent, why it has
 to ask the agent code for the ifTable details? it should be asking my
 subagent code right?

No idea.
Let's try and get to the bottom of the -I-ifTable problem first.



 While excluding the ifTable, I was excluding only at run time using
 I-ifTable, do we need to disable the IF-MIB in Net SNMP make file

No.
Disabling this at run time should be sufficient.

I've tried running the current 5.4.x code and disabling the ifTable module,
and this works precisely as expected.   Querying elements within the
ifTable fail, and a walk (or GetNext) will skip over to the next section of
the code.

Can you try with the 5.4.3.rc1 tarball?
Confirm whether this gives you the same error or not?

Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: snmptrapd.conf format1 and format2 tokens not being used?!

2010-04-06 Thread Dave Shield
On 23 March 2010 15:06, Schaatsbergen, Chris
chris.schaatsber...@aleo-solar.de wrote:
 We am running Debian server, net-snmp version 5.4.1.
 The snmptrapd.conf file currently:

 format1 '%y-%m-%l ?%h:%j:%k ?%b ?%P ?%N ?%W ?%v\n'
 format2 '%y-%m-%l ?%h:%j:%k ?%b ?%P ?%N ?%W ?%v\n'


The problem doesn't lie with the format commands themselves,
but with the following directive:

 logOption f /var/run/snmp-traps


If you specify the logging on the command line  (-Lf/var/run/snmp-traps),
you should find that the format settings are applied correctly.

There's something about specifying logOption in the config file that
works in a different manner.   I'll investigate further, and get back to you.

Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: snmpget error?

2010-04-06 Thread Dave Shield
On 2 April 2010 17:24, PEOPLES, MICHAEL P (ATTSI) mp4...@att.com wrote:
 When you walk that branch of the MIB, get the OID that is pointing to value
 you are trying to get.  You might then have to add “.0” or “.1.0” to the
 snmpget.

Adding .0 is typically only relevant for scalar objects
(i.e. a MIB object that is not part of a table).

One of the original design decisions of SNMP is that *all* references to
MIB values should include an index value (called an instance subidentifier).
In the case of tables, this indicates which of potentially multiple copies of
this value is required.
   In the case of scalar objects, there can be only one - so the instance
subidentifier is not strictly necessary.

But the SNMP designers decided to require such an index value anyway,
for consistency with table values.   So all scalar values automatically have
the instance subidentifier .0.



 The whole concept of snmp tables is a mystery to me

They're really not that difficult - particularly if you concentrate on simple
tables first, and think about them by analogy with a programming language.
If you were coding a table in C, you might have a data structure

   struct contact {
   char   name[100];
   int  age;
   char   birthday[20];
   }

and then define an address book as an array of such structures:

   struct contact  myContacts[1000];

You could then refer to individual contacts using something like:

for (i=0; inumContacts; i++) {
if ( today == myContacts[i].birthday ) {
   printf(Happy birthday dear %s\n, Happy birthday to you\n,
myContacts[i].name);
   myContacts[i].age++;
}
}

This uses an integer value (i) to index into the array (myContacts)
and then refers to individual fields within this data structure.


With SNMP, things are much the same, with this data structure being
essentially one row of the table.  The most obvious difference is that
the index comes *after* the field (column) name:

contactName.{i},   contactAge{i},contactBDay.{i}


This is similar to having three parallel arrays:

char contactName[1000][100];
int  contactAge[1000];
char contactBDay[1000][20];

(and yes - I should be using defined constants!)



String-indexed tables are less usual in C, but are reasonably common
in languages like Perl (hashes) where you might easily define a structure
like:

   $month{ January } = 31;
   $month{ February } = 28;
   $month{ March } = 31;
   etc

SNMP might display this information using something like

monthLen.January = INTEGER 31
monthLen.February = INTEGER 28
monthLen.March = INTEGER 31
   etc

which is very similar.

Note that low-down, this would actually be represented using individual
characters for the instance subidentifiers (along with the length of the
string).  So this would actually be

monthLen.5.'M'.'a'.'r'.'c'.'h' = INTEGER 31

(where '5' is the length of the string March).
  That length subidentifier then has an effect on walking the table,
since short index strings (with a small valued for the length subidentifier)
will come before longer index strings (with a higher value).

But the fundamental idea is very similar to Perl hashes.


More complex tables might have multiple indexes (similar
to multi-dimensional arrays in programming languages).
And there are some situations where a string-index may
not include the length subidentifier.
   But those two probably cover the majority of tables you
are likely to encounter.



Hope this helps.

Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: Engine ID discovery

2010-04-06 Thread Wes Hardaker
 On Tue, 6 Apr 2010 11:17:21 +0100, Dave Shield 
 d.t.shi...@liverpool.ac.uk said:

 Approach 1. If we send get request with engine id NULL(engine id discovery
 process) , then no response will come. Lets assume our retry is 3, then we
 will send 3 get request for engine id discovery. As response has not come,
 we will not send the snmp inform

If you read RFC3414 section 4 you'll see, by the way, that an empty
engineID is indeed the right thing to send.  The agent should respond
to any incorrect engineID the same way, but I'd stick with the empty
value as the correct way just to be sure.

DS What I'm not 100% sure about is what happens if snmptrapd *is* running.
DS It would reject a GET request anyway, since it's a trap receiver, not an
DS SNMP agent.   But you'd need to work through the SNMPv3 Elements of
DS Procedure very carefully to check whether the engineID probe handling
DS is done before the invalid PDU is rejected, or not.

It's supposed to be handled in the SNMP engine itself and, again,
RFC3414 says to use a Request message which could be either a trap or
an inform.  Within Net-SNMP we'll accept either as it's caught long
before the application is hit.  That being said, it might be safest to
send the type of packet you expect to eventually send to ensure other
trap receiving implementations that behave differently don't throw out
the packet because it's a GET (they shouldn't be, but.)

 Approach 2: If we send snmp inform with wrong engine id(complete snmp
 inform with all varbinds like device status, time etc), then also no
 response will come. Lets assume our retry is 3, then we will send
 snmp inform(with wrong engine id and complete varbinds details) 3
 times.

DS This feels safer - you're sending a probe request that would be
DS accepted as valid by the receiving engine.

If there is an implementation out there that is being very strict about
engineID probing it could drop this message because it wasn't following
the letter of the text which says and the varBindList left empty.
It'd be safest to send *ONLY* what RFC3414 section 4 describes if you
want to talk to any SNMPv3 implementations that exist.  I would use an
INFORM instead of a GET as discussed above, but both should be legal.

Some other things to note:

1) make sure you understand the difference in engineIDs for traps vs
   informs ( http://www.net-snmp.org/wiki/index.php/TUT:snmptrap_SNMPv3)

2) make sure you understand the security ramifications of even using
   engineID discovery in the first place:

   
http://pontifications.hardakers.net/computers/limitations-of-snmpv3usm-when-combined-with-engineid-discovery/
-- 
Wes Hardaker
Cobham Analytic Solutions

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: SNMPWALK works for the table, but SNMPGET doesn't work

2010-04-06 Thread Wes Hardaker
 On Mon, 5 Apr 2010 16:37:22 -0400, X Z b...@live.com said:

XZ Yes, I did use snmpget for individual entry in the table. E.g. 
XZ I did snmpwalk to get the following:

XZ MY-MIB::myTableEntry1.1=1
XZ MY-MIB::myTableEntry2.1=xxx
XZ ...
XZ MY-MIB::myTableEntry1.2=2
XZ MY-MIB::myTableEntry2.2=yyy


XZ Then I use snmpget for MY-MIB::myTableEntry1.1, it gave me 
XZ no such instance currently exists at this oid error.

If that's the case then there is something wrong with the code for your
table.  And to help you diagnosis it further you'd need to either submit
the code or at a minimum tell us what type of handler code style you're
using.
-- 
Wes Hardaker
Cobham Analytic Solutions

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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-snmpd v5.5 build fails with undefined reference to `pthread_create'

2010-04-06 Thread Howarth, James
I do not quite follow your response.

Are you suggesting that this is bug and config_os_libs should be modified? If 
so should I create a bug for this?

Or are you suggesting that I have not configured the build correctly via the 
configure command?

Sorry for the naive questions but I am sure how to move forward on this problem.

Thanks.

James Howarth

On Apr 3, 2010, at 5:01 AM, Bart Van Assche wrote:

On Fri, Apr 2, 2010 at 10:17 PM, Wes Hardaker 
harda...@users.sourceforge.netmailto:harda...@users.sourceforge.net wrote:
 On Wed, 31 Mar 2010 15:34:00 +, James Howarth 
 jhowa...@arbor.netmailto:jhowa...@arbor.net said:

JH ./configure --enable-ipv6 --disable-embedded-perl

Are you sure that's *all* the options you used?  Because this error:

 JH ./.libs/libnetsnmpmibs.so: undefined reference to `pthread_create'

Seems to indicate that a mib module was compiled in that wants threads
support, and none of the base distribution modules should require it.

I'm not sure that I understood the above correctly, but there is a 
pthread_create() call present in the source file 
agent/mibgroup/if-mib/data_access/interface_linux.c. Shouldn't an AC_CHECK_LIB 
test for libpthread be added to configure.d/config_os_libs ?

Bart.

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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


syntax for fixed size tables within SNMP MIBS

2010-04-06 Thread Lewis Adam-VNQM87
recently checking a proprietary MIB with a MIB validator used by an SNMP
Manager, I got the following error:
 
 ERR-166  For newly-defined conceptual rows which allow the creation of
new
  object instances and/or the deletion of existing object instances,
  there should be one columnar object with a SYNTAX clause value of
  RowStatus. 

The table in question does not support creation or deletion which is why
there is no RowStatus object.
 
My questions are:
 
1. Is the error message correct if we want to support the latest SNMP
standards?
2. If we know a table has a fixed number of entries, is there a syntax
we can use to specify that rows cannot be created? Otherwise we will
have to supply a 'dummy' rowStatus attribute which seems unneccessary.
 
 
Thanks in advance for any suggestions people might have.
 
Adam Lewis.
 
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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: Strange behavior on linkUpDownNotifi cations‏

2010-04-06 Thread X Z

Yes. I only got them when agent starts up or restarts, not other times. 
ThanksXuan

 Subject: RE: Strange behavior on linkUpDownNotifications‏
 Date: Mon, 5 Apr 2010 15:30:58 -0700
 From: mike_ay...@tva.tvworks.com
 To: b...@live.com; d.t.shi...@liverpool.ac.uk
 CC: net-snmp-users@lists.sourceforge.net
 
  From: X Z [mailto:b...@live.com]
  Sent: Monday, April 05, 2010 1:44 PM
 
   Date: Mon, 5 Apr 2010 11:37:04 -0700
   From: mike_ay...@tva.tvworks.com
 
From: X Z [mailto:b...@live.com]
Sent: Monday, March 29, 2010 8:40 AM
  
1. link up/down traps only sent after the snmpd is restarted. If I
don't restart snmpd, there were no link up/down traps sent.
  
   Even if this is an issue, the workaround is simple, yes?
  
  There is no workaround. I don't want the false alarms on link traps
  when the snmpd is restarted.  And I want to be able to get link up/down
  notifications whenever I used ifup or ifdown to bring up and down
  the interface.
 
   Are you saying that you get linkUp/linkDown during agent startup, and 
 no other time, even after restarting the agent?
 
 
   Thanks,
 
 Mike
 
  
_
Hotmail is redefining busy with tools for the New Busy. Get more from your 
inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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: Help on Index ou t of range error ‏

2010-04-06 Thread X Z

Attached please find the code I used. It's from mib2c.iterator -S 1 option.
ThanksXuan

 Date: Tue, 6 Apr 2010 12:31:46 +0100
 Subject: Re: Help on Index out of range error ‏
 From: d.t.shi...@liverpool.ac.uk
 To: b...@live.com
 CC: net-snmp-users@lists.sourceforge.net
 
 2010/4/5 X Z b...@live.com:
  Sorry for the typo. I modified the MIB text so that the index and table name
  are easy to read, but I forgot to change this Index name, it should be
  MyIndex.
 
 No - it should be myIndex.
 MIB object names must start with a lower-case letter.
 
 
 
  I got rid of the index out of range error by defining index to be a smaller
  range. It seems 4294967295 is too big for unsigned32.
 
 Hmmm...
 That should be OK.
 
 I can certainly query entries in the DisMan Event-MIB mteObjectsTable,
 which has an index of syntax Unsigned32 (1..4294967295)
 
 
 
  
   But now I got a
  different error saying that no such instance currently exists at this oid.
 
 Note that this is an error from the agent-side,
 The range error will be coming from the snmpget tool,
 which probably never even sent a request to the agent.
(You can check this by adding the '-d' flag, to display a
 raw dump of the request and response packets).
 
 
  I can do snmpwalk on the same table. So I wonder if it's related
  to the iterator MIB table implementation?
 
 Please post the full text of your MIB module code (as an attachment),
 so we can investigate properly.
 
 
 Dave
  
_
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccountocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4I used mib2c.iterate.conf -S cache=1 option to generate the code:

#include myTable.h

struct myTable_entry {
u_long  myIndex;

longstatus;
 /*
 * linked list 
 */
struct myTable_entry *next;
};


struct myTable_entry *myTable_head;

void init_myTable(void)
{
static oid myTable_oid[] =
{x,x,x,x,x,x,x,x,x};
size_t myTable_oid_len =
OID_LENGTH(myTable_oid);
netsnmp_handler_registration *reg;
netsnmp_iterator_info *iinfo;
netsnmp_table_registration_info *table_info;

reg = netsnmp_create_handler_registration(mylTable,
  myTable_handler,
  myTable_oid,
  myTable_oid_len,
  HANDLER_CAN_RONLY);

table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info);
if (table_info == NULL) { 
return;
}
netsnmp_table_helper_add_indexes(table_info, ASN_UNSIGNED, 1);
table_info-min_column = 2;
table_info-max_column =3;

iinfo = SNMP_MALLOC_TYPEDEF(netsnmp_iterator_info);
if (iinfo == NULL) {
SNMP_FREE(table_info);
return;
}
iinfo-get_first_data_point = myTable_get_first_data_point;
iinfo-get_next_data_point = myTable_get_next_data_point;
iinfo-table_reginfo = table_info;

   netsnmp_register_table_iterator(reg, iinfo);
netsnmp_inject_handler_before(reg,
  netsnmp_get_cache_handler
  (60,
   myTable_load,
   myTable_free,
   myTable_oid,
   myTable_oid_len),
  TABLE_ITERATOR_NAME);
}

struct myTable_entry *myTable_createEntry(u_long myIndex)
{
struct myTable_entry *entry;

entry = SNMP_MALLOC_TYPEDEF(struct myTable_entry);

if (entry == NULL) {
return NULL;
}
entry-myIndex = myIndex;
entry-next = myTable_head;
myTable_head = entry;
return entry;
}

void myTable_removeEntry(struct myTable_entry *entry)
{
struct myTable_entry *ptr, *prev;

if (entry == NULL) {
return;
}

for (ptr = myTable_head, prev = NULL;
 ptr != NULL; 
 prev = ptr, ptr = ptr-next) {

if (ptr == entry)
break;
}

if (ptr == NULL)
return;

if (prev == NULL)
myTable_head = ptr-next;
else
prev-next = ptr-next;

SNMP_FREE(entry); 
}



int myTable_load(netsnmp_cache * cache, void *vmagic)

{

struct myTable_entry *this;

u_long i;

int state = 1;

for (i = 0; i  10; i++) {



this = SNMP_MALLOC_TYPEDEF(struct myTable_entry);

if (this == NULL) {

   return SNMP_ERR_GENERR;

}

/* MIB index should start from 1 */

this-myIndex = i+1; 

this-status = state;



this-next = myTable_head;


Re: net-snmpd v5.5 build fails with undefined reference to `pthread_create'

2010-04-06 Thread Bart Van Assche
On Tue, Apr 6, 2010 at 5:54 PM, Howarth, James jhowa...@arbor.net wrote:

 I do not quite follow your response.

 Are you suggesting that this is bug and config_os_libs should be modified?
 If so should I create a bug for this?

 Or are you suggesting that I have not configured the build correctly via
 the configure command?

 Sorry for the naive questions but I am sure how to move forward on this
 problem.


Yes, I consider this as a bug in the Net-SNMP configure scripts. Please
create a bug report.

I have been able to reproduce the issue you reported with r18453 of the
source code on the 5.5 branch. Apparently it's the configure option
--disable-embedded-perl that triggers the breakage. A possible workaround is
to use the following configure command:

./configure --enable-ipv6 --disable-embedded-perl --with-libs=-lpthread

Bart.
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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: syntax for fixed size tables within SNMP MIBS

2010-04-06 Thread Dave Shield
On 6 April 2010 17:22, Lewis Adam-VNQM87 vnq...@motorola.com wrote:
 1. Is the error message correct if we want to support the
 latest SNMP standards?

RowStatus is certainly the standard mechanism for controlling
the creation/deletion of rows in SNMP tables.
   But I'm not sure I'd describe it as an _error_ for a table to
not have a RowStatus column.   It's certainly worth a warning,
but it's not actually an error.


 2. If we know a table has a fixed number of entries, is there a syntax we
 can use to specify that rows cannot be created?

Define the column objects as read-only or read-write.
If the columns are not read-create, then the validator
should not attempt to require a RowStatus column.
   (And if it does, then it's broken IMO!)

Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: Engine ID discovery

2010-04-06 Thread Dave Shield
On 6 April 2010 20:02, Mike Ayers mike_ay...@tva.tvworks.com wrote:
 The authoritative engine for an inform is the sending engine

Is it?
I believe that the authoritative engine for an Inform was the notification
receiver (just like any other acknowledged request).

The authoritative engine for a *trap* is the sender, sure.
But not for an inform notification.

Dave

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: Engine ID discovery

2010-04-06 Thread Mike Ayers
 From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On
 Behalf Of Dave Shield
 Sent: Tuesday, April 06, 2010 3:17 AM
 
 Mike - do you wish to comment further?

I just think the OP should quit screwing around in the dark.  RFC3414, 
section 4 explains how to get an engineId from any engine.  A non-engine has no 
engineID, so that solves itself.  There is no need to attempt to invent one's 
own protocol.  The authoritative engine for an inform is the sending engine, so 
discovery is unnecessary.  What problem is OP trying to solve that can't be 
handled by just using the existing net-snmp code?


Mike

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: Engine ID discovery

2010-04-06 Thread Mike Ayers
 From: dave.shi...@googlemail.com [mailto:dave.shi...@googlemail.com] On
 Behalf Of Dave Shield
 Sent: Tuesday, April 06, 2010 12:06 PM

 On 6 April 2010 20:02, Mike Ayers mike_ay...@tva.tvworks.com wrote:
  The authoritative engine for an inform is the sending engine
 
 Is it?
 I believe that the authoritative engine for an Inform was the
 notification
 receiver (just like any other acknowledged request).
 
 The authoritative engine for a *trap* is the sender, sure.
 But not for an inform notification.

Awww... time to dig back into the deep stuff... there may be two 
authoritative entities for these transactions.  I'll dig in and see what I get.


Mike


--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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: cache load never gets called

2010-04-06 Thread Kathy McLeod

Thanks.  That worked and it now does cache loads/frees.  But it is not
working as I expected.

1)  I thought it would always issue a free before a load.  However, the
first time I issue a command (this happens whether I issue it right away
after the table init routine or if I wait more than 60 seconds (my timeout
value), I see the load without a free first.  My table is now 8 rows long
instead of 4.  (The table init creates indexes 1 - 4, and the cache load
creates 5 - 8.  See screen1 file attached.)

2) After 60 seconds, I see the cache free.  This works ok, but when I issue
another command, I never see another load and I get an error message for
the command.

I have included my .c, a debug file, and the output of my snmptable
command.  I have net-snmp-5.3.2.2-7.el5_4.2 on RedHat 5.4. Let me know if
you need more info.  Thanks.

(See attached file: lldpPortConfigTable.c)(See attached file: debug.txt)
(See attached file: screen1.txt)

Kathy McLeod
Dept S82  CCB - SNMP
IBM Rochester, MN
(507) 253-4803


   
 Dave Shield   
 d.t.shi...@liver 
 pool.ac.ukTo
 Sent by:  Kathy McLeod/Rochester/i...@ibmus
 dave.shi...@googl  cc
 email.com net-snmp-us...@lists.sourceforge.ne
   t   
   Subject
 04/06/2010 04:51  Re: cache load never gets called
 AM
   
   
   
   
   




On 30 March 2010 21:12, Kathy McLeod kmcl...@us.ibm.com wrote:
 I ran the mib2c to generate a cache handler for a file created using
 mib2c.table_data.conf.  The main function still works ok, but even tho I
 set the cache timeout value to -1, it never seems to expire.  I also
tested
 with a timeout value of 60 and it didn't expire.  The only debug
statements
 I get are the ones in the init and deinit routines.  I am not able to
 figure out what is wrong.

The cache helper is not getting injected into the helper chain correctly.
It needs to be inserted before the handler TABLE_TDATA_NAME
rather than TABLE_DATA_NAME.

I'll tweak the mib2c config file accordingly.

Dave


lldpPortConfigTable.c
Description: Binary data


debug.txt
Description: Binary data


screen1.txt
Description: Binary data
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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: Strange behavior on linkUpDownNotifi cations‏

2010-04-06 Thread X Z

I just tried snmp 5.3.3 and couldn't get the link traps working. Same behavior 
observed. A bunch of link up/down traps when the agent started up or restarted. 
After that, even I change the interface to be down by ifdown eth2, no traps 
were sent out.
ThanksXuan 

 Date: Tue, 6 Apr 2010 12:19:16 +0100
 Subject: Re: Strange behavior on linkUpDownNotifications‏
 From: d.t.shi...@liverpool.ac.uk
 To: b...@live.com
 CC: net-snmp-users@lists.sourceforge.net
 
 2010/3/29 X Z b...@live.com:
  I finally can receive link up/down traps. But here is the strange behavior:
  1. link up/down traps only sent after the snmpd is restarted.  If I don't
  restart snmpd, there were no link up/down traps sent.
  2. There were too many link up/down traps after snmpd is restarted. I
  usually saw 3 link up traps and 6 link down traps even if I only brought
  down and up the interface once.
  3. There were only one coldStart trap and one nsShutdown trap as expected.
  Does anyone know the reason? I search the email archives and seems that
  other people had the same issue before, and one response to the problem was
  that's expected behavior. I don't quite understand why the above behavior
  happened?
  Does anyone know how to make link up/down traps work?
 
 
 Are you still using your own monitor/event definitions?
 Have you tried using the built-in implementation of these traps?
   (i.e. linkUpDownNotifications yes)
 
 Which version of the agent are you using?
 
 Dave
  
_
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccountocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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: Strange behavior on linkUpDownNotifi cations‏

2010-04-06 Thread X Z

I tried snmp 5.3.3 on both 64 bits and 32 bits servers, and the link traps only 
partially worked for 32 bits server. By partially, I mean that the agent 
didn't take the frequency and -S option, it just simply used the default one 
(one minute) and didn't suppress the traps at the agent startup.
I had the following in snmpd.confnotificationEvent  linkUpTraplinkUp   
ifIndex ifAdminStatus ifOperStatusnotificationEvent  linkDownTrap  linkDown 
ifIndex ifAdminStatus ifOperStatusmonitor -S -r 10 -e linkUpTrap   Generate 
linkUp ifOperStatus != 2monitor -S -r 10 -e linkDownTrap Generate linkDown 
ifOperStatus == 2

ThanksXuan
From: b...@live.com
To: d.t.shi...@liverpool.ac.uk
CC: net-snmp-users@lists.sourceforge.net
Subject: RE: Strange behavior on linkUpDownNotifications‏
Date: Tue, 6 Apr 2010 16:52:50 -0400








I just tried snmp 5.3.3 and couldn't get the link traps working. Same behavior 
observed. A bunch of link up/down traps when the agent started up or restarted. 
After that, even I change the interface to be down by ifdown eth2, no traps 
were sent out.
ThanksXuan 

 Date: Tue, 6 Apr 2010 12:19:16 +0100
 Subject: Re: Strange behavior on linkUpDownNotifications‏
 From: d.t.shi...@liverpool.ac.uk
 To: b...@live.com
 CC: net-snmp-users@lists.sourceforge.net
 
 2010/3/29 X Z b...@live.com:
  I finally can receive link up/down traps. But here is the strange behavior:
  1. link up/down traps only sent after the snmpd is restarted.  If I don't
  restart snmpd, there were no link up/down traps sent.
  2. There were too many link up/down traps after snmpd is restarted. I
  usually saw 3 link up traps and 6 link down traps even if I only brought
  down and up the interface once.
  3. There were only one coldStart trap and one nsShutdown trap as expected.
  Does anyone know the reason? I search the email archives and seems that
  other people had the same issue before, and one response to the problem was
  that's expected behavior. I don't quite understand why the above behavior
  happened?
  Does anyone know how to make link up/down traps work?
 
 
 Are you still using your own monitor/event definitions?
 Have you tried using the built-in implementation of these traps?
   (i.e. linkUpDownNotifications yes)
 
 Which version of the agent are you using?
 
 Dave
  
The New Busy is not the too busy. Combine all your e-mail accounts with 
Hotmail. Get busy.
_
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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 questions

2010-04-06 Thread Piljoo Choi

Hello All members,



I am new to net-snmp and I have questions.



-What is agent, master-agnet and subagent and what is the relationship 
between
those? how does
master-agent and sub-agent work? A request(GET or SET) commands hits the
master-agent first and passes it to subagent? And the subagent handles 
the data
within our own application(a kind of data manager class )? Where the MIB
 plays a role
in this picture? I installed Net-SNMP on my machine and I was able to 
running
giving it localhost at the end of the command. so I can say master-agent
 is
running? 



-What is differences between snmp4J-Agent and snmp4J-AgentX? I need to 
handle a
net-snmp request  in Java. Which one should
I use? Currently we have C++ sub-agent codes that connects to the master
agent(using TCP address)and I need Java sub-agent to act like the C++ 
sub-agent
does except Java sub-agent will be running on a remote machine. 
Basically, one
C++ sub-agent(we do have that) and one Java sub-agent(I need to create) 
that
will connect to the remote 
master-agent(only
one master and only one MIB currently).Is that O.K right? because 
sub-agent
uses TCP address-a sub-agent can connect to remote master agent running 
on a
different box.  And Is that 
possible
one master-agent having c++ subagent and Java sub-agent? And Which one 
should I
pick between snmp4J-Agent and snmp4J-AgentX?



I would be very appreciated if you could answer my question.

 

Thanks,   --
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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


what reason causes echo some date after command line snmpd

2010-04-06 Thread 黎明傲子
Dear All:
When I port net-snmp to my board(uClinux),the compile process is successful,but 
if I enter the command line snmpd ,always some date appears, like
# snmpd -f 
36
I want to know why this happened, Is there anything I can do for it? what “36 “ 
is stand for ?
In addition,if I enter the command line
# snmpd -c /etc/snmpd.conf -f 
39
# ps
…….
51   S0 Z  0K 0K  8.3 snmpd
…….
Why not echo “snmpd -c /etc/snmpd.conf –f”?
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
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