Re: How to dynamically change the snmpd.conf file?

2010-11-10 Thread Dave Shield
On 10 November 2010 09:44, Benix Samuel Vincent Theogaraj
benixsam...@gmail.com wrote:
 without NFS, if I want to make any change to snmpd.conf file then do I have
 to recompile again?

No.

The snmpd.conf file is used to control various aspects of the behaviour of the
snmpd agent.   It's not necessary (or expected) to recompile the agent.

I'm not sure where NFS comes into things - the agent doesn't care about the
underlying filesystems.


Dave

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book Blueprint to a 
Billion shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: sysORUpTime?

2010-11-10 Thread Dave Shield
On 10 November 2010 16:42, Eckert, Doug doug.eck...@dowjones.com wrote:
 What do values of sysORUpTime represent?

sysORUpTime OBJECT-TYPE
SYNTAX TimeStamp
MAX-ACCESS read-only
STATUS current
DESCRIPTION
The value of sysUpTime at the time this conceptual
row was last instantiated.
::= { sysOREntry 4 }


  On 1 system, we’ve got values being populated:

 SNMPv2-MIB::sysORUpTime.1 = Timeticks: (6) 0:00:00.06
 SNMPv2-MIB::sysORUpTime.2 = Timeticks: (6) 0:00:00.06




 and on another we have the following:

 SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00
 SNMPv2-MIB::sysORUpTime.2 = Timeticks: (0) 0:00:00.00


Two possibilities spring to mind:
   a)  the second system is much faster than the first,
and is populating the sysORTable within the first second of operation

  b)  the second system does not support the sysORUpTime object



 All zeroes are causing some concern amongst our monitoring staff.

Is it just this table, or are you seeing this more widely?

The sysORTable was a nice idea that never really worked.
If that's the only thing that seems to be broken, then I wouldn't
worry too much about it.

Dave

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book Blueprint to a 
Billion shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: sysORUpTime?

2010-11-10 Thread Dave Shield
On 10 November 2010 17:53, Eckert, Doug doug.eck...@dowjones.com wrote:
Two possibilities spring to mind:
   a)  the second system is much faster than the first,
        and is populating the sysORTable within the first second of operation

 Very possible as the 'offending' system is a 10-core Power770 LPAR
 and the 'reference' system is a 2-core Power6 LPAR.

 But, how would the speed of populating sysORTable affect the value of 
 sysUpTime?

It's not the value of sysUpTime now.
It's the value of sysUpTime  ==at the point when this entry is added
to the table ===

So on a slow system you might have:
system starts (sysUpTime=0)
  tick  (sysUpTime=1)
  tick  (sysUpTime=2)
  tick  (sysUpTime=3)
add entry 1 to sysORTable  (sysUpTime=3, hence sysORUpTime.1 = 3)
  tick  (sysUpTime=4)
add entry 2 to sysORTable  (sysUpTime=4, hence sysORUpTime.2 = 4)
   etc, etc

Whereas on the faster system, the initialisation would be much quicker,
so it might go:
system starts (sysUpTime=0)
add entry 1 to sysORTable  (sysUpTime=0, hence sysORUpTime.1 = 0)
add entry 2 to sysORTable  (sysUpTime=0, hence sysORUpTime.2 = 0)
  tick  (sysUpTime=1)


Remember that sysORUpTime doesn't change - it's fixed to whatever
the value of sysUpTime (which *does* change) when the row was created.

Dave

--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: how to get integer from exec/extend shell command?

2010-11-09 Thread Dave Shield
2010/11/8 Ernest Beinrohr ernest.beinr...@axonpro.sk:
 Well, that does not really help, I've tried. My number is quite large,
 like bytes on and interface. Too big for return value.

In which case, the exec/extend mechanism is probably not the best
choice for you.   This is intended as a quick-and-easy mechanism
for providing information without needing to define/implement a MIB.
The price associated with this is that the MIB structure it uses is
fixed, and may not be appropriate for all uses.

   We've tried to make this framework as generic as possible, but
if you need information that falls outside this MIB, then you are
looking at either processing this on the client side (to turn the
string into a number), or defining a new MIB that more closely
matches your requirements.

Dave

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book Blueprint to a 
Billion shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Ways to retrive ip address from cisco routers decimal or hexadecimal.

2010-11-09 Thread Dave Shield
On 9 November 2010 06:25, Manish Pohnekar
manish.pohne...@info-spectrum.com wrote:
 All I have one query we are using the net-snmp library and receiving the
 agent information from cisco router  we are getting IP address in
 hexadecimal  format as well as in decimal value in corresponfing ascii
 character in 4 character lenghth. but not sure when returens hexadecimal or
 decimal we want only in one hexadecimal .

What MIB object(s) are you retrieving?
What are the MIB definitions for those objects?

You say that you are receiving IP addresses in hex *and* decimal formal.
Does that mean you are getting two results for each query?
Or that sometimes the values are in hex, and other times they are in decimal?
Or what?
   This description is a bit unclear - some actual results would be useful.


Remember that you can always force string results to be displayed in
ascii or hex, by using the appropriate output command-line options.
From snmpcmd(3):

OUTPUT OPTIONS

   -OaDisplay string values as ASCII strings (unless there is  a  DIS-
  PLAY-HINT   defined  for  the  corresponding  MIB  object).   By
  default, the library attempts to determine whether the value  is
  a printable or binary string, and displays it accordingly.

  This option does not affect objects that do have a Display Hint.

   -OxDisplay string values as Hex strings (unless there is a DISPLAY-
  HINT defined for the corresponding MIB object).  By default, the
  library attempts to determine whether the value is  a  printable
  or binary string, and displays it accordingly.

  This option does not affect objects that do have a Display Hint.


Dave

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book Blueprint to a 
Billion shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Fw: Ways to retrive ip address from cisco routers decimal or hexadecimal.

2010-11-09 Thread Dave Shield
On 9 November 2010 11:38, Manish Pohnekar
manish.pohne...@info-spectrum.com wrote:
 Hi we are using some thing like below which are OIDS

  #define rttMonEchoAdminTargetAddress  .1.3.6.1.4.1.9.9.42.1.2.2.1.2
  #define rttMonEchoAdminSourceAddress .1.3.6.1.4.1.9.9.42.1.2.2.1.6

And what are the definitions of these objects?
What do the relevant bits of the MIB file look like?

Dave

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book Blueprint to a 
Billion shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: pass through not working in snmpd

2010-11-09 Thread Dave Shield
On 9 November 2010 14:36, Daniel Leicht daniel.lei...@gmail.com wrote:
 I'm trying to make snmpd run a script everytime that someone gets/sets the
 oids under 1.3.6.1.4.1.5.1.
 An example snmpset command that I use is:
 snmpset -v3 -u snmpuser 10.0.0.151 .1.3.6.1.4.1.5.1.10 string TEST

Is it just this OID that's failing?
Can you see anything else (e.g. sysUpTime.0), when using this user?


 my snmpd.conf:
 ###
 pass  .1.3.6.1.4.1.5.1 /mnt/usb/project/bin/snmp
 rwuser  snmpuser noauth


Where are you creating the 'snmpuser' user?
What do you have in your /var/net-snmp/snmpd.conf file?

Dave

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book Blueprint to a 
Billion shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: pass through not working in snmpd

2010-11-09 Thread Dave Shield
On 9 November 2010 16:54, Daniel Leicht daniel.lei...@gmail.com wrote:
 Hi Dave,
 All the directories are 777 or 755 (I checked one by one).
 /mnt/usb/project/bin/snmp is a soft link to a binary file,

I presume you've checked the permissions on the target
(binary and directory path) as well?


 I tried putting the binary file there directly,

Ummm...
Does the binary use shared libraries?
It might be worth checking the permissions on those as well.


What user does the agent run as?
Can you run the binary (from the command line) as that same user?



 Any guesses?

As an alternative approach, try running the agent using the option
   -Ducd-snmp/pass

and re-run the snmpset command.
What (if anything) does the agent log?

Dave

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book Blueprint to a 
Billion shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: pass through not working in snmpd

2010-11-09 Thread Dave Shield
On 9 November 2010 14:36, Daniel Leicht daniel.lei...@gmail.com wrote:
 And when checking the traffic in wireshark, I can see the following:
 48977 2321.852836 10.0.0.183 10.0.0.151 SNMP set-request 
 1.3.6.1.4.1.5.1.10
 48978 2321.856039 10.0.0.151 10.0.0.183 SNMP report 1.3.6.1.6.3.15.1.1.3.0

Sudden thought - you are seeing a *report* being sent back?
Rather than a response packet?

That sounds as if the request is being rejected (as part of the SNMPv3
processing) before it gets as far as the varbind processing.

Are you sure that the agent isn't logging any sort of error?

It might be worth running the agent using '-Dsnmpv3' to see if that
shows anything useful.

Dave

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book Blueprint to a 
Billion shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Study net-snmp source code

2010-11-08 Thread Dave Shield
On 8 November 2010 06:06, Queenie de Melo queenie...@gmail.com wrote:
 i too would like to understand the flow and study the source code of
 net-snmp.

That's a bit vague.
What exactly are you interested in?

Client applications?   The SNMP agent (in broad terms)?
The processing of an individual requested varbind?
Subagents?


 From here, now when should i start?

When?  As soon as you like?
Where?
   For following client applications, the simplest is probably to run one
of the clients within a debugger, and single-step through the code.

For following the workings of the agent, it's probably simpler to start
by turning on some selected debugging (-D{token}) and watch what
happens when the agent receives a request.

