Receiving multiple request

2020-11-06 Thread Deepak Sachan
Hi all,
I have implemented agentx subagent.
When i run one snmpset for one oid e.g
snmpset  oid1 value1
snmpset oid2  value2
snmpset oid3  value3
its working fine.
But when i run one snmpset for all oids e.g
snmpset oid1 value1  oid2 value2  oid3 value3 oid4 value4
 i received repeated (4 to 5 times)set request for each oid.
I have set in snmpd.conf
agentxretries 0
agentxTimeout 1200

Why this is happening?.
Thanks in advance.
___
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


agent_check_process(0)

2019-09-16 Thread Deepak Sachan
I am using net-snmp 5.7. Using Agent X.
I have written a code like

while(1){
-
-
-
if(flag)
agent_check_process(0);
 }

Whenever flag changes  0 to 1 it reconnect Agent X every time and program
has to wait 10 to15 seconds until it reconnect and process pending requests.
1. Is here any way not to reconnect every time??  or just temporary suspend
the agent_check_process(0) .
2. I don`t want to process pending requests.

Thanks in Advance.
___
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 reduce agent x reconnect time

2019-09-06 Thread Deepak Sachan
Hi all
I am using 5.7.2 in my application.  After made any change in snmpd.conf I
have to restart agent to reread the snmpd.conf. after restarting it shows -
agent x reconnected in 15.
How can i reduce this reconnect time??
Thanks in advance.
___
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


Trap server address in snmpd.conf

2019-05-20 Thread Deepak Sachan
Heĺlo
In snmpd.conf trap server address is defined as
Trap2sink 192.168.1.10 public 162
If i edit the snmpd.conf file and changed address to 192.168.1.010 then
traps are not received at trap receiver.
Help required.
Thanks in advance
___
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 store val.string

2018-05-04 Thread Deepak Sachan
hello

i want to reset password o my device through snmp client (i.e.MIB
browser).Agent will receive the password string and send it to UART.
MIB contains-
PasswordReset OBJECT-TYPE
SYNTAXDisplayString
MAX-ACCESSread-write
STATUScurrent
DESCRIPTION
"Device password reset. Password length is Max 8 characters"
::= { commonSystemParams 10}

following is code snipt for password handle-


char pwd_str[]="1234";


int handle_PasswordReset(netsnmp_mib_handler *handler,
  netsnmp_handler_registration *reginfo,
  netsnmp_agent_request_info   *reqinfo,
  netsnmp_request_info *requests)
{
int ret; char str_pwd[4]="";
/* We are never called for a GETNEXT if it's registered as a
   "instance", as it's "magically" handled for us.  */

/* a instance handler also only hands us one request at a time, so
   we don't need to loop over a list of requests; we'll only get one. */

switch(reqinfo->mode) {

case MODE_GET:
snmp_set_var_typed_value(requests->requestvb, ASN__OCTET_STR,
 /* XXX: a pointer to the scalar's data
*/
(u_char*)&pwd_str,
 /* XXX: the length of the data in
bytes */
sizeof(pwd));
break;

   .
   .
   .
   .

case MODE_SET_COMMIT:

//here is the problem to store password string

str_ pwd=*(requests->requestvb->val.string);/* XXX: delete
temporary storage */

 write(fd,str_pwd,4); //write to serial port
 usleep(10);

/* XXX: delete temporary storage */
if (/* XXX: error? */0) {
/* try _really_really_ hard to never get to this point */
netsnmp_set_request_error(reqinfo, requests,
  .
   .
   .
   .

return SNMP_ERR_NOERROR;
}


I am able to get the password string but not able to set.

Any suggestion
Thanks in advance.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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


Trap implementation

2018-04-06 Thread Deepak Sachan
Hi
i have generated two .c files using mib2c.scaler and mib2c.notify for
scaler and trap object.
can we combined these two file in one file??
Is there any application which can generate sigle file

Thanks
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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


agent not responding to custom MIB

2018-03-20 Thread Deepak Sachan
hi
My agent/ device  is only responding to standard system
MIB(sys.Location,sysDscr etc). It is not responding custom MIB (ie MY-MIB).
custom mib is under .private.enterprise.myMoule

Help required!!!
Any modification in snmpd.conf access control???

Thanks in advance.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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


no able to fetch agent parameters from MIB browser

2018-03-14 Thread Deepak Sachan
Hi

I am trying to get/set values from ireasoning MIB browser. My mib module
name tropoModem.

When i load it into mib browser it comes under
.private.enterprise.tropomModem

I am able to get system prameters like sysDscr, sysUpTime etc which are
defined in snmpd.conf-

   # It is also possible to set the sysContact and sysLocation system

  # variables through the snmpd.conf file.  **PLEASE NOTE** that setting

  # the value of these objects here makes these objects READ-ONLY

  # (regardless of any access control settings).  Any attempt to set the

  # value of an object whose value is given here will fail with an error

  # status of notWritable.

 syslocation CERS (configure /etc/snmp/snmpd.local.conf)

syscontact Root  (configure
/etc/snmp/snmpd.local.conf)

sysName TROPO OFDM MODEM


But When i am trying to  get/set values which are in
.private.enterprise.tropomModem .ctrlParam->set it shows "No such name
error (agent ip address)".

Should I have added following change in snmpd.conf  or not 



# Third, create a view for us to let the groups have rights to:

#   incl/excl subtree  mask

view allincluded  .1   80

view system included  .iso.org.dod.internet.mgmt.mib-2.system

->  view tropoModem included
.iso.org.dod.internet.private.enterprises.tropoModem



 I am able to get/set parameters of my agent (IP: 192.168.1.3)  from my
Ubuntu based client PC through command line -

​$ snmpget -u bootstrap -l authPriv -a MD5 -x DES -A temp_password -X
temp_password 192.168.1.3_MY-MIB::rx1frq.0
 ​$ snmpget -u bootstrap -l authPriv -a MD5 -x DES -A temp_password -X
temp_password 192.168.1.3 MY-MIB::rx1frq.0 i 1700 Mhz



  snmp.conf contains -

defSecurityName demo
defSecurityLevel authPriv
defAuthType MD5
defPrivType DES
defAuthPassphrase temp_password
defPrivPassphrase temp_password


snmpd.conf contains -

# createUser bootstrap MD5 temp_password DES
# rwuser bootstrap priv


Should I have change setting in MIB browser to get the values.


thanks
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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


Agent not responding to standard MIB browser (i reasoning)

2017-12-18 Thread Deepak Sachan
hello
 I am able to get/set parameters of my agent  from my  Ubuntu based client
PC through command line -

​$ snmpget -u bootstrap -l authPriv -a MD5 -x DES -A temp_password -X
temp_password AGENT_IP AGENT-MIB::parameter1.0
 ​$ snmpget -u bootstrap -l authPriv -a MD5 -x DES -A temp_password -X
temp_password AGENT_IP AGENT-MIB::parameter1.0 i 20

i have done some user setting using following link
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-an-snmp-daemon-and-client-on-ubuntu-14-04


Now I have loaded MIB into i reasoning MIB browser. From them i am unable
to fetch agent`s parameters.


