Please help me in understanding the strange behaviour with my subagnet.

2014-07-21 Thread karteek.challa
I have a strange behavior with the subagent. Trying to understand from past 2 
months. Solving this issue is very important to me. Please help friends.

My subagent is receiving huge number of continuous snmpget and snmpset requests.

At a certain point I noticed the below observation from the snmp agent log.

Agent received snmpget request with var-bind of 20 items for my 
subagent. After the agent sends the packet to subagent, the response is getting 
delayed for some time. Tthe response is received by agent after 2 to 3 
timeouts. This can be the reason as the subagent is receiving huge requests. 
But for the 4th request the agent didn't receive any response before 5 timeouts 
(max retries count is 5). For this request, in the tcpdump, I can see the 
response as noSuchInstance for all 20 snmpget requests.

This is repeated 3 times.

Then for some snmpget requests,  I can see noSuchObject in the get-response 
for these requests in the tcpdump. From the agent log info, I can find the 
below information for these snmpget requests.

handler:calling: main handler bulk_to_next
handler:calling: calling handler bulk_to_next for mode GET
handler:returned: handler bulk_to_next returned 0
handler:calling: calling handler null for mode GET
handler:returned: handler null returned 0

At the same time, for a snmpset request, I've seen notWritable error in the 
response packet in the tcpdump. For this particular packet, I found the below 
information in the agent log

agent_set: doing set mode = 0 (SET_RESERVE1)
KTK netsnmp_call_handlers: setting SNMP_ERR_NOTWRITABLE...
agent_set: did set mode = 0, status = 17
agent_set: doing set mode = 4 (SET_FREE)
KTK netsnmp_call_handlers: setting SNMP_ERR_NOTWRITABLE...
agent_set: did set mode = 4, status = 17

My debug statement KTK netsnmp_call_handlers: setting SNMP_ERR_NOTWRITABLE... 
is placed in the net-snmp code as below

case MODE_SET_RESERVE1:
case MODE_SET_RESERVE2:
case MODE_SET_ACTION:
case MODE_SET_COMMIT:
case MODE_SET_FREE:
case MODE_SET_UNDO:
if (!(reginfo-modes  HANDLER_CAN_SET)) {
for (; requests; requests = requests-next) {
snmp_log(LOG_INFO, KTK netsnmp_call_handlers: setting 
SNMP_ERR_NOTWRITABLE...\n);
netsnmp_set_request_error(reqinfo, requests,
  SNMP_ERR_NOTWRITABLE);
}
return SNMP_ERR_NOERROR;


I am not able to understand this behavior. Anything wrong with my subagent?? 
Please help me. I am struggling to solve this issue from past 2 months. Please 
help me friends.


Best Regards,
Karteek

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Net-snmp-users mailing list
Net-snmp-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 help me in understanding the strange behaviour with my subagnet.

2014-07-21 Thread karteek.challa
Please ignore my previous query... This is the latest one.

I have a strange behavior with the subagent. Trying to understand from past 2 
months. Solving this issue is very important to me. Please help friends.

My subagent is receiving huge number of continuous snmpget and snmpset requests.

At a certain point I noticed the below observation from the snmp agent log.

Agent received 4 continuous snmpget requests with var-bind of 
20 items in each snmpget request for my subagent. After the agent sends the 
packet to subagent, the response is getting delayed for some time. Responses 
for first, second and third are received by agent after 2 to 3 timeouts. This 
can be the reason as the subagent is receiving huge requests. But for the 4th 
request the agent didn't receive any response before 5 timeouts (max retries 
count is 5). For this request, in the tcpdump, I can see the response as 
noSuchInstance for all 20 snmpget requests.

This is repeated 3 times.

Then for some snmpget requests,  I can see noSuchObject in the get-response 
for these requests in the tcpdump. From the agent log info, I can find the 
below information for these snmpget requests.

handler:calling: main handler bulk_to_next
handler:calling: calling handler bulk_to_next for mode GET
handler:returned: handler bulk_to_next returned 0
handler:calling: calling handler null for mode GET
handler:returned: handler null returned 0

At the same time, for a snmpset request, I've seen notWritable error in the 
response packet in the tcpdump. For this particular packet, I found the below 
information in the agent log

agent_set: doing set mode = 0 (SET_RESERVE1)
KTK netsnmp_call_handlers: setting SNMP_ERR_NOTWRITABLE...
agent_set: did set mode = 0, status = 17
agent_set: doing set mode = 4 (SET_FREE)
KTK netsnmp_call_handlers: setting SNMP_ERR_NOTWRITABLE...
agent_set: did set mode = 4, status = 17

My debug statement KTK netsnmp_call_handlers: setting SNMP_ERR_NOTWRITABLE... 
is placed in the net-snmp code as below