Have a look through the code under 'agent' for mention of DEBUGMSG,
and turn on something that looks interesting.
  (Hint - do *not* turn on full debugging.  You'll drown in the output!)


Dave

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book Blueprint to a 
Billion shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: AES: Unknown Object Identifier (Sub-id not found: mib-2 - AES) error thrown while doing a snmpwalk with AES encryption

2010-11-08 Thread Dave Shield
On 8 November 2010 03:59, saurabh shukla coolsaurabh@gmail.com wrote:
 Please look into the matter and help me out.
 slocum: snmpwalk -v 3 -u myusr -a MD5 -A cisco1234 x AES -X cisco1234

You've missed the hyphen before the '-x AES' option.
This is confusing the snmpwalk command.

Dave

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book Blueprint to a 
Billion shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: AES: Unknown Object Identifier (Sub-id not found: mib-2 - AES) error thrown while doing a snmpwalk with AES encryption

2010-11-08 Thread Dave Shield
[ First - *please* don't mail me privately, without copying
 any responses to the mailing list.  I don't have the time
 or inclination to offer private, unpaid, SNMP consultancy.
 Keep discussions to the list, where others can both learn
 and offer advice.  Thanks.   ]

On 8 November 2010 14:21, saurabh shukla coolsaurabh@gmail.com wrote:
 I am still not able to get this to work.
 On trying to do the walk it says unknown privacy protocol specified.

 The net-snmp version that i am running is 4.2.6 .

The 4.2.x line is *extremely* old - and predates the UCD-Net-SNMP renaming.
We stopped supporting that line several years ago.


 Does this support AES encryption ??

No.
AES support was first included in the 5.0 line (back in 2002).
The code you are using is essentially more than ten years old.

*Please* can you use something that's a little more recent!

Dave

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book Blueprint to a 
Billion shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Study net-snmp source code

2010-11-04 Thread Dave Shield
On 4 November 2010 18:28, Leo Lin hayashi_...@yahoo.com wrote:
 I would like to study net-snmp source code, where can I get started?

http://www.net-snmp.org/download.html

That includes links to the source code of the various
current releases.

Dave

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book Blueprint to a 
Billion shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: SNMPGET Command

2010-10-27 Thread Dave Shield
On 26 October 2010 19:17, Tom C. Scott tsc...@alaska.net wrote:
 The command I am attempting to send is:

snmpset -c canteen 192.168.11.103 1.3.6.1.4.1.13243.1.3.1.0 -t i -v 1

Please check the syntax of the snmpset command.
It takes OID type value triples, and does *not* use the flags '-t' and '-v'

(or at least, not for specifying type and value)

Dave

--
Nokia and ATT present the 2010 Calling All Innovators-North America contest
Create new apps  games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Net-SNMP 5.3.2.2 returns zeroes for hrStorageTable values

2010-10-20 Thread Dave Shield
On 19 October 2010 16:59, Ray Van Dolson rvandol...@esri.com wrote:
 Running Net-SNMP 5.3.2.2 on RHEL 5.5 (POWER).  The machine is also
 running Red Hat Cluster services and a GFS2 filesystem.

That's a fairly old version of the agent.
Would it be possible to try compiling and running a more recent release
on one of your systems (just temporarily), to investigate whether this
issue has been fixed since the 5.3.2.2 release, or whether it's still a problem?

Dave

--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: scalar set question

2010-10-20 Thread Dave Shield
On 19 October 2010 19:00, Kathy McLeod kmcl...@us.ibm.com wrote:
 I asked this awhile back but didn't get a reply - several questions in that
 note so you may have missed it.

Well, speaking personally - the couple of months just gone are
probably the busiest part of the academic year for me, so I've
been concentrating on my real, paid work.
  I'm only just starting to get back into monitoring the Net-SNMP
lists on a semi-serious basis.  (And I still am not really in a position
to do much development work).


 For tables, I switched to using mib2c.table_data.conf and I really like the
 way you pass a structure in on the sets so that the plugin does not have to
 save the old value in static storage for the duration of the set steps. Is
 there any plan to do this for scalars, or is it already in the newer
 releases (I am on 5.4)?

I'm not aware of any significant work being done on the scalar helpers,
either currently or over the last few months.   All I can suggest is that
you have a look at the 5.6 release.   If that doesn't include what you
require, then we would be more than happy to receive suitable patches
to add the missing functionality.

Dave

--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Query: SNMP Prococol

2010-10-20 Thread Dave Shield
On 20 October 2010 11:20, Queenie de Melo queenie...@gmail.com wrote:
 We know that, the SNMP agent(Server) listens on port 161 for SNMP GET/SET
 requests from the SNMP Manager (Client). The SNMP Agent then sends back a
 response (GET-RESPONSE) to the SNMP Manager.  This will be received by the
 SNMP Manager on which Port?

The same port used as the source of the original request.
Much as for any other client/server arrangement.

So if the original request went:a.b.c.d  port N-w.x.y.z  port 161
then the response will go:w.x.y.z  port 161  -a.b.c.d  port N


 And during the GET-RESPONSE sent from SNMP Agent to SNMP
 Manager--- Who is the Server and who is the Client?

The client is the manager - the agent is the server.
Think of this as a combined request/response *pair*,
not of the two packets as independent requests.


This is exactly the same model as (e.g.) a web browser and web server.

Dave

--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Understanding snmpwalk

2010-10-19 Thread Dave Shield
On 19 October 2010 01:44, Leo Lin hayashi_...@yahoo.com wrote:
 if I issue snmpwalk like so
 $snmpwalk -v1 -cprivate localhost MyTable
 the agent displays the contents of the table, but it hangs for a while, and 
 later I get
 Timeout: No response from localhost
 then the snmpd shutsdown.

 Is this normal?

No.

Do you see the whole of the table before the agent hangs?
Or does it stop somewhere in the middle?

If you restart the agent, and then issue a single snmpgetnext
request on the last entry in the table - what happens?
Do you get anything back, or does the agent hang again?

If you get something back, then what?
If it hangs, what is the next registered object in the agent?


Dave

--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Not getting specific trap

2010-10-19 Thread Dave Shield
On 18 October 2010 09:06, yogesh m heart_man...@yahoo.com wrote:
 In this i am trying to generate my Trap for first system status of first
 row.


 /** Initializes the telecrbt module */
 void init_telecrbt(void)
 {
     initialize_table_teleSysResourceTable();
     send_mySysDown_trap();
 }


I wouldn't try to send the trap directly from the module initialisation
routine.   It's very unlikely that the trap destinations will have been
set up at this point, since this routine is called *before* the config
files are processed.

Instead, register a callback routine, to be invoked after the config files
have been read in:

snmp_register_callback(SNMP_CALLBACK_LIBRARY,
   SNMP_CALLBACK_POST_READ_CONFIG,
   send_mySysDown_callback, NULL);

And invoke the 'send_mySysDown_trap()' routine from there.

Although if this is  a sysDOWN trap, rather than a sysUP trap,
you might actually be better off registering the callback as

snmp_register_callback(SNMP_CALLBACK_LIBRARY,
   SNMP_CALLBACK_SHUTDOWN,
   send_mySysDown_callback, NULL);

so the trap is sent when the agent shuts down, not when it's
just started up.


Dave

--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Understanding snmpwalk

2010-10-19 Thread Dave Shield
On 19 October 2010 13:20, Leo Lin hayashi_...@yahoo.com wrote:
 Actually I have 2 tables, and on both it behaves differently.

What are the root OIDs of each table?
What other objects are defined between the two?


 On both tables, if I perform snmpgetnext, it works fine.

That's a bit vague.
What OIDs are you running snmpgetnext on?

Remember, I suggested you ran snmpgetnext on the *last*
instance of the table.   I.e. the final value returned by snmpwalk
before it hangs.


 I'm going to try to revert table 1 using the netsnmp helper handler
 instead, to check if this happens with the helper as well.

My suspicion is actually with table2, not table1.
But you haven't given enough detail to confirm this.

Dave

--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Understanding snmpwalk

2010-10-19 Thread Dave Shield
On 19 October 2010 16:07, Leo Lin hayashi_...@yahoo.com wrote:
 snmpwalk –v1 –cprivate localhost AlarmDateTime // works OK
 snmpwalk –v1 –cprivate localhost AlarmType    // works OK
 snmpwalk –v1 –cprivate localhost AlarmDescription // hangs @ 
 AlarmDescription.2

You're thinking of this in the wrong way.

It's not hanging at alarmDescription.2  (i.e the end of table1)
It's actually hanging at the beginning of table2.
   Remember that the client (snmpwalk or snmpgetnext) doesn't
know that alarmDescription.2 is the last entry in the table.
It has to ask for the next value (which is actually in table2).

Only when that value is returned, does snmpwalk know that it's
time to stop.  If the agent hangs in table2, then snmpwalk will
never get this (unwanted) response.


 Of course, this is with the net-snmp helper,
 I will try with my own module (snmpd –agent.c table.c) and see if there’s any 
 errors.

Given that we've established that the problem lies in table2  (i.e. conf.c),
I'm not sure why you need to investigate further with table.c

Dave

--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Understanding snmpwalk

2010-10-19 Thread Dave Shield
On 19 October 2010 16:42, Leo Lin hayashi_...@yahoo.com wrote:
 you are correct, table.c is not the source of the problem.
  However, I don't understand why snmpd hangs on AlarmDescription.2 on conf.c

It doesn't.

The client application (snmpwalk or snmpgetnext) issues a GETNEXT request
on alarmDescription.2.The agent is therefore being asked to return the
*NEXT* value that it knows about - i.e. whatever comes after alarmDescription.2

There isn't anything else left inside table1, so control then passes to the next
module within the OID tree.   In this case, it's table2.
   table2 is then asked for the first entry that it knows about.
Something about this request then hangs.


You'd see exactly the same effect if you asked for

GETNEXT  table1Entry.column999
or
GETNEXT   table1Table.2
or
GETNEXT   table1Table.999
or
GETNEXT   table2Table
or
GETNEXT   table2Entry

All of these are asking for the next instance after the specified OID,
i.e. the first column entry from table2.

Remember, the SNMP protocol doesn't know (or care) about the boundaries
between different groups, tables, columns, etc.It just works with a sequence
of OIDs, which can be ordered, but are otherwise all equivalent.


Dave

--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: what MIB defines icmp.27 and icmp.28?

2010-10-19 Thread Dave Shield
On 19 October 2010 19:23, Fulko Hew fulko@gmail.com wrote:
 I've browsed a Microsoft Windows Server 2008 system running
 Net-SNMP v5.5 (with DLL support) and I see the following
 variables [icmp 27  28] returned.  Can anyone enlighten me
 on what MIB defines these?

 I found RFC-2011 had originally defined icmp.27 and .28,

No - RFC 2011 objects went up to icmp.26, but didn't include 27  28

These OIDs were introduced as part of developing the IPv6 capable
revision of this MIB (defining initial versions of inetIcmpTable and
inetIcmpMsgTable) and appeared in early versions of
draft-ietf-ipngwg-rfc2011-update-xx.txt

  It appears that these two tables were moved to .29 and .30
in revision 08 of this draft, and then became icmpStatsTable
and icmpMsgStatsTable in the final RFC 4293


You'd need to ask Microsoft why they are implementing objects
from an (expired) internet draft, rather than the final RFC.

Dave

--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Query: SNMP Prococol

2010-10-18 Thread Dave Shield
On 18 October 2010 12:57, Queenie de Melo queenie...@gmail.com wrote:
 So the SNMP agent(Server) listens on port 161 for SNMP GET/SET requests
 from the SNMP Manager (Client)

Correct.

(Strictly speaking, the agent can listen on any available port,
 but port 161 is the standard port for SNMP information retrieval)



 What about in Case of traps?

 The SNMP Manager in this case listens on UDP port 162 for the Traps sent by
 the SNMP Agent. So in this case, is it that the SNMP Manager is  the
 Server and SNMP Agent is the client??

That's right.

The SNMP agent (or some other application that generates traps) is the client
and the application that receives the trap is the server.
   The official terminology is notification generator and
notification receiver.

The notification receiver may be the same SNMP manager application as the
one generating information retrieval requests.   Or it may be a dedicated
trap-receiving application (such as the Net-SNMP 'snmptrapd').
   But the most important thing here is that the client-server relationship is
reversed for traps, when compared to GET/SET requests.



 Another query i had is: what exactly are SNMP INFORMS?

A trap is sent from the agent to the trap receiver, but there's no
acknowledgement sent back.   So the agent doesn't know whether
the trap got there safely (let alone whether it was acted upon).

An INFORM is essentially the same as a trap, except that it *does*
trigger an acknowledgement.   So the agent (or other notification
generator application) knows that the inform was received.
   (Whether the receiver actually did anything with it is a different question!)

Think of this as the same as read receipt messages in the context of email.




 SNMP inform is nothing it's an acknowledgment mechanisim in SNMP. which is
 getting supported from snmpv2c and snmpv3 onwards

 Is it sent from the Manager to the Agent in response to a TRAP?

No

or 
 is it
 sent from Agent to Manager just like a trap (but u want manager to ack the
 receiptof trap)

Yes.



or is it sent from NMS(SNMP Manager) to another SNMP Manager
 

SNMP Manager is something of a vague term.
Any SNMP application can act in various different roles - hence the
current specifications talk in terms of notification receiver or
notification generator  (and similarly for GET/SET requests)

It's perfectly possible for one SNMP manager application to signal
to another, using traps or informs.   But the most typical use of traps
or informs would be from an agent to an NMS.

Dave

--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: problem encountered while issuing multiple snmpset on octetstring oids

2010-10-18 Thread Dave Shield
On 18 October 2010 15:13, Leo Lin hayashi_...@yahoo.com wrote:
 Then, I issue an snmpset and modify the contents to a strlen less than 
 'private' (7).
 snmpset does it right the first time, but consecutives calls to snmpset,
 gives me the remainder of 'private'

It sounds as if you are forgetting to add the null terminator to
your internal string buffer, when setting the new value.


 I used DEBUGMSGTL to track the len of requests-requestvb-val.string,
 and it shows me that for snmpset to leo, the strlen is still 7 instead of 3.

What exactly do you mean by this?
What is the value of 'requests-requestvb-val_len' ?

Remember that the Net-SNMP library uses a (value+length) approach
to varbind values,  rather than assuming all strings will be null-terminated.

 I also made sure that I've clear my buffer using
memset(_myoid, '\0', _myoid_len);

That's the OID buffer.
What are you doing with the buffer that holds the string value?

Dave

--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Regarding loading MIB

2010-10-15 Thread Dave Shield
On 6 October 2010 19:39, Parth Bakshi pab8...@rit.edu wrote:
 $ snmpgetnext -v 2c -c public localhost
ospf.ospfGeneralGroup.ospfRouterId
 ospf.ospfGeneralGroup.ospfRouterId: Unknown Object Identifier
   (Sub-id not found: (top) - ospf)

$ snmpgetnext -v 2c -c public localhost
 RFC1253-MIB::ospf.ospfGeneralGroup.ospfRouterId
 HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (917941) 2:32:59.41


There are two issues here.

Firstly, the local SNMP library isn't loading RFC1253-MIB by default,
so snmpgetnext doesn't understand what 'ospfRouterId' means

Wes has told you how to deal with this.


Secondly, the agent that you are querying probably doesn't support the OSPF
information (or if it does, then you don't have access to it).   That may be
harder to fix.
You probably need to talk to the vendor of the SNMP agent, to see whether
the agent supports the OSPF group or not.   (And if this is the Net-SNMP agent,
then the answer is no - our agent does *not* support this MIB).

The only way to fix that is to write the necessary code to add this
functionality
to the agent (or pay the vendor to do this for you).

If the agent *does* support this MIB, then you need to look at the
access control
settings of the agent.   But there's no point in doing that until
you've discovered
whether the agent provides that information in the first place.

Dave

--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Extending snmp agent: compile extension source and header files faster

2010-10-15 Thread Dave Shield
On 15 October 2010 14:10, Leo Lin hayashi_...@yahoo.com wrote:
 just wondering if there's a way to compile my source and header files
 generated by mib2c without having to go through the

./configure, make, make install process.

If you're just wanting to add an extra MIB module to the agent,
and you've already got a working environment, it's possible to
fudge it by editing files manually, as follows:

   agent/Makefile:
   add the new module to the definitions of
   'mibgroup_list_lo' and 'mibgroup_list_o'

   agent/mibgroup/Makefile:
   add the new module to the definitions of
   'mib_module_list_o', 'mib_module_list_lo' and
'mib_module_list_c'

   agent/mibgroup/mib_module_includes.h
   include the new module header file

   agent/mibgroup/mib_module_inits.h
   invoke the new module 'init_xxx' routine

If there's a shutdown routine, then this should be added
to agent/mibgroup/mib_module_shutdown.h as well.

Use the existing contents of each of these as a template.


You should then be able to run make ; make install
and it will only re-compile the new module (plus a couple
of other files), rather than the whole thing.


Dave

--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: To generate snmp trap by the agent

2010-10-14 Thread Dave Shield
[ First - *please* don't mail me privately, without copying
 any responses to the mailing list.  I don't have the time
 or inclination to offer private, unpaid, SNMP consultancy.
 Keep discussions to the list, where others can both learn
 and offer advice.  Thanks.   ]



On 13 October 2010 09:39, yogesh m heart_man...@yahoo.com wrote:

 i am just trying that when ever host status is enable i get a trap

 agent have the host resource values  in a table
 and for that table having index 0 i am trying to get trap for status
 variable

But you still haven't answered my question:

 OK - You've defined the routine to generate the trap.
 When is this routine called?  What does that code look like?

*Somewhere* in your code, there must be a call to the
send_mySysDown_trap() routine, otherwise that trap will
never be generated.
Where are you calling this routine?

Dave

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
___
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: what is the community meaning?

2010-10-14 Thread Dave Shield
On 14 October 2010 07:38, Abraham Varricatt
abraham.varricatt+s...@googlemail.com wrote:
 can anybody explain the meaning community' meaning to me more detailed
 ?Thank you!

 This is actually part of the SNMP protocol.

To be strictly accurate, it's part of the administrative framework for
SNMPv1 and SNMPv2c - i.e. an SNMP Message  (see RFC 1901)
   It's not actually part of the SNMP protocol itself (i.e. the SNMP PDU),
as defined in RFC 1905


   The community string acts as
 (a VERY limited) security check to determine if a monitor has read/write
 access to the MIB-tables it has.

The usual way to think of the community string is as a (plain-text) password.
Different community strings can be granted different levels of access to
a given SNMP agent.


Dave

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
___
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: To generate snmp trap by the agent

2010-10-13 Thread Dave Shield
On 13 October 2010 08:44, yogesh m heart_man...@yahoo.com wrote:
 .My code is ...
 int
 send_mySysDown_trap(void)
 {
  :
 }

 i put this code with my .c file of agent


OK - You've defined the routine to generate the trap.
When is this routine called?   What does that code look like?

Dave

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Net-SNMP ver5.6 Installation error

2010-10-13 Thread Dave Shield
On 12 October 2010 20:34, Matsushita, Nobuo matsushita.no...@tchden.org wrote:
 I downloaded the net-snmp  ver. 5.6 today. I didn't have any problems with
 build. All tests were successful.
 But when I tried to install, I got the following error and the installation
 stopped:

 make[1]: *** No rule to make target `add_mibdir.3', needed by `maninstall'.
 Stop.

 Does anyone know how to fix this problem?

Quick fix - edit man/Makefile and replace 'grep -vE' with 'egrep -v' in the
block 'manaliases'

Proper fix - edit man/Makefile.in and replace 'grep -vE' with '@EGREP@ -v'
in the same block.  Then re-run configure and recompile.

Dave

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
___
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: mib2c generates wrong code for textual conventions

2010-10-11 Thread Dave Shield
On 11 October 2010 13:51, Boris Zweimueller boris.zweimuel...@gmail.com wrote:
 the generated c code for this object ist:

     /** Check the ranges of the passed value for legality */
     if ( !(*val = 54  *val = 54) || !(*val = 65  *val = 65) )
     {
         return SNMP_ERR_WRONGVALUE;
     }

 which yields an error for each of the two correct values 54 oder 65. The
 '||' should be a ''.


Try the attached patch - does that fix the problem?

Dave
Index: local/mib2c.check_values.conf
===
--- local/mib2c.check_values.conf	(revision 19393)
+++ local/mib2c.check_values.conf	(working copy)
@@ -108,7 +108,7 @@
 @eval $x = 1@
 	if (
 	  @else@
-	||
+	
   @end@
 	   !(*val = $min  *val = $max)
 @end@
--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb___
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: returning an integer value for extend script?

2010-10-10 Thread Dave Shield
On 9 October 2010 17:01, Angelo Höngens a.hong...@netmatch.nl wrote:
 Use the return code of the script, rather than the output
 See  UCD-SNMP-MIB::extResult or NET-SNMP-MIB::nsExtendResult

 I'm not quite sure what you mean. I only get string values back:

 $ snmpwalk -v 1 -c public localhost 1.3.6.1.4.1.2021.54

 UCD-SNMP-MIB::ucdavis.54.101.0.3.1.1.4.116.101.115.116 = STRING: 123
 UCD-SNMP-MIB::ucdavis.54.101.0.3.1.2.4.116.101.115.116 = STRING: 123
 UCD-SNMP-MIB::ucdavis.54.101.0.3.1.3.4.116.101.115.116 = INTEGER: 1
 UCD-SNMP-MIB::ucdavis.54.101.0.3.1.4.4.116.101.115.116 = INTEGER: 0

No - you get two string values (123 and 123), and two integer
values (1 and 0)

If you define the same extension command rooted at the default location
(NET-SNMP-EXTEND-MIB::nsExtendObjects), the results would be shown
as follows:


   NET-SNMP-EXTEND-MIB::nsExtendOutput1Line.test = STRING: 123
   NET-SNMP-EXTEND-MIB::nsExtendOutputFull.test = STRING: 123
   NET-SNMP-EXTEND-MIB::nsExtendOutputNumLines.test = INTEGER: 1
   NET-SNMP-EXTEND-MIB::nsExtendResult.test = INTEGER: 0


Try with
   extend .1.3.6.1.4.1.2021.54.101.0 test exit 123
or
   extend   test exit 123

Dave

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
___
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: Restricting snmpv3 users to localhost only

2010-10-10 Thread Dave Shield
On 10 October 2010 18:44, Kurtzberg, David W.
david.kurtzb...@gd-ais.com wrote:
  Is there any way to restrict
 an snmpv3 user so that they can only talk to net-snmp from localhost?

No.

The SNMPv3 User Security Model is independent of the source location.
There's nothing within this model to take account of where the request
comes from.

You could use firewall configuration, or the sockets that the agent listens on
to only accept requests from localhost.  But that would be universal.
There's no way to restrict SNMPv3 requests to a particular source addresse.

Dave

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
___
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: returning an integer value for extend script?

2010-10-09 Thread Dave Shield
On 9 October 2010 10:47, Angelo Höngens a.hong...@netmatch.nl wrote:
 Is there a way I can force net-snmp to return an integer value?

Use the return code of the script, rather than the output
See  UCD-SNMP-MIB::extResult or NET-SNMP-MIB::nsExtendResult

Dave

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
___
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: 'life the universe and everything

2010-10-06 Thread Dave Shield
On 5 October 2010 16:12, Fulko Hew fulko@gmail.com wrote:
 I had my blinders on and saw that the walk returned ucdavis.254,
 (so thats what I was (only) looking for)
 but the corresponding MIB (NET-SNMP_PASS_MIB) is defined as .255,
 And the examples.c file uses .254.

 So... the .c file doesn't match the MIB. (one of them needs to change)...



Please have a closer look at the MIB file:

  a)   It is rooted at   netSnmp(8072).netSnmpExamples(2).255
*not*  ucdavis(2021).255

  b)  It defines
  'Example MIB objects for pass and pass-persist extension script'
   i.e. local/passtest and local/passtest.pl

This particular MIB file is not related to the 'example/example.c' code
(although the objects may well be the same)

The examples.c code is much earlier, dating from the v4 UCD era.
I can't remember whether we ever officially defined a MIB file
for these objects.
  Certainly, with the move to Net-SNMP (v5), we started being a
lot more rigourous in the MIB provision.  But there are still elements
of the early, laissez faire approach kicking around - examples/example.c
may well be one of these.

Dave

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
___
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: simple tool for generating SNMPv3 authkey privkey

2010-10-06 Thread Dave Shield
2010/10/5 Raphaël 'SurcouF' Bordet surc...@debianfr.net:
 Did you've already tried snmpkey provided with Net::SNMP Perl module ?

 http://search.cpan.org/~dtown/Net-SNMP-5.2.0/snmpkey.PL


Though remember that David's Net::SNMP module is not related to the
Net-SNMP project in any way   (other than the subject matter, obviously!).

So when it talks about using the Net::SNMP session() constructor
(with arguments -privkey or -authkey), this assumes that you are using
the Net::SNMP module.
   The equivalent elements of the  Net-SNMP project perl module
(i.e. SNMP::Session) does not have the same API, and won't recognise
these options.

  But of course, you can use David's module to query a Net-SNMP (or
any other) agent.   That's perfectly valid.

