Re: Problem in getting perl_module.pl to work

Julia Wu <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi,
 
I've found that the problem is due to the fact that "perl_module_orig.pl" is executed twice for unknown reason. So it stuck in the following code
$agent->register('myname',$regoid, \&my_snmp_handler);
 
Can anyone tell me why "perl_module_orig.pl" is executed twice when there is only one perl do "/home/julia/net-snmp/perl/perl_module_orig.pl"; in the snmpd.conf?
 
Thanks in advance.
 
 
Julia Wu


Julia Wu <[email protected]> wrote:
Hi,
 
I tried to follow the tutorial to get some understanding of how to embeded perl in snmp-agent. However, I can never start up snmpd once I put the "perl do ...." in the snmpd.conf.
 
When I start up with the following command.
snmpd -r -f -L -c $NET_SNMP_ROOT_DIR/share/snmp/snmpd.conf udp:1161&
 
The following information is found in stdout and I never see anything in the snmpd.log and "NET-SNMP version 5.2.1" is never shown..
starting perl_module.pl
perl_module.pl loaded ok
registering at netSnmp.999
starting perl_module.pl
perl_module.pl loaded ok
registering at netSnmp.999
 
Here is what I have in the snmpd.conf
========
rwuser  julia auth
rwuser initial
perl do "/home/julia/net-snmp/perl/perl_module_orig.pl";
========
Where /home/julia/net-snmp/perl/perl_module_orig.pl is http://net-snmp.sourceforge.net/tutorial/tutorial-5/toolkit/perl/perl_module.pl
 
Here is the command I used to configure net-snmp-5.2.1
./configure --prefix=$NET_SNMP_ROOT_DIR --with-logfile=$NET_SNMP_ROOT_DIR/snmpd.log --with-persistent-directory=$NET_SNMP_ROOT_DIR/config --enable-embedded-perl --enable-shared
 
            Net-SNMP configuration summary:
---------------------------------------------------------
 
  SNMP Versions Supported:    1 2c 3
  Net-SNMP Version:           5.2.1
  Building for:               linux
  Network transport support:  Callback Unix TCP UDP
  SNMPv3 Security Modules:    usm
  Agent MIB code:             mibII ucd_snmp snmpv3mibs notification target agent_mibs agentx utilities
  SNMP Perl modules:          building -- embeddable
  Embedded perl support:      enabled
  Authentication support:     MD5 SHA1
  Encryption support:         DES AES
 
---------------------------------------------------------
 
Can someone help please?
Thanks in advance.
 
 
 
Julia Wu
 
 
 
 



---------------------------------
Do you Yahoo!?
Try Yahoo! Photomail Beta: Send up to 300 photos in one email! 
		
---------------------------------
Do you Yahoo!?
  Messenger 7.0 beta: Free worldwide PC to PC calls
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.