case MODE_SET_RESERVE1:
case MODE_SET_RESERVE2:
case MODE_SET_ACTION:
case MODE_SET_COMMIT:
case MODE_SET_FREE:
case MODE_SET_UNDO:
if (!(reginfo-modes  HANDLER_CAN_SET)) {
for (; requests; requests = requests-next) {
snmp_log(LOG_INFO, KTK netsnmp_call_handlers: setting 
SNMP_ERR_NOTWRITABLE...\n);
netsnmp_set_request_error(reqinfo, requests,
  SNMP_ERR_NOTWRITABLE);
}
return SNMP_ERR_NOERROR;


I am not able to understand this behavior. Anything wrong with my subagent?? 
Please help me. I am struggling to solve this issue from past 2 months. Please 
help me friends.


Best Regards,
Karteek

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Could you please help me to solve this problem

2011-01-10 Thread mai wang
Hi

I ask question about net-snmp.

How can I send response in the same port not random port ? (in Version 1 or
Version 2)

11:20:20.629170 IP 10.56.230.xx.57994  10.56.230.xx.8060: UDP, length 45

11:20:20.630846 IP 10.56.230.xx.60737  10.56.230.xx.57994: UDP, length 47

11:20:30.356526 IP 10.56.230.xx.55253  10.56.230.xx.8060: UDP, length 45

11:20:30.358235 IP 10.56.230.xx.48567  10.56.230.xx.55253: UDP, length 47


I make some codes, but unfortunately it doesn’t work fine

struct snmp_session session;
//initialize session
snmp_sess_init(session);
//set session parameters
session.version = ver;
session.flags = 0;
session.isAuthoritative = SNMP_SESS_AUTHORITATIVE;
session.remote_port=address._port;
session.local_port=0; //set to 0 for traps--
string tmp=address.get_printable();
tmp+=:;
tmp+=ltoa(address._port);
session.peername=(char* )tmp.c_str();
session.callback=0;
void * tmpsession=snmp_sess_open(session);

 I know if local_port =0, there is random port.

if I set other value like 8061, snmp_sess_open will return NULL and return
error information -3(SNMPERR_BAD_ADDRESS)

Could you give some idea about this? Thanks
--
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl ___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


please help me

2010-08-03 Thread Eman Saber
i need to set IP address using netsnmp and i do the following
1-create rwcommunity and give it full privileges.
2-i'm using netsnmp version 2c
3-i'm using IP-MIB

mycommand:
 snmpset -Oe  -v 2c -c private localhost IP-MIB::ipAdEntAddr.192.168.1.49  = 
192.168.1.26

myerror:
Error in packet.
Reason: notWritable (That object does not support modification)
Failed object: IP-MIB::ipAdEntAddr.192.168.1.49

From the IP-MIB file:

ipAdEntAddr OBJECT-TYPE
SYNTAX IpAddress
MAX-ACCESS read-only== change it to read-write
STATUS deprecated
DESCRIPTION
   The IPv4 address to which this entry's addressing
information pertains.
::= { ipAddrEntry 1 }

i know it is not writable but how can i do that (change object value) i need 
answer yes or not and if yes how can i do this??



  --
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: please help me

2010-08-03 Thread Dave Shield
On 3 August 2010 12:53, Eman Saber eman_saber_...@yahoo.com wrote:
 i need to set IP address using netsnmp

 i know it is not writable but how can i do that (change object value) i need
 answer yes or not and if yes how can i do this??

The answer is NO.

I've already told you this.
Repeating the question will not change the answer.



 ipAdEntAddr OBJECT-TYPE
SYNTAXIpAddress
MAX-ACCESS read-only== change it to read-write

That is not possible.
IP-MIB is an Internet standard.
You cannot change international standards off your own bat
simply because you don't like what they say.


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


Please help me to fix a issue:Reason: authorizationError (access denied to that object)

2010-05-17 Thread 德顺 孟
Hi:

 I have already installed net-snmp (net-snmp-5.5),the whole setup process 
use the defaul value.

 Now I add a user to the system:

    net-snmp-config --create-snmpv3-user -ro -a MD5 -A  fff

    Then ,I run the bellow cmd :

    snmpget -v 3 -u fff -l authNoPriv -a MD5 -A   192.168.216.88 
1.3.6.1.2.1.1.3

    the error messages are bellow:

Error in packet
Reason: authorizationError (access denied to that object)
 
   Why?
 
    Please help to check this question!
 
    Thanks!
Mengdeshun


  --

___
Net-snmp-users mailing list
Net-snmp-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 help me to fix a issue:Reason: authorizationError (access denied to that object)

2010-05-17 Thread Dave Shield
On 15 May 2010 14:48, 德顺 孟 mengdes...@yahoo.com.cn wrote:
  Now I add a user to the system:

 net-snmp-config --create-snmpv3-user -ro -a MD5 -A  fff

I'm no expert on SNMPv3 security, but I've got a feeling that repeated
patterns in SNMPv3 passwords are a Bad Idea.

 Then ,I run the bellow cmd :

 snmpget -v 3 -u fff -l authNoPriv -a MD5 -A   192.168.216.88
 1.3.6.1.2.1.1.3

Did you re-start the agent before trying this command?
You need to signal the agent to re-read the config file,
before it takes note of your changes.

(In fact, I think you're meant to run the create-snmpv3-user while the
agent is not running at all)

Dave

--

___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Please help me to get sub agents working.

2009-12-01 Thread Duo Maxwell
I am having trouble getting a subagent to work.
I have attempted to follow the rules of support and first check alternative
sources.
I have been through the wiki and tutorials many times.
I hope this is not one of thoes cases where the answer is obvious and I have
complete overlooked it.
If that is the case then I am sorry.
Below is the process I used in detail.

0)
Tested the MIB with snmptranslate.
It appeared to work fine.
I havent registered a number with IANA yet
so using 82 temporarily. Sorry Auspex Systems, Inc.

1)
I inputted this line
env MIBS=+PS-TEST6-MIB mib2c psTest6MIB

this was the response
OID: psTest6MIB
numeric translation 1.3.6.1.4.1.82
number of scalars within: 1

I choose Net-SNMP style code and to tie interger values to integer scalars

As expected is generated psTest6MIB.c and psTest6MIB.h


2)I then compile-subagent
net-snmp-config --compile-subagent psTest6MIB psTest6MIB.c
resulting in
subagent program psTest6MIB created.


3)I start net-snmp
snmpd
Then I start the subagent
./psTest6MIB
All seems fine. No errors.


4)Testing
When using an SNMP manager connected to localhost
-Asking for the variable 1.3.6.1.2.1.1.1.0 does return the
sysDescription. The SYSTEM tree does work.
-Asking for the variable 1.3.6.1.4.1.82.2 which belongs to the subagent,
returns null.
snmpget -v1 -c public localhost PS-TEST6-MIB::psTest6MIB
returns
Eror In packet
Reason: (noSouchName) There is no such variable in this MIB
Failed object: PS-TEST6-MIB::psTest6MIB

snmpget -v2c -c public localhost PS-TEST6-MIB::psTest6MIB
returns
No Such Object available on this agent at this OID