Dave

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
___
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: 'life the universe and everything

2010-10-05 Thread Dave Shield
On 5 October 2010 15:18, Fulko Hew fulko@gmail.com wrote:
 I have someone (and I tested it myself) with a Windows machine
 running Net-SNMP v5.5 (with as basic an installation as possible).

 While walking the MIB I find the following entries:

 ucdavis.254.1.0    life the universe and everything
 ucdavis.254.2.1.0  42
 ucdavis.254.2.2.0  1.3.6.1.4.42.42.42
 ucdavis.254.3.0    42 days, 0:42:42
 ucdavis.254.4.0    127.0.0.1
 ucdavis.254.5.0    42
 ucdavis.254.6.0    42
 ucdavis.254.7.0    0
 ucdavis.254.8.0    0

 I can't find anything in the config that would emit these
 and I can't find a MIB that supports ucdavis.254?

 Can anyone enlighten me?


See agent/mibgroup/examples/example.c

Dave

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
___
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: 'life the universe and everything

2010-10-05 Thread Dave Shield
On 5 October 2010 15:40, Fulko Hew fulko@gmail.com wrote:
 But that would mean that it (the example code) was 'built' into the  5.5
 release.
I wouldn't have expected that.  :-(

For a while now, I've been trying to get a description of the exact
procedure for building a binary release on a variety of systems
(including Windows).
   Partly so we are not so dependent on one or two individuals