snmp.conf contains -

defSecurityName demo
defSecurityLevel authPriv
defAuthType MD5
defPrivType DES
defAuthPassphrase temp_password
defPrivPassphrase temp_password

snmpd.conf contains -

# createUser bootstrap MD5 temp_password DES
# rwuser bootstrap priv



Do anyone have idea how I can fetch parameters from standard  MIB browser.
Thanks
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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 increase timeout value

2017-06-05 Thread deepak . sachan deepak . sachan
hi,
My agent is slow in responding to the request.
so how can i increase time out value??
Thankx
 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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


objects defined Under .private.enterprise. are not accessible.

2017-06-01 Thread deepak . sachan deepak . sachan
Hi
 
I am using MG-SOFT  MIB browser for accessing objects from my custom MIB. The 
only objects  i am able to access are of  mib2.system.sysDescr,sysUpTime. etc
  But  objects  defined Under .private.enterprise.deal. are not accessible.
Thanks

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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


implement persistent data store

2017-05-26 Thread deepak . sachan deepak . sachan
Hi 
I am trying to implement persistent data store.
First I have manually created myModule.conf file . In which i defined  four 
tokens (token_1,token_2,...) with value 1,2,3,4 respectively.
(Should these token`s name same as the variables` names that i want to set 
using snmpset? )
Then in myModule.c (generated through mib2c) inside the init_mymodule() i 
registered handler for token_1, token_2 .
register_config_handler("myModule","token_1",token1_handler,NULL,NULL);
register_config_handler("myModule","token_2",token2_handler,NULL,NULL);
.
.
then callback registration
snmp_register_callback( ,  , module_store, ); 
I have to implement token1_handler(); and module_store() . 
suppose e,g  I want to set  the value of param1 by following command-   
snmpset  -On  remote_host MY_MIB::param1.0  i  123  
Where should i implement the logic in token1_handler() or  module_store(). 
Could u provide any idea with more elaboration ?? 
Thanks 
 
 


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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