snmpgetnext -v1 -c public localhost PS-TEST6-MIB::versionTag
returns
Unknown Object Idenfitier

snmpwalk -v1 -c public localhost PS-TEST6-MIB:psTest6MIB
returns
End Of MIB

snmpwalk -v2c -c public localhost PS-TEST6-MIB::psTest6MIB
returns
No more variables left in this MIB View(Is is past the end of the MIB
tree)

Using
snmpd -DpsTest6MIB to start the agent
returns some errors
/usr/local/share/snmp/snmp.conf: line 15: Warning: Unknown token:
agentAddress.
/usr/local/share/snmp/snmp.conf: line 45: Warning: Unknown token: view.
/usr/local/share/snmp/snmp.conf: line 46: Warning: Unknown token: view.
/usr/local/share/snmp/snmp.conf: line 51: Warning: Unknown token:
rocommunity.
/usr/local/share/snmp/snmp.conf: line 60: Warning: Unknown token: rouser.
/usr/local/share/snmp/snmp.conf: line 77: Warning: Unknown token:
sysLocation.
/usr/local/share/snmp/snmp.conf: line 78: Warning: Unknown token:
sysContact.
/usr/local/share/snmp/snmp.conf: line 80: Warning: Unknown token:
sysServices.
/usr/local/share/snmp/snmp.conf: line 87: Warning: Unknown token: proc.
/usr/local/share/snmp/snmp.conf: line 89: Warning: Unknown token: proc.
/usr/local/share/snmp/snmp.conf: line 91: Warning: Unknown token: proc.
/usr/local/share/snmp/snmp.conf: line 101: Warning: Unknown token: disk.
/usr/local/share/snmp/snmp.conf: line 102: Warning: Unknown token: disk.
/usr/local/share/snmp/snmp.conf: line 103: Warning: Unknown token:
includeAllDisks.
/usr/local/share/snmp/snmp.conf: line 113: Warning: Unknown token: load.
/usr/local/share/snmp/snmp.conf: line 126: Warning: Unknown token: trapsink.
/usr/local/share/snmp/snmp.conf: line 140: Warning: Unknown token:
iquerySecName.
/usr/local/share/snmp/snmp.conf: line 141: Warning: Unknown token: rouser.
/usr/local/share/snmp/snmp.conf: line 143: Warning: Unknown token:
defaultMonitors.
/usr/local/share/snmp/snmp.conf: line 145: Warning: Unknown token:
linkUpDownNotifications.
/usr/local/share/snmp/snmp.conf: line 157: Warning: Unknown token: extend.
/usr/local/share/snmp/snmp.conf: line 158: Warning: Unknown token:
extend-sh.
/usr/local/share/snmp/snmp.conf: line 190: Warning: Unknown token: master.

5)Confirgation
I added
rocommunity public 192.168.1.0/16
to the configuration. after that didn't worked I also added the following
lines
com2sec readonly default public
com2sec readwrite default private
That still didnt work

I also made sure that
master agentx
was uncommented in snmpd.conf


6)Appendicies
Received SNMP packet(s) from UDP: [192.168.1.146]:162-[192.168.1.147]
  GET message
-- DISMAN-EVENT-MIB::sysUpTimeInstance

Sending 43 bytes to UDP: [192.168.1.146]:162-[192.168.1.147]
: 30 29 02 01  00 04 06 70  75 62 6C 69  63 A2 1C 020).public...
0016: 02 02 A2 02  01 00 02 01  00 30 10 30  0E 06 08 2B.0.0...+
0032: 06 01 02 01  01 03 00 43  02 37 DA...C.7.


Received 41 bytes from UDP: [192.168.1.146]:162-[192.168.1.147]
: 30 27 02 01  00 04 06 70  75 62 6C 69  63 A0 1A 020'.public...
0016: 02 02 A3 02  01 00 02 01  00 30 0E 30  0C 06 08 2B.0.0...+
0032: 06 01 04 01  52 02 00 05  00  R

Received SNMP packet(s) from UDP: [192.168.1.146]:162-[192.168.1.147]
  GET message
-- SNMPv2-SMI::enterprises.82.2.0

Sending 41 bytes to UDP: [192.168.1.146]:162-[192.168.1.147]
: 30 27 02 01  00 04 06 70  75 62 6C 69  

Re: Please help me to get sub agents working.

2009-12-01 Thread Dave Shield
2009/11/30 Duo Maxwell saykohsyst...@gmail.com:
 I am having trouble getting a subagent to work.
 I hope this is not one of thoes cases where the answer is
 obvious and I have complete overlooked it.

Probably not - getting new MIB modules to work
can often be tricky.

The best starting point is probably the FAQ entry
Why doesn't my new MIB module report anything?

This gives some guidance as to how to pinpoint
where the problem actually lies.


Other suggestions:
  - try compiling your module directly into the agent
(rather than via a subagent).   That way you can
ensure that the code is working.   You can always
re-compile the same module to run as a subagent
later, for active deployment with a standard agent.


 4)Testing
 When using an SNMP manager connected to localhost
 -Asking for the variable 1.3.6.1.2.1.1.1.0 does return the
 sysDescription. The SYSTEM tree does work.
 -Asking for the variable 1.3.6.1.4.1.82.2 which belongs to the subagent,
 returns null.

What about information *outside* the system group
(but still provided by themain agent)?


 snmpget -v1 -c public localhost PS-TEST6-MIB::psTest6MIB
 returns
 Eror In packet
 Reason: (noSouchName) There is no such variable in this MIB
 Failed object: PS-TEST6-MIB::psTest6MIB

That will always fail - you forgot the .0 instance subidentifier.

 snmpwalk -v1 -c public localhost PS-TEST6-MIB:psTest6MIB
 returns
 End Of MIB

I'd expect to see Net-SNMP values here.
That looks like the access control settings might be wrong.
  (hence asking about non-system information above)



 Using
 snmpd -DpsTest6MIB to start the agent
 returns some errors