for any given architecture, and partly so we can ensure that the
wider Net-SNMP community can know what to expect.


We've an admin meeting coming up next week.
I'll raise the issue there.

Dave

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
___
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: when is an handler called?

2010-10-01 Thread Dave Shield
On 1 October 2010 16:54, Leo Cacciari leo.cacci...@gmail.com wrote:
 I'm trying to understand a thing about  the new API. What does it
 means that

 A handler is netsnmp_create_handler() created and then
 netsnmp_register_handler() registered with the main agent at a given OID
 in the OID tree and gets called any time a request is made that it
 should respond to.

 Does the handler receive all the requests asking for an OID under the
 root OID at which the handler is registered?

Sort-of, yes.

That's the basic idea of registering a handler - it says
   I'm willing to deal with anything within this subtree

But there are two complications:

  -  If handler A registers one OID (say .1)
 and then handler B registers an OID within this subtree (say .1.3)
 then they are both laying claim to the same set of OID
   (i.e. everything under .1.3)
 Any requests received for OIDs within this disputed range
are given to the more specific registration (i.e. handler B)

  - The registration is actually of a handler *chain*, rather
 than a single handler routine.   The incoming request is
 passed to the start of the chain - but may not necessarily
 make its way through to the final handler.

For example, if you write a handler to deal with a scalar MIB object
(say sysDescr), and register this using 'register_scalar_handler' - then
this handler chain will include a helper which knows about scalars.
In particular, it knows that the only valid instance for a scalar object
is .0
   So if the agent receives a request for sysDescr.1, this request will
be passed to the registered chain, where the scalar helper will say
this can't possibly be valid, and return an error without ever calling
your sysDescr handler

Similar things may happen with table-based handler chains.

But the basic idea is that for any portion of the OID tree, there's
a handler (chain) which is ready to deal with requests for those OIDs.

OK?

Dave

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
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: support lifecycle

2010-09-24 Thread Dave Shield
On 24 September 2010 07:15, sebastian2...@gmx.de sebastian2...@gmx.de wrote:
 as long as 5.5 is supported ^^: Is there any known issue that the
 netsnmp_select_info-function is crashing? Is that maybe fixed with 5.6?

 I already asked that in another thread, but nobody answered right now.


I've no idea.

And unfortunately I don't have the time to investigate - it's the start
of the academic year, and that (being my paid employment) has to
take priority.

I could answer Jenna's query, because that simply involved regurgitating
existing knowledge.  But anything that requires active investigation, I'm
currently leaving to others within the Net-SNMP support community.

Sorry.

Dave

--
Nokia and ATT present the 2010 Calling All Innovators-North America contest
Create new apps  games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: support lifecycle

2010-09-23 Thread Dave Shield
On 23 September 2010 15:52, Constantine, Jenna
jenna.constant...@paradigmservices.com wrote:
 I am attempting to produce an obsolescence plan for software
 suppliers and I was hoping you could provide me with the support
 lifecycle for the below product:

 Net-SNMP Net-SNMP 5.2.2

As Ron has said, this version of the code is no longer supported.

The basic policy of the Net-SNMP project is to support the current
version of released code, along with the two previous branches.

   Version 5.5 was released in September 2009, at which point we
began the process of closing down work on the v5.2.x line.  The
final release of this line of code (5.2.6) was made in May.

We are about to release v5.6, which will then mark the beginning of
the end for the 5.3.x line.  There will probably be one more release
of this branch, to incorporate any outstanding bug fixes, and then
that line will be closed down.

Please note that the specific version that you mention (5.2.2) was
released in November 2005, and superceded in July 2006 by v5.2.3.
(As well as the first 5.3 release coming out in December 2005)
So this code is getting on for five years old, and has not been
regarded as current for well over four.


Dave

--
Nokia and ATT present the 2010 Calling All Innovators-North America contest
Create new apps  games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: a patch for memory leak

2010-09-22 Thread Dave Shield
 CC Does anybody know why netsnmp only allow 128 OID in one request?
 CC #define SNMP_MAX_CMDLINE_OIDS   128

 That's actually a mandate by the SNMP protocol.

Are you sure, Wes?
As far as I can tell, the protocol specifies the maximum number of
subidentifiers within a single OID, but not the number of varbind
that are allowed in a single request.

A very quick look at the code seems to indicate that this
constant is simply there to simplify the handling of the
command-line arguments.   I don't believe it's dependent
on anything in the SNMP protocol itself.

Dave

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: question about OCTET STRING encoding within an index

2010-09-22 Thread Dave Shield
On 22 September 2010 21:48, Fulko Hew fulko@gmail.com wrote:
 While testing and reviewing my SNMP test harness I've come
 across an instance of a variable with an index I can't explain
 (on my Fedora box).

 snmpwalk -v1 -cpublic -On localhost vacmContextName
 .1.3.6.1.6.3.16.1.1.1.1.0 = STRING:

 So the index on this column is '.0' (which is defined as an OCTET STRING).

 What I'm confused about is... is the zero:
 a) the length of the non-existent NULL string that follows? or
 b) is it a string that contains a NULL?

It indicates an empty string of length 0 - i.e. the default context,
as mentioned in the DESCRIPTION of this object.

 ... ISTR that if [a string is] the last variable
 in an index list, that the length always is omitted?

Incorrect.

If a string-based object is the last index, then the length
*MAY* be omitted - but that only happens if the index is
defined as IMPLIED.
  This is true for the snmpNotifyTable, but not for the
vacmContextTable.


 Does this mean that an empty OCTET STRING (or OBJECT IDENTIFIER)
 as the last INDEX component is a special case?

No - it means that the indexing of the two tables are
defined differently.

Dave

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
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 should agents handle an 'out-of-range' index ?

2010-09-15 Thread Dave Shield
On 14 September 2010 16:55, Fulko Hew fulko@gmail.com wrote:
 When I ran this test, the agent died and needed to be restarted.
 The variable I was querying was:

 1.3.6.1.4.1.2021.8.1.103.4294967295  aka 'UCD-SNMP-MIB:extIndex'.

Do you get the same problem when querying
1.3.6.1.4.1.2021.8.1.103.4294967294
?

I'm somewhat suspicious that 4294967295 is 0x,
i.e. the maximum possible 32-bit value.  So incrementing this
(to look for the next row) might well trigger 32-bit overflow issues.


 a) The definition of the variable says that the valid range is:
     SYNTAX  Integer32 (0..65535)

I doubt that the problem is related to the integer sub-range.
But you could easily check this using an index greater than 65535
but less than 2^32-1


 b) the net-snmp's snmpgetnext command line tool prevents me
 from using a BIG index

 $man snmpcmd

 INPUT OPTIONS
   -Irdisables checking table indexes 
   against the relevant MIB definitions.


Dave

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
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: snmpTrapOID having extra .0

2010-09-14 Thread Dave Shield
On 14 September 2010 06:31, sanjaykumar sanjay.ku...@globaledgesoft.com wrote:
 As snmpTrapOID is 1.3.6.1.6.3.1.1.4.1 but if look at the packet of snmptrap
 snmpTrapOID is 1.3.6.1.6.3.1.1.4.1.0
 Can someone have idea of what .0 signify in snmpTrapOID

snmpTrapOID is a scalar object, so has an instance subidentifier of 0
This holds for *ALL* scalar values.

Please see any book on SNMP, or the FAQ, or the output of walking
the agent.

Dave

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
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: trapsink2 - example\notification.c

