Re: ORDER of varbind IN SNMP response PDU

2007-07-30 Thread Dave Shield
On 30/07/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> is it expected that SNMP agent during forming response PDU
>  will  follow  the same order for varbind  in which it received the varvind ?

Yes

> For example .if agent has received the Varbind in the following order
>
> 1)Atr1 2)atr2 3)atr3
>  Is it mandatory to respond in the following order?
> 1)response for Atr1 2)response for atr2 3)response for atr3

Yes

Dave

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: R: create_trap_session

2007-07-30 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 29/07/07, DI BACCO ANTONIO - technolabs
<[EMAIL PROTECTED]> wrote:
> Thank you for your answer,
>
>  and how can I inform master about new sinks?

a) Add the appropriate "trapsink", "trap2sink" or "informsink" entries
to the snmpd.conf file, and signal the master agent to re-read this
(kill -HUP or set UCD_SNMP-MIB::versionUpdateConfig)

b) Update the 'snmpTarget*Table's and 'snmpNotifyTable' to add the
new destinations.   Try walking these tables after setting things
up using "trapsink" to get a feel for the necessary entries.

Dave

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: ORDER of varbind IN SNMP response PDU

2007-07-30 Thread somenath.pal
Hi Dev,

Thanks for your response. But I want to have little more clear
understanding. Suppose all the three varbinds are part of same request
PDU then is it also expected that response PDU will have the same order?



Regards,
Somanath 


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Shield
Sent: Monday, July 30, 2007 1:33 PM
To: Somenath Pal (WT01 - TES-Access Networks)
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: ORDER of varbind IN SNMP response PDU

On 30/07/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> is it expected that SNMP agent during forming response PDU
>  will  follow  the same order for varbind  in which it received the
varvind ?

Yes

> For example .if agent has received the Varbind in the following order
>
> 1)Atr1 2)atr2 3)atr3
>  Is it mandatory to respond in the following order?
> 1)response for Atr1 2)response for atr2 3)response for atr3

Yes

Dave

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


How to use snmp_add_var API for bitstring and octet string

2007-07-30 Thread Xiangyang Shen
Hi All,

I don't know how to use NetSnmp API snmp_add_var(...) for bitstring in order to
send SET request.

Using the example I found from the user-list, if I would like to set the bit #7
in following bit string where bits v0, v3, and v10 are set:
bits=0100 1001

The new bits after set should be
new_bits=0100 10001001

If I understood RFC3416, the encoding of the new_bits should be like
10010001 0010

I guess I should use type='b' but I don't know what's the way I should set char*
value for the bitstring when invoking snmp_add_var() API.

I thought to translate the new_bits to octets that would be 0x91 and 0x20. I
could use type='x' but again I'm not sure what's the way I should set the char*
value for those two octets.

I would very appreciate your help on both cases: how to use snmp_add_var for
octet string and bitstring.

Thanks for your help in advance,
Xiangyang


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: ORDER of varbind IN SNMP response PDU

2007-07-30 Thread Dave Shield
On 30/07/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>   Suppose all the three varbinds are part of same request
> PDU then is it also expected that response PDU will have the same order?

Yes
This is required.
The varbinds in the response PDU *must* match the order from the
original request.   (For both GET and GETNEXT requests).

Dave

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: ORDER of varbind IN SNMP response PDU

2007-07-30 Thread somenath.pal
Hi Dave,

Could you please tell me which RFC describe this?

Regards,
Somanath 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Shield
Sent: Monday, July 30, 2007 2:14 PM
To: Somenath Pal (WT01 - TES-Access Networks)
Cc: net-snmp-users@lists.sourceforge.net
Subject: Re: ORDER of varbind IN SNMP response PDU

On 30/07/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>   Suppose all the three varbinds are part of same request
> PDU then is it also expected that response PDU will have the same
order?

Yes
This is required.
The varbinds in the response PDU *must* match the order from the
original request.   (For both GET and GETNEXT requests).

Dave

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


AW: ORDER of varbind IN SNMP response PDU

2007-07-30 Thread Stefan Mikuszeit
Hi @all