Is this the main agent, or your subagent?



 5)Confirgation
 I added
 rocommunity public 192.168.1.0/16
 to the configuration.

Is there any other access control in the config file?

 after that didn't worked I also added the following
 lines
com2sec readonly default public
com2sec readwrite default private
 That still didnt work

No - it wouldn't.   The com2sec/view/group/access
directives work in combination - you'd need all four.
Just one bit isn't sufficient.

But I'd forget about that style - the rocommunity
approach is much simpler.

Try with *just*

rocommunity public
master agentx

in your config file.



 psTest6MIB MODULE-IDENTITY
     LAST-UPDATED 991209Z
     ORGANIZATION Organization name goes here
     CONTACT-INFO Contact info goes here
     DESCRIPTION Attempt number 6 to get sub agents working
     ::= { enterprises 82 }

Are you working for Network Computing Devices ?
if not, then you shouldn't really be using their enterprise number.

There's an OID (NET-SNMP-MIB::netSnmpPlaypen) that we
provide specifically for testing purposes.   If you don't have an
OID of your own, then I suggest you use this as the root of your MIB.

Dave

--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-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: could you please help me on this

2009-01-22 Thread Dave Shield
2009/1/16 ram k rames2...@gmail.com:
 my questions are what is the difference between site_perl and vendor_perl ?

  /usr/lib/perl5/{version}
  is used for the core perl modules, that are a standard part of
any perl installation
  /usr/lib/perl5/vendor_perl/{version}
  is used for any additional modules that the O/S vendor wanted to include
  as part of the operating system as shipped
  /usr/lib/perl5/site_perl/{version}
  is used for any additional modules that you want to include,
  that are specific to your particular installation.

In general, anything you add ought to go int 'site_perl'.
But the perl binary should find them wherever they are.



 which SNMP,SNMP.pm i need to keep ?

Get rid of everything, and start again.

If you are working with a pre-compiled binary distribution,
then install the net-snmp-perl package which matches the
net-snmp package you are using
   (which should be available from the same place).

If you compiled the net-snmp package yourself, then install
the modules that come in the 'perl' subdirectory of this.

   configure --with-perl-modules; make ; make install

should do this automatically

Don't try to mix SNMP-related perl modules from different
locations, unless you are *very sure that you know what
you are doing.

Dave

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


could you please help me on this

2009-01-19 Thread ram k
r...@abcx libexec]#

these issues are because First i don't know any thing about SNMP and Net:
SNMP(both from cpan.org),i thought these are part of Net-SNMP(Net-SNMP.org)
package, i didn't even realised at the time of Net: SNMP(cpan.org)
installation,i installed Net: SNMP from cpan.org,this is a Object oriented
interface to SNMP(Net-SNMP.org) and installed SNMP(cpan.org) this is Perl5
'SNMP' Extension Module for the Net-SNMP Library .

at the same time Net-SNMP(Net-SNMP.org) has its own perl module for
Net-SNMP(Net-SNMP.org) we can install it from package net-snmp-perl (yum
install net-snmp-perl)?this is my assumption please some one has correct if
any thing is worng in my asumption?

here is my file structure
[r...@abcx perl5]# pwd
/usr/lib/perl5
[r...@abcx perl5]# ll
total 48
drwxr-xr-x 3 root root 4096 Oct 23 09:41 5.8.5

drwxr-xr-x 3 root root 4096 Oct 23 09:41 5.8.6
drwxr-xr-x 3 root root 4096 Oct 23 09:41 5.8.7
drwxr-xr-x 43 root root 4096 Oct 23 09:41 5.8.8
drwxr-xr-x 6 root root 4096 Oct 23 09:41 site_perl
drwxr-xr-x 6 root root 4096 Oct 23 09:41 vendor_perl
[r...@abcx perl5]# cd site_perl/
[r...@abcx site_perl]# ll
total 32
drwxr-xr-x 3 root root 4096 Oct 23 09:41 5.8.5
drwxr-xr-x 3 root root 4096 Oct 23 09:41 5.8.6
drwxr-xr-x 3 root root 4096 Oct 23 09:41 5.8.7
drwxr-xr-x 5 root root 4096 Jan 15 11:55 5.8.8
[r...@abcx
site_perl]# cd 5.8.8
[r...@abcx 5.8.8]# ll
total 16
drwxr-xr-x 2 root root 4096 Jan 15 11:52 Digest
drwxr-xr-x 7 root root 4096 Jan 16 10:05 i386-linux-thread-multi
drwxr-xr-x 3 root root 4096 Jan 15 11:55 Net
[r...@abcx 5.8.8]# cd Net/
[r...@abcx Net]#pwd
/usr/lib/perl5/site_perl/5.8.8/Net
[r...@abcx Net]# ll
total 120
drwxr-xr-x 4 2649 daemon 4096 Oct 20 2005 SNMP
-rw-r--r-- 1 2649 daemon 112950 Oct 20 2005 SNMP.pm


If i go to i386-linux-thread-multi
[r...@abcx Net]# cd ..
[r...@abcx 5.8.8]# cd i386-linux-thread-multi/
[r...@abcx i386-linux-thread-multi]# ll
total 100
drwxr-xr-x 7 root root 4096 Jan 16 10:05 auto
drwxr-xr-x 2 root root 4096 Jan 15 11:39 Crypt
drwxr-xr-x 2 root root 4096 Jan 15 11:50 Digest
drwxr-xr-x 3 root root 4096 Jan 15 15:47 Net
drwxr-xr-x 2 root root 4096 Jan 15 18:38 NetSNMP
-r--r--r-- 1 root root 70398 Aug 9 2006 SNMP.pm
[r...@abcx i386-linux-thread-multi]# cd Net
[r...@abcx Net]# pwd
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Net
[r...@abcx Net]# ll
total 120
drwxr-xr-x 4 root root 4096 Jan 15 15:47 SNMP
-r--r--r-- 1 root root 112950 Jan 15 15:47 SNMP.pm