2010-09-10 Thread Dave Shield
On 9 September 2010 15:30, Leo Lin hayashi_...@yahoo.com wrote:
  I also started the trap listener, snmptrapd

How?

 the snmpd.log shows that the trap is being sent, but some how I don't see it 
 in the stdout.

What's the configuration of snmptrapd?
Is it authorized to accept traps with the community secret


Dave

--
Automate Storage Tiering Simply
Optimize IT performance and efficiency through flexible, powerful, 
automated storage tiering capabilities. View this brief to learn how
you can reduce costs and improve performance. 
http://p.sf.net/sfu/dell-sfdev2dev
___
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: Installing Perl SNMP support on Windows

2010-09-09 Thread Dave Shield
On 9 September 2010 07:37, Vinod Nanjaiah vinod_nanja...@mindtree.com wrote:
 Another problem is that without completing the perl snmp installation,
 snmpconf is not available; without which snmpd throws up some warnings
 as shown below.



 snmpd
  No log handling enabled - turning on stderr logging
  iquerySecName has not been configured - internal queries will fail
  Warning: no access control information configured.
       (Config search path: 
 c:/usr/etc/snmp;c:/usr/share/snmp;c:/usr/lib)

      It's unlikely this agent can serve any useful purpose in this state.

      Run snmpconf -g basic_setup to help you configure the snmpd.conf
  file for this agent.

It's not complaining about snmpconf.
It's complaining about the file 'snmpd.conf'
(which may well not exist in any of the specified locations)

Without a valid snmpd.conf file (including suitable access control settings)
the agent will not provide any information at all.

This snmpd.conf file is simply a text file - you can create it using your
favourite text editor.  One possibility is to use snmpconf, as suggested
in this error message.  But this is not strictly necessary.
   The simplest approach is just to create a text file containing

 rocommunity public

(or your preferred community string), and this would be sufficient to
get the agent working again.


I'll leave the windows/perl issues to someone with more knowledge
and time.

Dave

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

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: netsnmp_udp_create_XXX Api

2010-08-26 Thread Dave Shield
On 26 August 2010 07:52, sanjaykumar sanjay.ku...@globaledgesoft.com wrote:
 Could anyone explain under what condition below API will called:

 1. netsnmp_udp_create_tstring
 2. netsnmp_udp_create_ostring


I believe that the 'tstring' routine is used when an SNMP target is
requested using a notation such as udp:localhost:161
This would probably also cover examples where the transport
prefix is implicit, so I suspect it would also be called for localhost

The 'ostring' routine is used when an SNMP target is requested
using OID-valued objects - such as when setting up a target via
SET requests to a MIB table.

Wes or Robert can now correct me

Dave

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
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: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.

2010-08-26 Thread Dave Shield
On 26 August 2010 06:27,  anup.shan...@emc.com wrote:
 Could you get a chance to look into this.

I've managed to reproduce the problem, yes.
   (Once I'd stripped out all of the remaining
C++ stuff from your example code!)

Unfortunately I've only got one day before I leave
for a week's holiday, so I'm not going to be able
to look at finding a solution for a while.

And I can't promise anything about how quickly I'll
be looking at it when I get back.   The run-up to the
start of the academic year is one of the busiest times
for University support staff, so Net-SNMP work
will have to take a back seat for the time being.

Hopefully one of the others will be able to make a
suitable suggestion in the meantime.

Dave

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
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: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.

2010-08-26 Thread Dave Shield
On 26 August 2010 12:10,  anup.shan...@emc.com wrote:
 Any one else in the group, have faced this issue. it's extremely
 high priority to get this issue resolved.

 Any help in this is highly appreciated.

If you want a quick-n-dirty hack to get things working,
you could always tweak the vplexDirectorFETable_entry
(and similar) structure to include *two* fields for the
IP address - one held in host order and one in network
order.
   Then use one for the index processing (in the get_first
and get_next routines), and the other in the handler
itself (for the column object).

Dave

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
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: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.

2010-08-25 Thread Dave Shield
On 25 August 2010 07:21,  anup.shan...@emc.com wrote:
 I changed the code as below, but now Get fails and Get next works
 The code snipprt is as below::

Hmmm...

I'm not quite sure what is happening here.
Could you please post (as attachments) the *complete* code
of the MIB module that you are working with.

Dave

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
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: A question of net-snmp

2010-08-25 Thread Dave Shield
On 25 August 2010 03:02, AC. achuan...@gmail.com wrote:
 When I used snmptable to get the information of the table A, it will
 contact the handler of table A.
 But it will contact the handler of table B, too.

But only once, at the very end.
(I presume?)


 I see that the command snmptable use the getnext to retrive the
 information,
 but is that correct cause I don't need the information of table B?

Please consider the following question:
   - How does the snmptable command know when it has
 received the last row of table A?



 PS, if you need the source code that about these 2 tabls,
 please response to me and I will attached my code for you.
 But I think that the problem doesn't be relate to them.

No - you are quite correct.
The reason you are seeing this extra unnecessary request
is tied up with the fundamental design of SNMP.  It's not
specific to your particular code - you would see exactly the
same behaviour with any other table.

Dave

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
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: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.

2010-08-25 Thread Dave Shield
On 25 August 2010 08:30,  anup.shan...@emc.com wrote:
 Attached is the code..

And the header files?

What I'm looking to do is to try out your MIB module
on my local system, so I can see exactly what is going
wrong.   In order to do that, I need *ALL* the stuff that
you have added (including the C++ objects that you
appear to have defined)

Or better - a version of the code that uses standalone,
hardcoded dummy data (rather than pulling it in from
VPLEXConfigurator) , but still displays the same problem.

If we can isolate the problem using such a test setup,
then it should be possible to apply the same fix to your
live setup.

Dave

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
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: A question of net-snmp

2010-08-25 Thread Dave Shield
On 25 August 2010 09:40, AC. achuan...@gmail.com wrote:
  I see that the command snmptable use the getnext to retrive the
  information,
  but is that correct cause I don't need the information of table B?

 Please consider the following question:
   - How does the snmptable command know when it has
     received the last row of table A?

 I also think so, but It is a waste of resource, especilly in my condition.

It's not a question of waste of resources.
This is fundamental to how walking SNMP tables works.
You will *ALWAYS* run off the end of one table, and
on to the next.   That's the only way that the client command
knows that it has reached the end of the table.



 There are 3 main contact function in my code.
 1. handler
 2. get_first_data_point: It wll get all the data of the table
 3. get_next_data_point
 When I typed snmptable to get table information, I find the handler was
 contacted servel times,

Yes - once for GETNEXT request.
  (Which is typically once for each row of the table)
*ALL* table handlers work this way - they are inevitably
called once for each incoming request.   You cannot
get away from that.


But you've suddenly changed the question.
You are no longer talking about switching from the table A
helper to table B.   You now seem to be concerned about
how often the table A code is being called.


 and the get_first_data_point function was contacted the same times.

Yes - that's how the iterator works.
For each individual incoming request (GET or GETNEXT),
the 'get_first' hook routine will be called once,
and the 'get_next' hook routine will be called multiple times
(typically as many times as there are rows in the table).

We state very clearly in the documentation that the iterator
helper is not the most efficient mechanism for implementing
a table.   It's designed for relatively small tables, where the
data is naturally held in a random order.


 So it will get ALL data of the table servel times. (the waste of resource)

Which is why we repeatedly recommend that people use the cache
helper, which will save re-loading the table data multiple times
in quick succession.



 I want to improve it

a)  Look at using the cache helper
   (mib2c -S cache=1 -c mib2c.iterate.conf ...)

b)  Look at using one of the other table helpers
   (e.g. mib2c -S cache=1 -c mib2c.table_data.conf ...
 or the MfD framework)


But if you use one of the more inefficient helpers,
in a relatively inefficient way, then yes - you are going to
see performance implications.


Dave

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
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: A question of net-snmp

2010-08-25 Thread Dave Shield
On 25 August 2010 10:45, AC. achuan...@gmail.com wrote:
 The cause I change the question suddenly is
 1. My tables are big sometimes.
 2. When the table B was the big one and I wanna get table A,
     it wastes time and resource to get a *BIG* table B that I don't neet it.

If your tables are big, then I *strongly* suggest you use
a more efficient approach than the iterate helper.

Personally, I tend to go for the table_data helper,
together with a local cache.   Robert would probably
advise you to use the MfD framework.
(And although I don't like it myself, this should also
work more sensibly in this situation).


But bear in mind that although a walk of table A will trigger
a query for the next OID supported by the agent, this won't
involve walking the *whole* of table B.  There should only
ever be one value returned from table B (being the value
immediately following the last entry of the last column of
table A).
  So it should be a one-time overhead of loading the
data, plus a single pass through the get_first/next hooks,
and one invocation of the table B handler (for one column value).

If this continues to be an issue, you could always tweak
the MIB to define a scalar object lying in between the two tables.
So walking off the end of table A would retrieve this
buffering scalar value, rather than loading table B.


Dave

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
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: Fails:: SNMPGetNext and GetBulk has the IP Address Index reversed in the request.

2010-08-24 Thread Dave Shield
On 24 August 2010 13:48,  anup.shan...@emc.com wrote:

        snmp_set_var_typed_integer( idx, ASN_IPADDRESS, 
 ntohl(entry-vplexDirectorPrimaryIpAddr) );

The SMI type  IpAddress  is not an integer-based type.
It is a (four-octet) binary string, which holds the address
in network-byte order.   See RFC 2758, section 7.1.5

You *might* be able to get away with treating it as an
integer in this way, but I certainly don't think you should
be  returning it in host order.

Dave

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: net-snmp 5.2.X compilation errors in QNX Momentics 6.3.0

2010-08-24 Thread Dave Shield
On 24 August 2010 11:10, Ali Mirza, Rashid rashid.alimi...@salik.ae wrote:
 I want to compile a net-snmp agent, ver 5.2.X and use it on QNX.

The 5.2.x line is several years old now, and is no longer being maintained.
If you are having problems, it would definitely be worth trying with one
of the newer releases (e.g. 5.5 or the upcoming 5.6)

Dave

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: net-snmp 5.2.X compilation errors in QNX Momentics 6.3.0

2010-08-24 Thread Dave Shield
On 24 August 2010 15:39, Ali Mirza, Rashid rashid.alimi...@salik.ae wrote:
 Thanks for that, but what about compatibility issues if any with qnx 6.3.0?

What compatibility issues did you have in mind?

Please note that it's very difficult to offer advice or assistance
given the vagueness of your questions so far.
(facing several issues,   compatability issues if any
  errors in the code)

If you are having problems, it is vital that you give as much
detail as you can.   None of us can read your mind, and we
don't magically know exactly what you're referring to.

Dave

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: net-snmp HOST-RESOURCES-MIB::hrStorage

2010-08-23 Thread Dave Shield
On 23 August 2010 15:34, Julian Grunnell julian.grunn...@webfusion.com wrote:
 I've tried the following versions with the results seen below,
 all built from source with a simple ./configure --prefix=x;