How can we force to use PDU 1 or 2 ?

The Subagent sends no Data to the Agent (SNMPD), while the Agent (SNMPD) not 
initalisation the subagent :-(

Log Entrys:
snmpd: send_trap: Cannot send V1 PDU on V2 session
snmpd: send_trap: Cannot send V1 PDU on V2 session
snmpd: send_trap: Cannot send V1 PDU on V2 session
snmpd: send_trap: Cannot send V1 PDU on V2 session
snmpd: send_trap: Cannot send V1 PDU on V2 session
snmpd: send_trap: Cannot send V1 PDU on V2 session
snmpd: send_trap: Cannot send V1 PDU on V2 session
NET-SNMP version 5.4
agentx/master: unexpected callback op 4
agentx/master: handle pdu (req=0x55a0e861,trans=0x0,sess=0x0)
agentx/master: open 0x81922c0
agentx/master: opened 0x8192a90 = 17 with flags = a0
agentx/master: send response, stat 0 (req=0x55a0e861,trans=0x0,sess=0x0)
agentx_build: packet built okay

Stefan


-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Auftrag von Dave
Shield
Gesendet: Montag, 30. Juli 2007 10:44
An: [EMAIL PROTECTED]
Cc: net-snmp-users@lists.sourceforge.net
Betreff: Re: ORDER of varbind IN SNMP response PDU


On 30/07/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>   Suppose all the three varbinds are part of same request
> PDU then is it also expected that response PDU will have the same order?

Yes
This is required.
The varbinds in the response PDU *must* match the order from the
original request.   (For both GET and GETNEXT requests).

Dave

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Traps and polling

2007-07-30 Thread josu
Hello,

I would like to know how to mix traps reception and polling requests in 
a monitoring program. I think I need to check some timestamps in both 
messages to know which one was sent last, otherwise my program may flicker.

José


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Help with snmptrap

2007-07-30 Thread Mateus Interciso
On Sat, 28 Jul 2007 20:55:08 +0100, Dave Shield wrote:

> On 27/07/07, Mateus Interciso <[EMAIL PROTECTED]> wrote:
>> [the agent] sucessfully send the trap, as it shows on the snmptrapd.log
> 
>[snip]
> 
> 
>> But I also want it to execute the command /bin/sh /tmp/trapTst.sh
> 
> On which system?
> The host where the agent is running (10.0.0.1), or the host that is
> running the trap receiver (10.0.0.4) ?
> 
On the host that is running the trap receiver.
> 
>> Here's my snmptrapd.conf file on 10.0.0.1
> 
> I thought you said that snmptrapd was running on 10.0.0.4? That's
> certainly the address you seem to have in your snmpd.conf file.
> 
Sorry, it really is on 10.0.0.4.
> The snmptrapd.conf file will only be processed by snmptrapd, and hence
> is only needed on the system where traps are received. It's not relevant
> on the system where the agent is running, where traps are sent *from*.
>   (Unless these are both the same box, of course).
> 
> 
> Instead of sending traps, have a look at the 'setEvent' directive, to
> handle everything on the 10.0.0.1 system.
> 
I actually really need to execute the traps on the trap server.
> 
> Dave
> 
> 
Thanks.
Mateus
-
> This SF.net email is sponsored by: Splunk Inc. Still grepping through
> log files to find problems?  Stop. Now Search log events and
> configuration files using AJAX and a browser. Download your FREE copy of
> Splunk now >>  http://get.splunk.com/
> ___ Net-snmp-users mailing
> list
> Net-snmp-users@lists.sourceforge.net
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Help with snmptrap

2007-07-30 Thread Dave Shield
On 30/07/07, Mateus Interciso <[EMAIL PROTECTED]> wrote:
> >> But I also want it to execute the command /bin/sh /tmp/trapTst.sh
> On the host that is running the trap receiver.

OK - what is the trap PDU that should trigger this command?

Dave

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Customize output sprint_realloc_variable

2007-07-30 Thread Vaucouleur Nicolas
Hi, 
   
  I'm using net snmp api to exec some request on localhost and to give the 
response to another piece of software. My problem is that i use 
snmp_synch_response to send my request and i catch it in a "response" pdu, 
after i read the variables list to comput the result. But i find no way to take 
that i want in this structure. It's like "type" was not set, so I try to use 
sprint_realloc_variable but i cant custom the result. In fact sprint realloc 
varaible will print in a char "TEXTUAL_OID = TYPE: VALUE" idealy i wish have 
"NUMERICAL_OID;TYPE;VALUE". Is There is a way to do that with 
sprint_realloc_variable or an other simple function ? And if it's impossible 
does anybody know why i success to comput value and oid in the 
response->variable structure but no way to have a reliable "type" (so 
impossible to know how to read value, is it a string or a integer or a 
timetrick ?!). 
  Thanks for your work, and soon for your help ;)
   
  Nico

   