can see Different versions of SNMP,SNMP.pm in
/usr/lib/perl5/site_perl/5.8.8/Net
and /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/Net
If i go to /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/NetSNMP

[r...@abcx NetSNMP]#
pwd
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/NetSNMP
[r...@abcx NetSNMP]# ll
total 12
-r--r--r-- 1 root root 9295 Jul 13 2006 default_store.pm


*If i goto /usr/lib/perl5/vendor_perl/5.8.8*
[r...@abcx 5.8.8]# pwd
/usr/lib/perl5/vendor_perl/5.8.8
[r...@abcx 5.8.8]# ll
total 76
drwxr-xr-x 2 root root 4096 Jan 15 11:23 Digest
drwxr-xr-x 2 root root 4096 Oct 23 09:46 Foomatic
drwxr-xr-x 16 root root 4096 Jan 15 19:03 i386-linux-thread-multi
drwxr-xr-x 3 root root 4096 Jan 15 12:08 Net
-r--r--r-- 1 root root 5045 May 2 2007 RRDp.pm
drwxr-xr-x 4 root root 4096 Oct 23 09:41 URI
-rw-r--r-- 1 root root 30307 Nov 5 2004 URI.pm
[r...@abcx
5.8.8]# cd Net/
[r...@abcx Net]#ll
total 120
drwxr-xr-x 4 root root 4096 Jan 15 12:08 SNMP
-r--r--r-- 1 root root 112950 Oct 20 2005 SNMP.pm


my questions are what is the difference between site_perl and vendor_perl ?
which SNMP,SNMP.pm i need to keep ?is ther any other places i need to keep
copy of these(SNMP,SNMP.pm) ?
--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


RE: could you please help me on this

2009-01-19 Thread Mike Ayers
 From: ram k [mailto:rames2...@gmail.com] 
 Sent: Friday, January 16, 2009 9:37 AM

 these issues are because First i don't know any thing about 
 SNMP and Net: SNMP(both from cpan.org),i thought these are 
 part of Net-SNMP(Net-SNMP.org) package, i didn't even 
 realised at the time of Net: SNMP(cpan.org) installation,i 
 installed Net: SNMP from cpan.org,this is a Object oriented 
 interface to SNMP(Net-SNMP.org) and installed SNMP(cpan.org) 
 this is Perl5 'SNMP' Extension Module for the Net-SNMP Library .
 
 at the same time Net-SNMP(Net-SNMP.org) has its own perl 
 module for Net-SNMP(Net-SNMP.org) we can install it from 
 package net-snmp-perl (yum install net-snmp-perl)?this is my 
 assumption please some one has correct if any thing is worng 
 in my asumption?

If you are using yum, then you should be able to use the net-snmp-perl 
if (and only if) you are also using the matching (i.e. update at the same time) 
net-snmp package.  You may need other net-snmp-* packages as well (I've never 
done this myself).

To clarify the perl packages (which I believe you already have 
straightened out), see what Dave had to say:

http://www.net-snmp.org/wiki/index.php/Which_Perl_module_should_I_use


HTH,

Mike

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: About the SNMP Agent extending, Please Help me, Thanks.

2007-01-15 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 20/12/06, ss vincent [EMAIL PROTECTED] wrote:
 Hi Dave,
  I appreciate your help, I have looked the Net-SNMP-Extend-MIB, I think my
 last mail doesn't express clearly, what I want to do is how to invoke the
 Shell scripts in the Net-SNMP agent ( C code), I am trying to use the
 system() function, it seems doesn't work

Probably the easiest way to run a sub-command would be to use the
run_exec_command() or run_shell_command() APIs.
You give these routines the command to run, together with an input string
(if required) and a buffer for the output - and they handle everything else.



Dave

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


About the SNMP Agent extending, Please Help me, Thanks.

2006-12-20 Thread ss vincent
Dear all,
 Now my project need to SNMP support, now I need to figure out how to implement 
it, please help me and give some suggestions.
 
about my project,  OS: Linux 2.6.8,  CPU : intel P4, the Net-SNMP 5.0.9, I need 
to use the SNMP to remotely control my application and Linux QOS,  I have 
finished this work in webpage  by using PHP, I also have finished my own 
command line to support the PHP webapge, so in my PHP My code like this :
 
   exec(/sbin/My_config get $i.destip ,$output)
   exec(/sbin/My_config set $qos.destip \$tempdesip \ );
   exec(/usr/bin/sudo /sbin/iptables -t mangle -A POSTROUTING 
-p $protocolstemp $tempoption -j MARK --set-mark $tempclassmark);
  exec(/usr/bin/sudo /usr/sbin/tc filter add dev myEth0 parent 
1:0 prio 0 protocol ip handle $tempclassmark fw flowid 1:$tempclassmark); 
 
In my SNMP agent code, I hope I can use the same way to implement it. It seems 
that I can use the exec or sh commands in snmpd.conf , but it doesn't support 
the set function, so How can I use My own command line and shell scripts in my 
agent code to support run time modify my application argument and Linux Qos 
configuration, any suggestion is appreciate.
 
best regards,
 
vincent 
 
 
_
Be one of the first to try Windows Live Mail.
http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Net-snmp-users mailing list
Net-snmp-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: About the SNMP Agent extending, Please Help me, Thanks.

2006-12-20 Thread Dave Shield
On 20/12/06, ss vincent [EMAIL PROTECTED] wrote:
  In my SNMP agent code, I hope I can use the same way to implement it. It
 seems that I can use the exec or sh commands in snmpd.conf , but it doesn't
 support the set function

Have a look at the extend and extendFix directives.
These may be able to do what you need.

Failing that, have a look at manipulating the
NET-SNMP-EXTEND-MIB::nsExtendConfigTable
directly.

Dave

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


get segment fault msg, please help me

2006-05-10 Thread casper

[EMAIL PROTECTED] create .c  .h files by using mib2c -c iterate.conf XXX, 
and I use myTable_createEntry to add a row in the initialize_table_myTable 
function, this is the only thing I do in the template, of course some other 
tiny changes to make the code compile successfully,compile the subagent by the 
command net-snmp-config. 

   I start the subagent, and try to get value from the row I added before. but 
