Re: How can I test perl modules?

Radek Vokál <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On Tue, 2005-10-18 at 15:27 +0200, Roman Medina-Heigl Hernandez wrote:
> Radek Vokál wrote:
> > I've tried to run sample perl module from
> > 
> > http://net-snmp.sourceforge.net/tutorial/tutorial-5/toolkit/perl/perl_module.pl
> > 
> > I've also modified the snmpd.conf to load the module
> > 
> > # head /etc/snmp/snmpd.conf
> > perl do "/etc/snmp/perl_module.pl";
> > 
> > snmpd doesn't display any error, so I guess it's loaded .. 
> 
> Do the following: kill/stop snmpd (if running as daemon), open a
> shell/xterm/etc and run snmpd in foreground:
> $ snmpd -f -Lsd -Lf /var/log/snmpd.log -p /var/run/snmpd -a
> 
> Now you should see messages like:
> "starting perl_module.pl
> perl_module.pl loaded ok"

That's exactly what I would love to see but still I don't get any line
that the module is loaded

root@garfield ~#  snmpd -f -Lsd -Lf /var/log/snmpd.log -p /var/run/snmpd
-a
root@garfield ~# head /var/log/snmpd.log
too many sensors. ignoring serial16
Turning on AgentX master support.
NET-SNMP version 5.2.2.rc1
Connection from UDP: [127.0.0.1]:41819
Received SNMP packet(s) from UDP: [127.0.0.1]:41819
Received TERM or STOP signal...  shutting down...


> 
> In general your perl module can write to STDERR and it will be dumped
> into the former shell so it is a quick method for debugging. Note also
> that when you modify the module snmpd should be restarted, so you simply
> go to the shell, hit ctrl-c, and launch snmpd (in foreground) again.
> 
> Regards,
> -Roman
-- 
Radek Vokál <[email protected]>
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQBDVPpWpPtjDwJDWJMRAqpkAJ9TowETG9SPpqYa3ydunoYVwpFTPgCgn8ks
3uJBG+8HBYy4tFynOUblaw0=
=LKes
-----END PGP SIGNATURE-----
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.