-
 Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail -
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


SNMP times out if running as a service

2007-07-30 Thread Javier Santiago
Hi Everybody,

My first message to the list.

I have installed a network monitor (ZenOSS) mostly based on SNMP.

ZenOSS server is gathering SNMP info for Windows boxes without any
remarkable problem. However, linux boxes are causing a lot of troubles...

When snmpwalk is executed for localhost, proper response is received. But,
if executed for a host's public IP, Times out always.

I found that running the following command:

snmpd -f -L -d

makes SNMP agnt to run OK (see
http://osdir.com/ml/network.net-snmp.user/2003-12/msg00154.html)

However, this is  just a temporal solution, as I do not really know what
causes SNMP not to work OK as a service located at /etc/init.d/...

Any ideas?.

P.S: Sorry for my awful english!


-- 

*Javier Santiago*
*mobile:*+0034 630186151
*work:*+0034 916573128 // ext 410



[image: My status] 
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: SNMP times out if running as a service

2007-07-30 Thread Dave Shield
On 30/07/07, Javier Santiago <[EMAIL PROTECTED]> wrote:
> When snmpwalk is executed for localhost, proper response is received. But,
> if executed for a host's public IP, Times out always.

That sounds like either access control, or firewall settings.

What is in your snmpd.conf file?
What is in the /etc/sysconfig/iptables file?

Dave

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


help with SNMP_PARSE_OID

2007-07-30 Thread [EMAIL PROTECTED]
Hi all!
I've used SNMP_PARSE_OID in order to get OID from object name.

I report what i've done:

** DECLARATIONS OF USED VARIABLES **
oid name
[MAX_OID_LEN];
u_int name_length = OID_LENGTH(name);
char   *names;
**


** IN MAIN PROGRAM **
if 
(snmp_parse_oid(names, name, &name_length) == NULL)
snmp_perror
(names);


Now, i've implemented my application 
both in windows and linux; in windows snmp_parse_oid api gives me in 
name the corresponding OID of names; in linux it gives me an error.

Why?


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: SNMP times out if running as a service

2007-07-30 Thread Dave Shield
On 30/07/07, Javier Santiago de la Peña <[EMAIL PROTECTED]> wrote:
>  a) snmpd.conf content:
>
>  com2sec local   127.0.0.1/32public
>  com2sec local   local_host_public_ip/24  public

H
Not sure that'll work.

Try deleting the '127.0.0.1' line, and restart snmpd.
Can you query it using the IP address then?

Dave

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: SNMP times out if running as a service

2007-07-30 Thread Dave Shield
On 30/07/07, Javier Santiago de la Peña <[EMAIL PROTECTED]> wrote:
>  Tested. Did not work, also.
>
>  I can't query using IP, just "localhost" or "127.0.0.1".


If you've removed the entry
  com2sec local   127.0.0.1/32public

and the agent still responds to localhost requests,
then I'd suspect that the agent isn't actually reading the
snmpd.conf file that you expect.

Dave

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: SNMP times out if running as a service

2007-07-30 Thread Javier Santiago
Hi Dave,

Sorry, maybe I did not explain it properly..

I removed the 127.0.0.1 entry and yes, it did not provide any response...but
public IP also timed out.

So I have activated the 127.0.0.1 entry again

(of course, I restarted snmp every time I made a modification).

Regards,