I can't see any rows in the table by MG-SOFT MIB Browser. the table content is 
blank.if I add another row and get the value again, unfortunatelly I got 
segment fault message, meanwhile the subagent terminate.I don't why this 
happend. I came to the official mailist,but find nothing valuable. As a newbie 
to the net-snmp agent progamming, this problem cost me two days checking 
without any effect. I hope some one here can help me, I paste my code and any 
hint will be useful.Thank you all.

PS:Cos my poor english, I hope I have described the problem clearly:)

the code is here:

###jmtest.h###
/*
 * Note: this file originally auto-generated by mib2c using
 *  : mib2c.iterate.conf,v 5.17 2005/05/09 08:13:45 dts12 Exp $
 */
#ifndef JMTEST_H
#define JMTEST_H

/*
 * function declarations 
 */
voidinit_jmtest(void);
voidinitialize_table_keyTable(void);
Netsnmp_Node_Handler keyTable_handler;
Netsnmp_First_Data_Point keyTable_get_first_data_point;
Netsnmp_Next_Data_Point keyTable_get_next_data_point;

/*
 * column number definitions for table keyTable 
 */
#define COLUMN_USERINDEX1
#define COLUMN_USERSTATUS   2
#define COLUMN_CHECKTIME3
#define COLUMN_MONSET   4
#endif  /* JMTEST_H */

###jmtest.c###
/*
 * Note: this file originally auto-generated by mib2c using
 *  : mib2c.iterate.conf,v 5.17 2005/05/09 08:13:45 dts12 Exp $
 */

#include 
#include 
#include 
#include jmtest.h
#include 

/* Typical data structure for a row entry */
struct keyTable_entry {
/* Index values */
long userIndex;

/* Column values */
char userStatus[30];
u_long checkTime;
long monSet;
long old_monSet;

/* Illustrate using a simple linked list */
int   valid;
struct keyTable_entry *next;
};

struct keyTable_entry  *keyTable_head = NULL;

/* create a new row in the (unsorted) table */
struct keyTable_entry *
keyTable_createEntry(
 long  userIndex, char *userStatus, u_long checkTime, long 
monSet
) {
struct keyTable_entry *entry;

entry = SNMP_MALLOC_TYPEDEF(struct keyTable_entry);
if (!entry)
return NULL;

entry-userIndex = userIndex;
strcpy(entry-userStatus, userStatus);
entry-checkTime = checkTime;
entry-monSet = monSet;
entry-next = keyTable_head;
keyTable_head = entry;
return entry;
}

/* remove a row from the table */
void
keyTable_removeEntry( struct keyTable_entry *entry ) {
struct keyTable_entry *ptr, *prev;

if (!entry)
return;/* Nothing to remove */

for ( ptr  = keyTable_head, prev = NULL;
  ptr != NULL;
  prev = ptr, ptr = ptr-next ) {
if ( ptr == entry )
break;
}
if ( !ptr )
return;/* Can't find it */

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

SNMP_FREE( entry );   /* XXX - release any other internal resources */
}
/** here is my row_adding code*/
void initializeTableContext()
{
struct keyTable_entry *tmp;
while(keyTable_head){
 tmp = keyTable_head-next;
 keyTable_removeEntry(keyTable_head);
 keyTable_head = tmp;
}
tmp = SNMP_MALLOC_TYPEDEF(struct keyTable_entry);
tmp-next = NULL;
memset(tmp, 0, sizeof(struct keyTable_entry));
tmp-userIndex = 1;
strcpy(tmp-userStatus, shit);
tmp-checkTime = 100;
tmp-monSet = 3;
keyTable_createEntry(tmp-userIndex, tmp-userStatus, tmp-checkTime, 
tmp-monSet);
SNMP_FREE(tmp);
}


/** Initializes the jmtest module */
void
init_jmtest(void)
{
  /* here we initialize all the tables we're planning on supporting */
initialize_table_keyTable();
}