Try using
   ./configure --enable-new-features --prefix=x

(possibly with 5.5,  definitely with 5.6.*)

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: net-snmp v5.5 agent authenticationFailure for noAuthNoPriv V3 access

2010-08-20 Thread Dave Shield
On 19 August 2010 23:29, Ron Rader ron.ra...@cipheroptics.com wrote:
  So these rouser statements allow specification of a MINIMUM security
 level, which defaults to auth.

Correct.
You need a line such as

rouser xxxuser noauth

to allow noAuthNoPriv requests.


  No problem.  I'll leave as-is and won't bother changing anything until
 someone complains.  Not quite sure why they'd want to use noAuthNoPriv
 anyway, but it's good to test in any case.

The main advantage of SNMPv3 over SNMPv2c is the addition of
security.   So using noauth has all the additional complexity of SNMPv3,
without actually taking advantage of the main advantage!

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Provifing ipAddrTable through subagent

2010-08-20 Thread Dave Shield
On 20 August 2010 09:43, Deepali Singalkar deepali.singalk...@gmail.com wrote:
 I could override the ifTable of master agent successfullly by ifTable of
 subagent by using option -I -ifTable.
 But same is not working for ipAddrTable,  with option -I -ipAddrTable
 Is this because ipAddrTable is depricated?

It depends on which version of the code you are using.
(Not the release version - I mean which MIB module code is
being included in the agent).

If you are using the newer MIB re-write code, then this pulls
in the module from agent/mibgroup/ip-mib/ipAddrTable/
and so  -I -ipAddrTable should work.

But if you're using the older code from agent/mibgroup/mibII/ipAddr.c
then this is initialised as part of the init_ip routine.
So you'd need to use  -I -ip  instead (which would disable
*all* of the IP-related information)

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: net-snmp HOST-RESOURCES-MIB::hrStorage

2010-08-20 Thread Dave Shield
On 20 August 2010 15:12, Julian Grunnell julian.grunn...@webfusion.com wrote:

  I’m using snmp via a Cacti server to query disk usage on a client with a 21Tb
 partition defined – yet I seem to get the disk size incorrectly reported.


 NET-SNMP version:  5.3.2.2

Can you please try with the most recent code (either 5.5, or the upcoming 5.6).
Both of those have a re-worked version of the hrStorageTable, which ought to
handle this situation rather better than the earlier code did.

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Please advise about snmpget over IPv6

2010-08-19 Thread Dave Shield
On 19 August 2010 15:45, Ron Rader ron.ra...@cipheroptics.com wrote:
  The following command (using net-snmp tools v5.5) allows me to query
 net-snmp agents (v5.5) to walk the MIB (using SNMPv3 and IPv6):

 snmpwalk -v 3 -n  -u auser -l authNoPriv -a MD5 -A password 
 udp6:[2003:a8::208] system

  However, the same host times out when I try to switch to SNMPv2c:

 snmpwalk -v 2c -c public udp6:[2003:a8::208] system

  That seems strange to me.


What are the access control settings in your 'snmpd.conf' file?
Remember that for community-based requests using IPv6
you need to use rocommunity6 rather than rocommunity


Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: net-snmp v5.5 agent authenticationFailure for noAuthNoPriv V3 access

2010-08-19 Thread Dave Shield
On 19 August 2010 17:39, Ron Rader ron.ra...@cipheroptics.com wrote:
  While I'm on the subject of weird MIB walk responses... I can't seem
 to get V3 access using noAuthNoPriv users.  This results in snmpwalk
 authorizationErrors and authenticationFailure traps.  Is this another
 RTFM moment, like the previous rocommunity6 configuration item?

Probably, yes.
What access control settings are you using?

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: net-snmp v5.5 agent authenticationFailure for noAuthNoPriv V3 access

2010-08-19 Thread Dave Shield
On 19 August 2010 19:14, Ron Rader ron.ra...@cipheroptics.com wrote:

 createUser auser
 rouser auser

  Hmmm... snmpwalk -v 3 using either auser or puser with the
 corresponding credentials works, but using noauser bombs through
 authorization Error (access denied to that object).

Please check the man page description of the rouser directive.

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: A question of net-snmp

2010-08-18 Thread Dave Shield
On 18 August 2010 06:47, AC. achuan...@gmail.com wrote:
 How exactly are you retrieving the table.

 I used the snmptable command to retrive.

In which case, things are working as expected.

snmptable will send one GETNEXT request for each
row of the table, plus one additional request to discover
that it's reached the end.

Try working this through by hand - you should see why
things work that way.


Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: A question of net-snmp

2010-08-18 Thread Dave Shield
On 18 August 2010 09:01, AC. achuan...@gmail.com wrote:
 I see that, but I have to follow two rules:
 1. When receiving the request command that want to get table information,
 it must ask the information from my kernel.
 - So I remove the check, if(tlist == NULL), to let agent ask
 information every request.

That description is essentially meaningless.
I've no idea what your code looks like, so giving me
one line in isolation is no use whatsoever.


 2. At the same request to retrive the table, I just want the agent to ask
 the information one time only.
 -- This is my problem. Because it used the command, getnext, to
 retrive the table.
  I have only one idea to do it now.
  I can calculate the time to check it. (e.g. ask information per 30
 seconds)
  Do you have better idea to resolve it?


That's the reason we suggest you use the cache handler.
This will allow you to query the kernel once, and keep the
information available for the next few seconds - typically
sufficient to serve a complete snmpwalk or snmptable.

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: dropping trap

2010-08-18 Thread Dave Shield
On 18 August 2010 03:50, k b my_login...@yahoo.com wrote:
 I'm a newbie to net-snmp toolkit. snmptrap does not seem to be working.
 Error message returned: No access configuration - dropping trap and
 This receiver will *NOT* accept any incoming notifications.

 See  the snmptrapd.conf(5) man page

In particular, the section entitled Access Control

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: snmptrapd skips traphandle line that are not default from the snmptrapd.conf file.

2010-08-18 Thread Dave Shield
On 18 August 2010 15:12, Daniel Leicht daniel.lei...@gmail.com wrote:
 I'm having a problem making the snmptrapd behave the way I would like it to.
 I'm trying to catch a specific OID, but can't really do so:



 There are lots of traphandle lines above, but none of them could catch
 this one:
  /usr/bin/snmptrap -v 1 -c public 10.0.0.141 1.5.4.2.2.2 localhost 6 17 ''
 1.5.4.2.2.2.1 s Hello


Try catching
.1.5.4.2.2.2.0.17

See RFC 3584 for details of how SNMPv1 traps are mapping into
SMIv2 Notification OIDs.