-- 

*Javier Santiago*
*mobile:*+0034 630186151
*work:*+0034 916573128 // ext 410



[image: My status] 

On 7/30/07, Dave Shield <[EMAIL PROTECTED]> wrote:
>
> On 30/07/07, Javier Santiago de la Peña <[EMAIL PROTECTED]>
> wrote:
> >  Tested. Did not work, also.
> >
> >  I can't query using IP, just "localhost" or "127.0.0.1".
>
>
> If you've removed the entry
>   com2sec local   127.0.0.1/32public
>
> and the agent still responds to localhost requests,
> then I'd suspect that the agent isn't actually reading the
> snmpd.conf file that you expect.
>
> Dave
>
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Help with snmptrap

2007-07-30 Thread Mateus Interciso
On Mon, 30 Jul 2007 13:01:20 +0100, Dave Shield wrote:

> On 30/07/07, Mateus Interciso <[EMAIL PROTECTED]> wrote:
>> >> But I also want it to execute the command /bin/sh /tmp/trapTst.sh
>> On the host that is running the trap receiver.
> 
> OK - what is the trap PDU that should trigger this command?
> 
> Dave
> 
> 
-
> This SF.net email is sponsored by: Splunk Inc. Still grepping through
> log files to find problems?  Stop. Now Search log events and
> configuration files using AJAX and a browser. Download your FREE copy of
> Splunk now >>  http://get.splunk.com/
> ___ Net-snmp-users mailing
> list
> Net-snmp-users@lists.sourceforge.net
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Isn't this on the snmptrapd.conf that issues the command?
traphandle  "default" "/bin/sh /tmp/trapTst.sh"
Then, whenever he gets a trap(any), it would execute /tmp/tapTst.sh?

Mateus


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


It's just a test..

2007-07-30 Thread cscs nnn


So if I write here, I'll see it in the Email Archive?

2800 állásból Te is találsz megfelelőt! Mérnöki, értékesítői, asszisztensi, 
pénzügyi és IT állások a Jobline.hu-n!
www.jobline.hu
http://ad.adverticum.net/b/cl,1,6022,186603,243027/click.prm
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: SNMP times out if running as a service

2007-07-30 Thread Dave Shield
On 30/07/07, Javier Santiago de la Peña <[EMAIL PROTECTED]> wrote:
>  How do I know which file is snmpd reading to apply configuration?.

Run
snmpd    -Dread_config

That will display the file(s) that are being loaded, and the directives
as they are read in.

Dave

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


How to use snmp_add_var API for bitstring and octet string

2007-07-30 Thread Xiangyang Shen
Hi All,

I don't know how to use NetSnmp API snmp_add_var(...) for bitstring in order to
send SET request.

Using the example I found from the user-list, if I would like to set the bit #7
in following bit string where bits v0, v3, and v10 are set:
bits=0100 1001

The new bits after set should be
new_bits=0100 10001001

If I understood RFC3416, the encoding of the new_bits should be like
10010001 0010

I guess I should use type='b' but I don't know what's the way I should set char*
value for the bitstring when invoking snmp_add_var() API.

I thought to translate the new_bits to octets that would be 0x91 and 0x20. I
could use type='x' but again I'm not sure what's the way I should set the char*
value for those two octets.

I would very appreciate your help on both cases: how to use snmp_add_var for
octet string and bitstring.

Thanks for your help in advance,
Xiangyang


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: SNMP times out if running as a service

2007-07-30 Thread Javier Santiago de la Peña




Hi Dave,

Hum...

I have looked for another snmpd.conf file and the only one is at
/var/lib/snmpd.conf, and is a persistent file.

How do I know which file is snmpd reading to apply configuration?.

regards,

Javier Santiago de la
Peña // Zasylogic.com
mobile:+0034 630186151
work:+0034 916573128 // ext 410





Dave Shield wrote:

  On 30/07/07, Javier Santiago de la Peña <[EMAIL PROTECTED]> wrote:
  
  
 Tested. Did not work, also.

 I can't query using IP, just "localhost" or "127.0.0.1".

  
  

If you've removed the entry
  com2sec local   127.0.0.1/32public