/** Initialize the keyTable table by defining its contents and how it's 
structured */
void
initialize_table_keyTable(void)
{
static oid keyTable_oid[] = {1,3,6,1,3,72,3};
size_t keyTable_oid_len   = OID_LENGTH(keyTable_oid);
netsnmp_handler_registration*reg;
netsnmp_iterator_info   *iinfo;
netsnmp_table_registration_info *table_info;

reg = netsnmp_create_handler_registration(
  keyTable, keyTable_handler,
  keyTable_oid, keyTable_oid_len,
  HANDLER_CAN_RWRITE
  );

table_info = SNMP_MALLOC_TYPEDEF( netsnmp_table_registration_info );
netsnmp_table_helper_add_indexes(table_info,
   ASN_INTEGER,  /* index: userIndex */
   

Re: Problem in net SNMP agent( complied with MY own MIB)..please help me

2005-04-02 Thread Robert Story
On Mon, 21 Mar 2005 18:33:01 +0100 [EMAIL PROTECTED] wrote:
KSDC   snmpget -v 2c -m ALL -M
KSDC   /home/kumar/projects_cc/common/mib_tools/mibs/ietf localhost -c private
KSDC   10.94.1.1.14.1.2.01

If 01 is supposed to be a string, you need to escape it, like so:

10.94.1.1.14.1.2.\01\

KSDC  adslLineConfProfileEntryOBJECT-TYPE
KSDC  INDEX { IMPLIED adslLineConfProfileName}

Hmm... I'm not sure that snmpget is smart enought to recognize that the index
is implied and omit the length. Try building the OID manually:

10.94.1.1.14.1.2.0.0.0.0.0.0.0.0.0.1

-- 
NOTE: messages sent directly to me, instead of the lists, will be deleted
  unless they are requests for paid consulting services.

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

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


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Problem in net SNMP agent( complied with MY own MIB)..please help me

2005-03-21 Thread Kumara-Swamy.Dontamsetti
Hi,

I am struggling from past three days on same problem...

1. I have complied my MIB ( ADSL-LINE-MIB) with net-SNMP agent   -- 
success. 
( Note: code is generated with mib2c.iterate.conf )

2. I have created snmpd.conf (with rocommunity is public and  rwcommunity 
is private ).
3. I have started snmp demon in following way with root access.

agent/snmpd -r -f  -Lo -m ALL -M 
/home/kumar/projects_cc/common/mib_tools/mibs/ietf -c 
/home/kumar/.snmp/snmpd.conf -   C -d -a  

Output of the demon...

init_adslMIB: Entered  
initialize_table_adslLineConfProfileTable: Entered  
netsnmp_create_handler_registration  
netsnmp_create_handler_registration success  
netsnmp_table_helper_add_indexes  
netsnmp_register_table_iterator  
adslLineConfProfileTable_createEntry: Entered  SNMP_TYPEDEF_MALLOC  
adslLineConfProfileTable Entry: created with profile name: 01 
adslLineConfProfileTable_createEntry: Entered  SNMP_TYPEDEF_MALLOC 
adslLineConfProfileTable Entry: created with profile name: 02
( Note: All the above logs are added by for debugging... )

( some more errors from other MIBS.. Because I am loading all MIBs from 
specified directory.. Those I have ignored..
For reference I have including all those errors at the end of the mail)

NET-SNMP version 5.2.1

4. I have requested one object in following way with root access.

( some more errors from other MIBS.. Because I am loading all MIBs from 
specified directory.. Those I have ignored..
For reference I have included all those errors at the end of the mail)

snmpget -v 2c -m ALL -M 
/home/kumar/projects_cc/common/mib_tools/mibs/ietf localhost -c private 
10.94.1.1.14.1.2.01

Output of the command:


transmission.adslMIB.adslLineMib.adslMibObjects.adslLineConfProfileTable.adslLineConfProfileEntry.adslAtucConfRateMod
   e.'.' = No Such Object available on this agent

So, It has recognised the path properly... I feel that problem is in 
instance of the object.. I have given MIB  definitions at end of the question.


Output of the demon when requested the OID..


Received 49 bytes from UDP: [127.0.0.1]:33965
: 30 2F 02 01  01 04 07 70  72 69 76 61  74 65 A0 21
0/.private !
0016: 02 04 79 CB  3C 92 02 01  00 02 01 00  30 13 30 11
..yË...0.0.
0032: 06 0D 2B 06  01 02 01 0A  5E 01 01 0E  01 02 01 05
..+.^...
0048: 00.

Received SNMP packet(s) from UDP: [127.0.0.1]:33965
  GET message
-- ADSL-LINE-MIB::adslAtucConfRateMode.'.'

Sending 49 bytes to UDP: [127.0.0.1]:33965
: 30 2F 02 01  01 04 07 70  72 69 76 61  74 65 A2 21
0/.private¢!
0016: 02 04 79 CB  3C 92 02 01  00 02 01 00  30 13 30 11
..yË...0.0.
0032: 06 0D 2B 06  01 02 01 0A  5E 01 01 0E  01 02 01 80
..+.^...
0048: 00.


But When I tried in the following way , it is giving some parser error..

snmpget -v 2c -m ALL -M 
/home/kumar/projects_cc/common/mib_tools/mibs/ietf localhost -c private 
10.94.1.1.14.1.2.\01\

snmpget -v 2c -m ALL -M 
/home/kumar/projects_cc/common/mib_tools/mibs/ietf localhost -c private 
'10.94.1.1.14.1.2.01'

Error message:
10.94.1.1.14.1.2.01:Unknown Object Identifier ( 
-quote is for variable length strings)

Please help me to come out of this problem.

Advance thanks for ur help..

Regards
Kumar


MIB definitions...


 adslLineConfProfileTableOBJECT-TYPE
 SYNTAX  SEQUENCE OF AdslLineConfProfileEntry
 MAX-ACCESS  not-accessible
 STATUS  current
 DESCRIPTION
 This table contains information on the ADSL line
 configuration.  One entry in this table reflects a
 profile defined by a manager which can be used to
 configure the ADSL line.
 ::= { adslMibObjects 14}

 adslLineConfProfileEntryOBJECT-TYPE
 SYNTAX  AdslLineConfProfileEntry
 MAX-ACCESS  not-accessible
 STATUS  current
 DESCRIPTION
 Each entry consists of a list of parameters that
 represents the configuration of an ADSL modem.

 When `dynamic' profiles are implemented, a default
 profile will always exist.  This profile's name will
 be set to `DEFVAL' and its parameters will be set
 to vendor specific values, unless otherwise specified
 in this document

Extention : Problem in net SNMP agent( complied with MY own MIB)..please help me

2005-03-21 Thread Kumara-Swamy.Dontamsetti
I have forgot to mention the earlier mail.

When I try on other system MIBs It is working perfectly I have 
tried on SNMP MIB and system MIB.

Thanks in advance.
Regards
Kumar





 Hi,
 
 I am struggling from past three days on same problem ... 
 
 1. I have complied my MIB ( ADSL-LINE-MIB) with net-SNMP agent   -- 
 success. 
   ( Note: code is generated with mib2c.iterate.conf )
 
 2. I have created snmpd.conf (with rocommunity is public and  rwcommunity 
 is private ).
 3. I have started snmp demon in following way with root access.
 
   agent/snmpd -r -f  -Lo -m ALL -M 
 /home/kumar/projects_cc/common/mib_tools/mibs/ietf -c 
 /home/kumar/.snmp/snmpd.conf -   C -d -a  
 
   Output of the demon ... 
 
   init_adslMIB: Entered  
   initialize_table_adslLineConfProfileTable: Entered  
   netsnmp_create_handler_registration  
   netsnmp_create_handler_registration success  
   netsnmp_table_helper_add_indexes  
   netsnmp_register_table_iterator  
   adslLineConfProfileTable_createEntry: Entered  SNMP_TYPEDEF_MALLOC  
   adslLineConfProfileTable Entry: created with profile name: 01 
   adslLineConfProfileTable_createEntry: Entered  SNMP_TYPEDEF_MALLOC 
   adslLineConfProfileTable Entry: created with profile name: 02
   ( Note: All the above logs are added by for debugging ...  )
 
   ( some more errors from other MIBS.. Because I am loading all MIBs from 
 specified directory.. Those I have ignored..
   For reference I have including all those errors at the end of the mail)
 
   NET-SNMP version 5.2.1
 
 4. I have requested one object in following way with root access.
 
   ( some more errors from other MIBS.. Because I am loading all MIBs from 
 specified directory.. Those I have ignored..
   For reference I have included all those errors at the end of the mail)
 
   snmpget -v 2c -m ALL -M 
 /home/kumar/projects_cc/common/mib_tools/mibs/ietf localhost -c private   
   10.94.1.1.14.1.2.01
 
   Output of the command:
 
   
 transmission.adslMIB.adslLineMib.adslMibObjects.adslLineConfProfileTable.adslLineConfProfileEntry.adslAtucConfRateMod
e.'.' = No Such Object available on this agent
 
   So, It has recognised the path properly ...  I feel that problem is 
 in instance of the object.. I have given MIB  definitions at end of the 
 question.
 
   
   Output of the demon when requested the OID..
 
 
   Received 49 bytes from UDP: [127.0.0.1]:33965
   : 30 2F 02 01  01 04 07 70  72 69 76 61  74 65 A0 21
 0/.private !
   0016: 02 04 79 CB  3C 92 02 01  00 02 01 00  30 13 30 11
 ..yË...0.0.
   0032: 06 0D 2B 06  01 02 01 0A  5E 01 01 0E  01 02 01 05
 ..+.^...
   0048: 00.
 
   Received SNMP packet(s) from UDP: [127.0.0.1]:33965
 GET message
   -- ADSL-LINE-MIB::adslAtucConfRateMode.'.'
 
   Sending 49 bytes to UDP: [127.0.0.1]:33965
   : 30 2F 02 01  01 04 07 70  72 69 76 61  74 65 A2 21
 0/.private¢!
   0016: 02 04 79 CB  3C 92 02 01  00 02 01 00  30 13 30 11
 ..yË...0.0.
   0032: 06 0D 2B 06  01 02 01 0A  5E 01 01 0E  01 02 01 80
 ..+.^...
   0048: 00.
 
 
   But When I tried in the following way , it is giving some parser error..
 
   snmpget -v 2c -m ALL -M 
 /home/kumar/projects_cc/common/mib_tools/mibs/ietf localhost -c private   
   10.94.1.1.14.1.2.\01\
 
   snmpget -v 2c -m ALL -M 
 /home/kumar/projects_cc/common/mib_tools/mibs/ietf localhost -c private   
   '10.94.1.1.14.1.2.01'
 
   Error message:
   10.94.1.1.14.1.2.01:Unknown Object Identifier ( 
 -quote is for variable length strings)
 
   Please help me to come out of this problem ... ..
 
 Advance thanks for ur help..
 
 Regards
 Kumar
 
 
 MIB definitions ... 
 
   
  adslLineConfProfileTableOBJECT-TYPE
  SYNTAX  SEQUENCE OF AdslLineConfProfileEntry 
  MAX-ACCESS  not-accessible
  STATUS  current
  DESCRIPTION
  This table contains information on the ADSL line
  configuration.  One entry in this table reflects a
  profile defined by a manager which can be used to
  configure the ADSL line.
  ::= { adslMibObjects 14}
 
  adslLineConfProfileEntryOBJECT-TYPE
  SYNTAX  AdslLineConfProfileEntry
  MAX-ACCESS  not-accessible
  STATUS  current
  DESCRIPTION
  Each entry consists of a list of parameters that
  represents the configuration of an ADSL modem.
 
  When `dynamic

Re: Hi.... I need ur help..Please help me

2005-03-08 Thread Robert Story
On Thu, 24 Feb 2005 01:45:19 -0800 Chenna wrote:
C   I could send the traps usgin snmptrap command. But my requirement
C is to use the api. like snmp_easy_trap...like that.
C 
CI tried to use the mib2c to generate the stubs. But it asked to
C load the PERL module. I got some info for doing it in Solaris but I
C could not make it done properly.

Did you follow the instructions in README.solaris?

You might also try generating the source on another machine, if you have access
to one.

Cnet-snmp-config --compile-subagent iAgent nstAgentSubagentObject.c
C 
C But I got the error like /usr/local/bin/net-snmp-config : cannot shift.

Hmmm... try running the script with debug (sh -x net-snmp-config), or modifing
the script to add unique 'echo' statements to determing which shift in the
script is failing.

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

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


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Hi.... I need ur help..Please help me

2005-02-24 Thread Chenna
Hi Robert,
   Im using Net-SNMP 5.1.2. My requirement is to write a simple piece
of code send traps from my application. For e.g. If my process is
running somewhere, I have send the traps with respect to the
performance of that process.

  So please tell me what all the steps I have to follow make it done.

  I could send the traps usgin snmptrap command. But my requirement
is to use the api. like snmp_easy_trap...like that.

   I tried to use the mib2c to generate the stubs. But it asked to
load the PERL module. I got some info for doing it in Solaris but I
could not make it done properly.

The Procedure was: #perl MCPAN -e shell
   -- This way I could not succeeded.

   I tried to compile some sample application (nstAgenSubagentObject)
into master agent using the command

   net-snmp-config --compile-subagent iAgent nstAgentSubagentObject.c

But I got the error like /usr/local/bin/net-snmp-config : cannot shift.

   Please give me proper direction to make done. Its very urgent for
me. I have been trying from a long back.

   I hope I will get the information soon.

   Thanks in advance.

-- 
Thanks and Regards
Chenna


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users