use of various SET macros in mib2c generated files

2017-05-22 Thread deepak . sachan deepak . sachan
Hi 
There are various SET macros like MODE_SET_RESERVE1, 
MODE_SET_RESERVE2,MODE_SET_UNDO in my generated file .
I have implemented only MODE_SET_COMMIT for setinng values . What is use of 
others??. Are they helpful to set values permanently.??
Thanks in advance. 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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


snmpset does not retain value after restart/reset y

2017-04-27 Thread deepak . sachan deepak . sachan
Hi 
I have tried communicating b/w agent and client using dynamic module (.so)  
creation for snmp agent.
snmpget and snmpset working fine . But after restart/reset the agent does not 
retain  value  . it shows the  previous value which has been defined in .c 
(generated through mib2c) file.   
 Is there any mechanism defined in SNMP to retain last value??
if not , Any idea how it can  be done.??
1.Bill suggested to use  register_config_handler() to register a function that 
will parse a persistent storage file line with the data you wrote, and use  
snmp_register_callback( SNMP_CALLBACK_LIBRARY, SNMP_CALLBACK_STORE_DATA, ... ) 
to register a function that will save your data to the persistent file. 
(Required more detail..)
2.Or we can  a  writing a shell script in agent,say  SNMP_save.sh . When we are 
done with our changes from client at last we need to invoke this script in 
agent from client 
This script, SNMP_save.sh will read all custom objects and make another shell 
script in agent itself which will set value to these latest values.
We call this script snmp_reload_last.sh.Last step is hooking this 
snmp_reload_last.sh to startup sequence of agent, so the last values which were 
set are automatically reconfigured.
Thanks
 
 

 

 


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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


snmpset does not set value permanently

2017-04-24 Thread deepak . sachan deepak . sachan
Hi 
I have tried communicating b/w agent and client using dynamic module (.so)  
creation for snmp agent.
snmpget and snmpset working fine . But if restart the agent ,oid value doesnt 
change . it shows the  previous value which has been defined in .c file.  
Any help ?
Thanks in advance.
Regards
Deepak 

 


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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 add MIB in pre installed snmp package

2017-02-12 Thread deepak . sachan deepak . sachan
 Hello friends
I have got a new hardware in which linux3.0 is runninig with snmp packg 
installed.
How we can add a new MIB in pre installed snmp package in kernel or  installed 
with sudo apt-get install snmpd ?. As there is no source code( so where to copy 
.c file etc)  available.
Could we modify only snmpd.c as per requirement and cross compile  it ?
 
Thanks

 


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
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 instalation problem :snmpd not installed

2017-01-20 Thread deepak . sachan deepak . sachan
Hi
  I am trying to install net-snmp on ubuntu13.10 from .tar source . After 
complete installation-
1. I am not able to find snmp.conf &snmpd.conf
2. snmp server (snmpd) is not installed. (is it possible while installing 
net-snmp ,snmpd is not installed )
3. All the snmp client tool (snmpwalk ,snmpget etc) are running except snmpd . 
while running -
$ snmpd
snmpd: symbol lookup error: /usr/local/lib/libnetsnmpmibs.so.30: undefined 
symbol: netsnmp_memdup
$ sudo service snmpd start
snmpd: unrecognized service
 
 
thanks

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
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 solved :: can not find -lperl

2017-01-15 Thread deepak . sachan deepak . sachan