(And where did that OID come from?
  I've never come across any iso.5 objects before!)


Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: How to configure snmpd.conf file via CLI?!

2010-08-17 Thread Dave Shield
On 17 August 2010 07:57, Alexander King new...@foxmail.com wrote:
 I want to know whether I can configure the snmpd.conf file via CLI,such as
 write some settings into the file via LCI.and the commands.

   service snmpd stop
   $EDITOR /etc/snmp/snmpd.conf
   service snmpd start


Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: A question of net-snmp

2010-08-17 Thread Dave Shield
On 17 August 2010 07:28, AC. achuan...@gmail.com wrote:
 I can get table information that I need by using mib browser, but I find two
 questions when I do it.
 Q1: If I use the command to get Table A, the agent will ask the
   inforation A and information B.

The command is a bit vague.
How exactly are you retrieving the table.

Remember that many SNMP clients typically work by issuing a series
of GETNEXT requests, starting at the beginning of the table, and
continuing until this runs off the end.   But the only way that the client
knows that it has reached the end of the table, is to issue a request
that returns something else (i.e. the next object in the MIB tree)
   This is normal - most clients would hide this from the network
administrator.



 Q2: If I get a table Information only ONE time, but the agent will ask the
 information more than one time.

Again - this question is really too vague to answer.
But it's probably the same underlying answer.
You are getting confused between a single command (snmpwalk
or snmptable), and the sequence of (many) SNMP requests that
are used to implement this command.


See any good book on SNMP for more details.

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Generating a trap with table infomation

2010-08-13 Thread Dave Shield
On 13 August 2010 13:28, Norasyikin MD Ali norasyikin.md_...@3roam.com wrote:
 I'm trying to generate a trap containing all the information from my
 activeAlarmTable which has 8 columns.
 In my agent, I created a function :
 tr_status tr_mib_agent_generate_alarm_event_trap(int type,
                         const char *oidstr1, uint32_t id,
                         const char *oidstr2, int class,
                         const char *oidstr3, char *oid,
                         const char *oidstr4, int cause,
                         const char *oidstr5, int type,
                         const char *oidstr6, int severity,
                         const char *oidstr7, char *reason,
                         const char *oidstr8, char *time){

Why are you passing the OIDs into the routine?

The list of varbinds is fixed for a given trap, so the list of
OIDs is basically known, and can be defined within the
body of the routine itself.   (Or as Wes suggests, use a
single OID buffer, and tweak the column subidentifier for
each varbind in turn).
   In either case, all you need to pass in as parmeters are
the index of the row concerned, and the list of values.

You can use 'mib2c.notify.conf' to generate a suitable template
for this routine.

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Loading a particular MIB causes init_snmp to crash

2010-08-13 Thread Dave Shield
On 13 August 2010 19:09, Gaurav Chaturvedi gauravchaturve...@gmail.com wrote:
 Hi Dave,
 I am glad to say that I have fixed the issue of library crashing due to
 erroneous MIBs or any parse error in MIB and I have done it within a day.

 Please let me know how to submit the fix/patch now.

See
http://www.net-snmp.org/support/patches.html


 I must say here that it is really an amazing learning experience and an
 ultimate proud feeling that comes within yourself after finding and fixing
 such typical issues.

Yes - it's a great feeling, isn't it.
That's why most of us are involved with these sorts of projects.

 I would love to be the part of Coders of Open source libraries in future
 also.

Glad to hear it.
Most open source projects are only too delighted to receive bug reports,
patches and updates - no matter how small.   Even things as simple as
fixing spelling mistakes in documentation - everything serves to gradually
improve the quality of the various projects.

We look forward to receiving your patch.

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: SORRY! I found net-snmp 5.5 didn't provide default implementation to retrieve HOST-RESOURCES-MIB::hrProcessorLoad value, is that so?

2010-08-12 Thread Dave Shield
On 12 August 2010 04:09, orientropy i orientr...@gmail.com wrote:
 on XP platform, i can't use net-snmp 5.5 to get cpu load information.

 should i implement my own handler to retrieve such system information?


It's not necessary to implement a completely new handler for this, no.
What's missing is the relevant code under 'mibgroup/hardware/cpu'

This directory holds the modules responsible for retrieving CPU information
on a variety of architectures, and making it available to the agent in a
standard form.   The host/hr_proc module then makes use of this
to populate the hrProcessorTable  (and the ucd-snmp/vmstat module
makes use of the *same* information to populate the equivalent Net-SNMP
specific CPU statistics).

So in order to implement the hrProcessorTable on a new architecture,
all that is needed is to provide a suitable code file within hardware/cpu.


Or, as Bart suggests, you could look at linking in with the Microsoft
provided DLL.

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: loading more snmpd.conf questions

2010-08-12 Thread Dave Shield
On 12 August 2010 09:28, Markus Hofer markus_ho...@gmx.at wrote:
 So I understood that if in SNMPCONFPATH several different paths for a
 snmpd.conf are specified then each of these files will be loaded.

 Will the result of this overall configuration be a mixture of all 
 configuration
 files specified in SNMPCONFPATH?

Yes.
Essentially think of this as concatenating all of these config files
together into one big file, and then processing that.


 If I specified v2 communities in one of these .conf files is it
 possible to redifine or even undifine these v2 communities
 by another, more specific, later loaded .conf file?

I'm not sure.   It probably depends on exactly what you are trying to do.

Try experimenting with two or three directives in a single file,
and see how they interact.   You ought to get the same effect
as if those directives were spread across multiple files.

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: SORRY! I found net-snmp 5.5 didn't provide default implementation to retrieve HOST-RESOURCES-MIB::hrProcessorLoad value, is that so?

2010-08-12 Thread Dave Shield
On 12 August 2010 10:03, orientropy i orientr...@gmail.com wrote:
 it still responded: duplicate registration (mibII/snmp,
 C:\WINDOWS\System32\snmpmib.dll)handler registration failed.

If you want to turn off the Net-SNMP 'mibII/snmp' module,
then use  '-I-snmp'

In general, if a module is loaded using the routine 'init_xxx'
then it would be disabled using  '-I-xxx'

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: net-snmp 5.4.2 - error when compiled for IPV6 support

2010-08-12 Thread Dave Shield
On 12 August 2010 11:41, Ravi Chandran rchand...@ixiacom.com wrote:
 We have been using net-snmp version 5.4.2 successfully. Now we wanted to
 support IPv6 too.

 ..\..\snmplib\inet_ntop.c(79) : error C2373: 'inet_ntop' : redefinition;
 different type modifiers

 NMAKE : fatal error U1077: 'E:\Program Files\Microsoft Visual Studio
 9.0\VC\BIN\cl.exe' : return code '0x2'


 Can some point what I’m missing or what I should do to fix this and get a
 IPv6 enabled net-snmp binaries?

This problem has been fixed in release 5.4.3
Try compiling that version of the code.

   (You *might* get get away with taking the two files
win32/net-snmp/net-snmp-config* from the 5.4.3 code,
and copying them into your 5.4.2 tree.  But no promises)

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: SNMP Make error

2010-08-12 Thread Dave Shield
On 10 August 2010 22:12, Ernie Lacson elac...@successfactors.com wrote:
 While running: make test, I get the following error.

 In file included from /usr/include/kvm.h:14,
  from kernel.h:11,
  from snmp_vars.c:143:
 /usr/include/sys/proc.h:202: error: syntax error before p_t1_lgrpid
 /usr/include/sys/proc.h:203: error: syntax error before p_tr_lgrpid
 /usr/include/sys/proc.h:337: error: syntax error before '}' token

 In file included from kernel.h:11,
  from snmp_vars.c:143:
 /usr/include/kvm.h:44: error: syntax error before '*' token
 /usr/include/kvm.h:45: error: syntax error before '*' token
 /usr/include/kvm.h:48: error: syntax error before proc_t


We've had this problem reported a couple of times over the last year.
But neither of the people involved came back with the requested
information to help track down the problem.

(Quoting Thomas from those earlier reports)

   What exact configure options did you use?
   What gcc version and package are you running?
   What's the value of HAVE_KVM_H and HAVE_SYS_PROC_H
   in include/net-snmp/net-snmp-config.h in the build dir after
running configure?
   Do you see similar errors wrt. kvm.h and sys/proc.h in config.log?



My questions:
   What do lines 202  203 of  /usr/include/sys/proc.h look like?
If they refer to a type 'lgrp_id_t',  does this appear anywhere in
the header file /usr/include/sys/types.h?

As a quick-n-dirty test, try tweaking the sys/proc.h header file
to remove the word volatile from lines 202  203, and re-compile.
Does that make any difference?


Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: is there a quick hack to force a canned response for an arbitrary OID?

2010-08-12 Thread Dave Shield
On 12 August 2010 14:27, Fulko Hew fulko@gmail.com wrote:
 I'm trying to help someone implement support for a private MIB,
 and he needs to (temporarily) respond to a particular OID in order
 to fake out an NMS to query that private MIB he's testing.

 Is there anything I can add to snmpd.conf to accomplish this?

$ man snmpd.conf

   override [-rw] OID TYPE VALUE
  This directive allows you to override a particular OID
with a different value

Dave

mutter mutter documentation mutter mutter waste of time mutter mutter

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: net-snmp 5.4.2 - error when compiled for IPV6 support

2010-08-12 Thread Dave Shield
On 12 August 2010 14:45, Ravi Chandran rchand...@ixiacom.com wrote:
 When I  compiled with OpenSSL support the compilation fails.
 I could not locate the hmac.h file which it is trying to locate.

   [snip]

 I could not locate the file hmac.h or openssl folder in the net-snmp-5.4.3 
 package.
 Is this file not part of net-snmp package.

No.


   Am I missing  anything that I need to have in order to compile this?

The Open SSL package !

This is a separate project - not part of Net-SNMP.
It's a library that our code can make use of if this is available,
but it's not something that we ship ourselves.

If you don't have it installed, then you can't use it  :-)

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: What is this OID?a very strange,long OID problem.

2010-08-11 Thread Dave Shield
On 11 August 2010 00:12, Alexander King new...@foxmail.com wrote:
 Like previous mails,I got the generated code use
  mib2c -S cache=-1 -c mib2c.iterate.conf 

I've just reviewed the mib2c.iterate.conf template, and that is not
going to work in the way that you expect.

 The option -S cache={something}   is a simple on-off flag.
If it has a (non-empty) value, then the cache code will be included.
If it's not specified, then the cache code will not be included.
The actual value is not important -  -S cache=-1  means exactly
the same as -S cache=1   or   -S cache=whiteElephant

If you need to change the cache timeout, then this is done by editing
the header file (xxx_TIMEOUT).The -S cache value is not relevant.


 but I got  NetsnmpCachefree  type comflict problem,in
 my uit.c file, I deleted the  int  return type keyword before the
 XXXcachefree function, then the compiling wrong cleared

That problem has been fixed in the code tree, and is included
in recent releases (5.2.6, 5.4.3 and the upcoming 5.6).   The
fix will also be included in the next releases on the other active
lines (5.3.4 and 5.5.1)



 and then I run make install command got snmpd snmptrapd executable program
 and run it in my device,every time when I use MG-soft walk the whole
 MIB-tree,the snmpd corrupted

What do you mean by the snmpd corrupted?

 when the browser run the OID( something like
 the attachment,the red line in the pic).

 I cannot find where my code is wrong,and what the OID's value is.

The OID mentioned in your image is part of the NET-SNMP-VACM-MIB
(in particular, NET-SNMP-VACM-MIB::nsVacmStatus)
Try loading the NET-SNMP* MIBs into your MIB browser, or use
the Net-SNMP tools (snmpwalk)   -  this should then interpret the
OID index values for you:

   $ snmptranslate
.1.3.6.1.4.1.8072.1.9.1.1.5.9.77.121.82.87.71.114.111.117.112.0.0.1.6.110.111.116.105.102.121
   NET-SNMP-VACM-MIB::nsVacmStatus.MyRWGroup..0.noAuthNoPriv.notify



It has absolutely nothing to do with your code.

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: net-snmp cache timeout setted but it didnot work!

2010-08-11 Thread Dave Shield
On 11 August 2010 11:36, Alexander King new...@foxmail.com wrote:
 I use the command mib2c -S cache = 10 -c mib2c.iterate.conf 

Please re-read my earlier message.
You do *NOT* specify the cache timeout on the mib2c command line.
Either use -S cache=1   or nothing at all
No other choice will make any difference whatsoever.



 the attachment is my code,pls give me some hints.

First hint - start with something simpler!

I do not have the time to look through nearly twelve thousand
lines of code , covering 60-odd scalars, and 30+ tables,
in order to find out where you might be going wrong.

Start by implementing *ONE* table, and get that working first.
Than, and only then, would it be worth extending the code to
cover the rest of your MIB.

But trying to do everything at once means you'll be overwhelmed
in the sheer volume of code when things don't work straight off.



Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: net-snmp cache timeout setted but it didnot work!

2010-08-11 Thread Dave Shield
On 11 August 2010 13:57, Alexander King new...@foxmail.com wrote:
 First,I think use  mib2c -S cache = -1 -c mib2c.iterate.conf  via CLI can
 get the right generated code, and initialized the code is ok.but I got a lot
 of compilling problems.

 what I can do about this, Dave,
 where and how I need modify my code,or net-snmp code?
 pls,tell more,I really need tell me detialed.

I don't think you need to modify Net-SNMP code.
The problem is almost certainly in your code.

What you should do is exactly what I suggested a few hours ago.
Generate code for ONE table, and concentrate on getting this working.

Try
 mib2c   -S cache=1  mib2c.iterate.conf   mailRecTable
  and go from there.


Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Undefined reference to 'pthread_create' link error (v5.5 w/IPv6)

2010-08-11 Thread Dave Shield
On 3 August 2010 16:47, Ron Rader ron.ra...@cipheroptics.com wrote:
  I'm running into this configure bug:

 http://www.mail-archive.com/net-snmp-users@lists.sourceforge.net/msg24798.html

  Is there a v5.5 patch for this

This has been fixed by SVN revision 19048
See 
http://net-snmp.svn.sourceforge.net/viewvc/net-snmp?view=revisionrevision=19048

The upcoming 5.6 release should handle this situation properly,
as will all future 5.5.x releases.


Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Loading a particular MIB causes init_snmp to crash

2010-08-10 Thread Dave Shield
On 10 August 2010 08:14, Gaurav Chaturvedi gauravchaturve...@gmail.com wrote:
 I am using net-snmp v5.5. On loading a particular MIB (attached with the
 mail), my program crashes on init_snmp API.
 On removing this MIB from the MIB directory, everything works fine.

 Please share your views on what may be the issue in this case.

Well the obvious error in this MIB is in the TRAP-TYPE definition:

   EventMonitorTrap TRAP-TYPE
  ENTERPRISE  EMC CLARiiON Advanced Storage Solutions
  VARIABLES   { .}
  DESCRIPTION
  
  ::= 2


The ENTERPRISES clause is meant to contain the object identifier (name
or numeric OID) of the defining enterprise.   It's not an arbitrary string.
See RFC1215, section 2.2.1 for a typical example.

That's almost certainly the cause of the crash.
There are some other errors as well
   (OBJECT-TYPE should probably be imported from RFC1212 rather than 1155,
TRAP-TYPE is not imported at all, and the EventMonitorTrap name is
invalid - it needs to start with a lower-case letter)
but I doubt those are likely to cause any real problems.

It'll be the bogus enterprise value that's hitting you - try replacing
it with 'clariion'
and see if that works any better.

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Loading a particular MIB causes init_snmp to crash

2010-08-10 Thread Dave Shield
On 10 August 2010 09:25, Gaurav Chaturvedi gauravchaturve...@gmail.com wrote:
 Thanks for the response. I know the error in MIB file (same as specified by
 Dave), but should an erroneous value in MIB crash the application?

No - of course it shouldn't.
The MIB parser wasn't written in the expectation of such a broken MIB,
and really needs to be tightened up.


 I want to know some way that can report error on MIB and exit/write a log.

The first step is to investigate what exactly is causing the parser to crash,
and fix that.   If you can provide a suitable patch, then we would be happy to
include it in the code for future releases.

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Providing an ifTable through a subagent

2010-08-10 Thread Dave Shield
On 10 August 2010 10:07, Tsolakos Stavros stsola...@gmail.com wrote:
 Does the -I -ifTable option prevents access to the ifTable
 even if provided by a subagent?

No.
The option '-I-ifTable' when given to the main agent simply means
  don't invoke the routine 'init_ifTable'

The effect of this is that the main agent won't try to register the ifTable,
leaving the way clear for your subagent to provide this information.

The problem will lie elsewhere - either in how your subagent registers
with the master agent, or in how it responds to queries for this table.

I would suggest that the ifTable is a fairly complicated table to start
with.   It would probably be a good idea to try with a simpler demo table
first, and make sure you can register and query that successfully,
before moving on to more compilcated tables.

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Re: net-snmp init_XXX() get data periodically( or cyclic ) problem

2010-08-06 Thread Dave Shield
On 6 August 2010 10:52, Alexander King new...@foxmail.com wrote:
 is it the meaning use mib2c -S cache=-1 -c mib2c.iterate.conf uit

No.
You are confusing different things.

The command to generate the code template would be
mib2c -S cache=1  mib2c.iterate.conf uit

Here the value '1' means include the code for a local cache
(as opposed to '0' which means don't include any cache code)


What Kathy was referring to is the value used for the cache timeout
(which is specified as part of registering the cache handler).

   This is normally a timeout in seconds, and the agent will use values
from the cache until the cache is that many seconds old.   At which
point the next request will trigger a reload of the cache with a new
set of values, which will then be used for the next N seconds.

However if this cache timeout has the special value -1,
then this indicates that the cache should *always* be regarded
as out-of-date, and hence every single request will trigger a
reload.
   This will obviously be somewhat timeconsuming and inefficient,
hence it's not something that we would recommend.   But if you
do insist on re-loading the data every time (and can accept the
increased load), that's how you could do it.

But I *strongly* suggest you experiment with small (non-negative)
timeout values first.

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Error using SNMPv3 in SUSE 9,3

2010-08-06 Thread Dave Shield
On 6 August 2010 14:35, Nils Achtergarde n.achterga...@media-net.de wrote:
 Yeah, great. Parsing problem was the right hint. The entry made by the
 create-user command was:

 createUser nagios AuNg6ud4thaiK8EJ MD5 AuNg6ud4thaiK8EJ DES

 But the algorithm has to be in front of the password:

Which version of the create-user command are you using?
   (Try 'net-snmp-config --version')

I've just run the same command with a fairly recent version (5.4.3)
and get the following:

   $ net-snmp-config --create-snmpv3-user -ro -x DES -a MD5
-A myauthpass -X myprivpass nagios
   adding the following line to /var/net-snmp/snmpd.conf:
createUser nagios MD5 myauthpass DES myprivpass

as expected.
It looks suspiciously as if your version of the config command
has got confused about the protocol/password values.


Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Error using SNMPv3 in SUSE 9,3

2010-08-06 Thread Dave Shield
On 6 August 2010 15:20, Nils Achtergarde n.achterga...@media-net.de wrote:
 Which version of the create-user command are you using?

 Im running version 5.2.1, which is the preinstalled one on the system.

Aha!
I've just checked that script, and it's got the -A/-a processing the
wrong way round.  (And similarly for -X/-x)

The script was re-written for the 5.3 release, and has worked
properly ever since,   But the 5.2.x line (and earlier) is broken,
and nobody has noticed until now!

Dave

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: snmpcmd Manpage is Broken

2010-08-05 Thread Dave Shield
On 4 August 2010 21:17, Prest, Mike mpr...@highbeam.com wrote:
 The snmpcmd Manpage doesn't work. It generates a 404.

Where is the link you are following, please?

Dave

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
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: snmpcmd Manpage is Broken

2010-08-05 Thread Dave Shield
On 5 August 2010 12:04, Prest, Mike mpr...@highbeam.com wrote:
 From the Snmpd.conf man page
 http://www.net-snmp.org/docs/man/snmpd.conf.html

 It actually looks like all the links on the page that reference /docs are 
 broken.
 It looks like someone forgot to include a  at the end of most of the link 
 references
 (on the snmpd.conf.html page).

Unfortunately, it's not just that one page.
The same problem seems to affect most of the man page web pages.



 Should be an easy fix.

Easy, but tedious!

OK - I've updated the files in the SVN repository.
I'm not sure how long that will take to propogate through to the live web pages.

I'm also not sure where this problem came from.   I've just tried
re-creating the
HTML man pages from the current source, and the link syntax looks fine to me.
  (I'm not convinced that all of the links are actually correct, but that's a
different problem)

Dave

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
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: nmpd authcommunity context option missing

2010-08-05 Thread Dave Shield
On 4 August 2010 23:04, Claus Klein claus.kl...@arcormail.de wrote:
 while working with snmpd V5.5 I tried to configure a mapping of v2c
 community to v3 context with authcommunity.

 I was wondering that the man page is different from configuration:

 man snmpd.conf:
     com2sec [-Cn CONTEXT] secName IPv4-network-address[/netmask]
 community
     authcommunity TYPES  COMMUNITY   [SOURCE [OID | -V VIEW [CONTEXT]]]

 macbook-pro:net-snmp-5.5 clausklein$  /usr/local/sbin/snmpd -H 21 |
 grep authcommunity
     authcommunity   authtype1,authtype2 community [default|hostname|
 network/bits [oid|-V view]]


Checking the history, the usage message for authcommunity (and related
directives) wasn't updated when the context support was added.
   Now fixed.

Thanks for the report.

Dave

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
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: A question of net-snmp

2010-08-05 Thread Dave Shield
On 5 August 2010 12:37, AC. achuan...@gmail.com wrote:
 I downloaded net-snmp-5.4.3.tar.gz again, unpacked it, and then executed
 ./configure.

   [snip]

 Then, I executed the make command. (# make -j3 -s 1make-out.log
 2make-err.log)

Can you try *without* the -j3 option.
It looks suspiciously as if one of the compilation jobs is trying to
use the target of one of the others, before that job has finished.

It would also be useful to redirect stdout and stderr to the same
file  (21), so that we can coordinate error messages with the
file that's being compiled at the time.

Dave

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
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: net-snmp init_XXX() get data periodically( or cyclic ) problem

2010-08-04 Thread Dave Shield
On 4 August 2010 03:47, Alexander King new...@foxmail.com wrote:
 Now,I want to know how to get the newest data use net-snmp snmpd daemon
 routine.That is to say,Is there a way when I use snmpwalk command browse
 the uit data tree I get the updated or newest or latest data each time?

I will repeat my suggestion from yesterday.
Use one of the mib2c templates generated with '-S cache=1'
That will produce code that uses a local cache, with a 'load'
routine, which will be called when the cache is too old.

If you set the timeout for the cache to be 0, then the data will
be reloaded for every single new SNMP request.

But note that this is every *request* - not every command.
A single 'snmpwalk' command will trigger a whole sequence of
GETNEXT requests, each of which will re-load the cache.
That's why I think you might be better off with a cache timeout
of a few seconds.

   But experiment - altering the timeout is a trivial change
(and can even be done on the fly).   No code changes are needed.
Get something working using the cache first, and then worry
about tuning the cache frequency.

Dave

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
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: A question of net-snmp

2010-08-04 Thread Dave Shield
On 4 August 2010 03:22, AC. achuan...@gmail.com wrote:
 making all in /home/bluce/work/root/filesystem/packages/net-snmp-5.4/snmplib
 make[1]: *** No rule to make target
 `/usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi/Config.pm', needed by 
 `Makefile'.  Stop.
 make: *** [perlmodules] Error 1

 Does that mean I must get and install the perl5 with 64-bit?

You're getting this in the *snmplib* directory?!?
I've seen something similar when compiling the perl modules,
but never with snmplib.

What I would suggest is that you start again with a fresh source
tree.   Unpack the tarball from scratch and run 'configure' and 'make'

Dave

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
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 :- How to configure the log level for snmp agent...

2010-08-04 Thread Dave Shield
On 4 August 2010 07:07, Borra, Kishore Babu kishorebabu.bo...@adc.com wrote:
 I had tried the command line options like -Ls 2, -Ls 5. But I wasn't 
 successfull
 in disabling the sys logs.

Try
-Lf /dev/null

Dave

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: net-snmp mini-agent

2010-08-04 Thread Dave Shield
On 4 August 2010 11:07, Markus Hofer markus_ho...@gmx.at wrote:
 I got a short question about the compilation option --enable-mini-agent.
 Is there a little docu what the mini-agent excactly can/cannot do and what it 
 includes?

See the file
agent/mibgroup/default_modules.h
  in the source tree.
This lists the modules which are included in both the default agent,
and the mini agent builds.

The mini agent is effectively just the SNMP and system groups,
plus access control.


 If I am correct i don't really need MIB modules to access data
 as far as I know the correct nummeric OID. Am I wright?

Wrong.
MIB module in this context (sometimes called MIB implementation module)
is the agent code that provides the data for a particular set of OIDs.
  It is *NOT* the same as the MIB file (or strictly MIB module),
which handles converting between names and numeric OIDs.


 So basically the whole accessable data of the device would be available by 
 snmpget.

No.
If you've configured the mini agent,
then basically *nothing* would be available via snmpget.
If the agent doesn't have the code to process requests for a
particular object, it cannot provide the corresponding values.
(Regardless of whether you use names or numbers)

Dave

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
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: net-snmp init_XXX() get data periodically( or cyclic ) problem

2010-08-04 Thread Dave Shield
On 4 August 2010 15:29, Kathy McLeod kmcl...@us.ibm.com wrote:
 How do you alter the timeout value on the fly?

Via the NET-SNMP-AGENT-MIB::nsCacheTable


 Also, I thought -1 was the value for load every time.

My apologies - you are quite correct.
  [See agent/helpers/cache_handler.c:netsnmp_cache_check_expired()]

Dave

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
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


<    5   6   7   8   9   10   11   12   13   14   >