and the agent still responds to localhost requests,
then I'd suspect that the agent isn't actually reading the
snmpd.conf file that you expect.

Dave

  



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


NET-SNMP 5.4 and Multiple CPU's

2007-07-30 Thread Mark Khan
Hello:
   Could someone please help me with this problem:
I am a newly hired SA. In order to monitor CPU usage with Solaris systems my 
predecessor loaded Net-SNMPD 5.4 on systems here with multiple CPU's and then 
moved on. The Networking group is using a Product called SolarWinds to monitor 
the systems via snmp. Today they showed me a graph of cpu utilization on a 
system that is running the SNMPD 5.4 software and has two cpu's  and all they 
and I can see is one graph without any breakdown by CPU O or 1. Is there some 
command I can use to validate that the Net-SNMPD 5.4 software is functioning 
properly? Is there some way I can manually generate a graph myself that will 
show both cpu's? Is there any special compile options for multi cpu reporting 
that my predecessor may have "forgotten" to use?

Please help! - Mark K.



---
This e-mail is intended for the addressee shown. 
It contains information that is confidential and 
protected from disclosure. Any review, dissemination 
or use of this transmission or its contents by persons 
or unauthorized employees of the intended organizations 
is strictly prohibited. 

The contents of this email do not necessarily represent 
the views or policies of PSCU Financial Services.



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: NET-SNMP 5.4 and Multiple CPU's

2007-07-30 Thread Dave Shield
On 30/07/07, Mark Khan <[EMAIL PROTECTED]> wrote:
> Today they showed me a graph of cpu utilization on a system that is
> running the SNMPD 5.4 software and has two cpu's  and all they and
> I can see is one graph without any breakdown by CPU O or 1.

Which MIB object(s) are you monitoring?

The UCD-SNMP-MIB CPU statistics were only ever designed for
single-CPU systems, and do not provide a breakdown for individual
elements of a multi-CPU system.

More recently, the Host Resources hrProcessorLoad object has
been properly implemented, and should provide better reporting
of multi-CPU systems.   I'm not sure offhand whether this has
been fully implemented for Solaris kit, but it's worth trying on
your systems.

It might also be worth checking the newly-released 5.4.1 version,
in case that provides fuller information (again - I'm not sure
offhand whether anything has changed).

Dave

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Help: Can not set a mib variable to a value in the range.

2007-07-30 Thread George Li
Hi All,

I have a mib variable which has range (0..130). I can set the variable to
anything from 1 to 130 (including 1 and 130). But when I was trying to set
the variable to 0, I got an error like:

Error in packet.
Reason: wrongValue (The set value is illegal or unsupported in some way)

Could anybody tell me why this happens?
Another question related to this is: When an SNMP SET request is received by
snmpd, which agent is checking the range of the value to be set? is it
master agent (snmpd)? or subagent?

Thanks a lot,
George
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Help: Can not set a mib variable to a value in the range.

2007-07-30 Thread Dave Shield
On 30/07/07, George Li <[EMAIL PROTECTED]> wrote:
> I have a mib variable which has range (0..130). I can set the variable to
> anything from 1 to 130 (including 1 and 130). But when I was trying to set
> the variable to 0, I got an error like:
>
> Error in packet.
> Reason: wrongValue (The set value is illegal or unsupported in some way)
>
> Could anybody tell me why this happens?

You'd need to look at the code that implements this object.


>When an SNMP SET request is received by
> snmpd, which agent is checking the range of the value to be set? is it
> master agent (snmpd)? or subagent?

If the object is implemented by a subagent, then it would be the
subagent that checks whether the new value is valid.  The master
agent wouldn't know anything about it (other than which subagent
to pass the request on to).

Dave

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


IF-MIB Solaris 9/SPARC

2007-07-30 Thread Joe Gainey
I've seen one other post on here regarding this.  I have compiled and installed 
version 5.4 of the net-snmp package on a Solaris 9/SPARC system.  Here are the 
options used to when running the configure script:

--with-perl-modules=no \
--disable-embedded-perl \
--disable-shared \
--enable-mfd-rewrites \
--with-default-snmp-version=2 \
--with-sys-contact="Unknown" \
--with-sys-location="Undefined" \
--with-logfile=/var/snmp/log/snmpd.log \
--with-persistent-directory=/var/snmp/private \
--with-mib-modules="if-mib agentx ucd_snmp mibII" --with-ldflags="-Bstatic"

What I have been bumping my head against for too long now is that an snmpwalk 
of the interfaces oid only returns information about the loopback interface.  I 
have boxes with three types of interfaces:  bge, eri, and dmfe

None of these are reporting under net-snmp.  Does anyone know what I am doing 
incorrectly?  I would really like net-snmp to be able to discover the 
interfaces like it has in the past.  Having to hand configure the interface 
name type speed etc. on literally hundreds of boxes is not my idea of a good 
time.


Thanks in advance,

Joe




   
Ready
 for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Help: Can not set a mib variable to a value in the range.

2007-07-30 Thread George Li
Thanks Dave!

-George


On 7/30/07, Dave Shield <[EMAIL PROTECTED]> wrote:
>
> On 30/07/07, George Li <[EMAIL PROTECTED]> wrote:
> > I have a mib variable which has range (0..130). I can set the variable
> to
> > anything from 1 to 130 (including 1 and 130). But when I was trying to
> set
> > the variable to 0, I got an error like:
> >
> > Error in packet.
> > Reason: wrongValue (The set value is illegal or unsupported in some way)
> >
> > Could anybody tell me why this happens?
>
> You'd need to look at the code that implements this object.
>
>
> >When an SNMP SET request is received by
> > snmpd, which agent is checking the range of the value to be set? is it
> > master agent (snmpd)? or subagent?
>
> If the object is implemented by a subagent, then it would be the
> subagent that checks whether the new value is valid.  The master
> agent wouldn't know anything about it (other than which subagent
> to pass the request on to).
>
> Dave
>
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: solaris 10 hrStorageUsed problem

2007-07-30 Thread Tommi Lätti
Tommi Lätti wrote:
> Got some problems with solaris 10 monitoring. I've now tried the 5.0.9 
> from Sun, 5.4 relase and the nightly tarball from
> 
> The problem is that when using v2c, the getbulk always hangs on certain 
> area, usually in hrStorageUsed
> 
> dump from the point it hangs:
> 
> -- clip --
> 
> Received SNMP packet(s) from UDP: [10.224.68.19]:51568
>   GETBULK message, non-rep=0, max_rep=19
> -- HOST-RESOURCES-MIB::hrStorageUsed.42
> 
> -- clip --
> 
> if I ctrl+c at that point I get the following output:
> 
> -- clip --
> 
> ^Cread: Interrupted system call
> snmp_build: unknown failuresend response: Error building ASN.1 
> representation (wrong type in snmp_realloc_rbuild_var_op: 199)
> -- HOST-RESOURCES-MIB::hrStorageUsed.43
> -- HOST-RESOURCES-MIB::hrStorageUsed.44
> -- HOST-RESOURCES-MIB::hrDeviceIndex.768
> -- HOST-RESOURCES-MIB::hrDeviceIndex.769
> -- HOST-RESOURCES-MIB::hrDeviceIndex.1552
> -- HOST-RESOURCES-MIB::hrDeviceIndex.1553
> -- HOST-RESOURCES-MIB::hrDeviceType.768
> -- HOST-RESOURCES-MIB::hrDeviceType.769
> -- HOST-RESOURCES-MIB::hrDeviceType.1552
> -- HOST-RESOURCES-MIB::hrDeviceType.1552
> -- HOST-RESOURCES-MIB::hrDeviceType.1552
> Received TERM or STOP signal...  shutting down...
> 
> -- clip --

Found something new...

I installed identical boxes, sol10 and 9 using just the req cluster 
(kinda like almost minimal install). The snmpd hangs like I described 
before. If I install using the full cluster (full install), snmpd works 
and doesn't hang anymore.

So are there any other external programs on solaris that snmpd actually 
depends on to work fully?

-- 
best regards,
Tommi Latti

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users