Hello friends
During net-snmp installation following error message shows. I think this must 
some library linking issue.
Need help to resolve this
up/agentx/.libs/subagent.o mibgroup/utilities/.libs/execute.o 
mibgroup/utilities/.libs/iquery.o mibgroup/mibII/.libs/vacm_conf.o 
mibgroup/agentx/.libs/protocol.o mibgroup/agentx/.libs/client.o 
mibgroup/agentx/.libs/master_admin.o mibgroup/agentx/.libs/agentx_config.o   
-Wl,-rpath -Wl,/home/deepak/Desktop/net-snmp-5.7.3/snmplib/.libs 
../snmplib/.libs/libnetsnmp.so -L/usr/local/lib -L/usr/lib/perl/5.18/CORE 
-lperl -ldl -lpthread -lc -lcrypt -lm  -O2 -fstack-protector -Wl,-E 
-fstack-protector   -Wl,-soname -Wl,libnetsnmpagent.so.30 -o 
.libs/libnetsnmpagent.so.30.0.3
/usr/bin/ld: cannot find -lperl
collect2: error: ld returned 1 exit status
make[1]: *** [libnetsnmpagent.la] Error 1
make[1]: Leaving directory `/home/deepak/Desktop/net-snmp-5.7.3/agent'
make: *** [subdirs] Error 1
By doing some googling I resolved this problem  by symbolic linking
$ sudo ln -s /usr/lib/libperl.so.5.18  /usr/lib/libperl.so
   

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
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 make error : cannot find -lperl

2017-01-09 Thread deepak . sachan deepak . sachan
Hello friends
During net-snmp installation following error message shows. I think this must 
some library linking issue.
Need help to resolve this
up/agentx/.libs/subagent.o mibgroup/utilities/.libs/execute.o 
mibgroup/utilities/.libs/iquery.o mibgroup/mibII/.libs/vacm_conf.o 
mibgroup/agentx/.libs/protocol.o mibgroup/agentx/.libs/client.o 
mibgroup/agentx/.libs/master_admin.o mibgroup/agentx/.libs/agentx_config.o   
-Wl,-rpath -Wl,/home/deepak/Desktop/net-snmp-5.7.3/snmplib/.libs 
../snmplib/.libs/libnetsnmp.so -L/usr/local/lib -L/usr/lib/perl/5.18/CORE 
-lperl -ldl -lpthread -lc -lcrypt -lm  -O2 -fstack-protector -Wl,-E 
-fstack-protector   -Wl,-soname -Wl,libnetsnmpagent.so.30 -o 
.libs/libnetsnmpagent.so.30.0.3
/usr/bin/ld: cannot find -lperl
collect2: error: ld returned 1 exit status
make[1]: *** [libnetsnmpagent.la] Error 1
make[1]: Leaving directory `/home/deepak/Desktop/net-snmp-5.7.3/agent'
make: *** [subdirs] Error 1
Thanks
 


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi___
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 make a device snmp enabled??

2016-12-27 Thread deepak . sachan deepak . sachan

Hello friends
 We have developed a hardware /device for communication  purpose and we make it 
to SNMP enabled so that it can be remotely configured & Monitored .
So what are the basic requirements. We have a processor with Linux OS on the 
device.
 My main concern is How we developed MIB for that device. And how MIB can be 
integrate with snmp daemon.
​Thanks
Deepak 

 

 

 


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
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 fetch values from MY-MIB

2016-08-15 Thread deepak . sachan
I have developed new mib file MY-MIB and successfully add it to my snmp package 
and run snmptranslate successfully (local host).
How my agent give values from MY-MIB when i run snmpget from local/remote snmp 
manager.
 
Deepak 

 


--
___
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


END OF MIB

2014-05-07 Thread deepak . sachan
  I have a blackfin 537 board and we want it to make it snmp enabled (agent).

for this I added the snmpd network application options while building my image 
for Blackfin 537

When I boot up the board, I type the command "snmpd &" to start the snmp deamon.

Then I use snmpwalk (from snmp manager running in another machine)

it is telling me "End of MIB"


I think this is becoz there is no mib for that board(agent).


I think this is becoz there is no mib for that board(agent).

If i copy (all or some standard )mibs into the board , should it work?? or I 
have to create new mib for this particular board .Then what is the process for 
new mib creation??


Could any one  guide how to overcome this issue,
 


--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce___
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