Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem to run perl_module.pl (net-snmp 5.1.2)

0 views
Skip to first unread message

Sven Hergenhahn

unread,
Oct 4, 2004, 4:36:19 AM10/4/04
to
This is a multi-part message in MIME format.

------_=_NextPart_001_01C4A9E8.00F683DF
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi List,

I'd like to provide some additional values via a perl subagent. I tried =
to use perl_module.pl from the net-snmp page, but it does not work.=20
I always get:

snmpget -v1 -Ov -c public <a_box> .1.3.6.1.4.1.8072.999.1.2.1.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: NET-SNMP-MIB::netSnmp.999.1.2.1.0


It's compiled as follows:

./configure \
--host=3Di386-redhat-linux \
--build=3Di386-redhat-linux \
--target=3Di386-redhat-linux-gnu \
--program-prefix=3D \
--prefix=3D/usr \
--exec-prefix=3D/usr \
--bindir=3D/usr/bin \
--sbindir=3D/usr/sbin \
--datadir=3D/usr/share \
--includedir=3D/usr/include/net-snmp \
--libdir=3D/usr/lib \
--libexecdir=3D/usr/libexec \
--localstatedir=3D/var \
--sharedstatedir=3D/usr/com \
--mandir=3D/usr/share/man \
--infodir=3D/usr/share/info \
--enable-static \
--enable-embedded-perl \
--enable-shared \
--with-cflags=3D'-O2 -g -pipe -march=3Di386 -mcpu=3Di686' \
--with-sys-location=3DUnknown \
--with-logfile=3D/var/log/snmpd.log \
--with-persistent-directory=3D/var/net-snmp \
--with-mib-modules=3Dhost agentx smux \
--with-libwrap=3D/usr/lib \
--sysconfdir=3D/etc \
--enable-ipv6 \
--enable-ucd-snmp-compatibility \
--with-pic \
--with-sys-contact=3Droot@localhost

meat of the snmpd.conf:

rwuser rwuser
rouser rouser
rocommunity public
rwcommunity public
proc snmpd 1 5
load 5 4 3
agentuser root
agentgroup root
syslocation here
syscontact me
perl "do /tmp/perl_module.pl"

snmbd.log with debug enabled:

...
read_config: /etc/snmp/snmpd.conf:145 examining: perl "do =
/tmp/perl_module.pl;"
read_config: Found a parser. Calling it: perl / "do =
/tmp/perl_module.pl;"
perl: initializing perl (/usr/share/snmp/snmp_perl.pl)
perl: done initializing perl
perl: calling perl
perl: finished calling perl
...

NET-SNMP version 5.1.2
snmpd/main: We're up. Starting to process data.
sess_select: for all sessions: 8 6 4
snmpd/select: select( numfds=3D9, ..., tvp=3D(nil))
snmpd/select: returned, count =3D 1
netsnmp_udp: recvfrom fd 8 got 48 bytes (from <xx.xx.xx.xx>)
sess_process_packet: session 0x80c56b0 fd 8 pkt 0x810de70 length 48
Connection from <xx.xx.xx.xx>
dumpx_recv:02 01 00
dumpv_recv: Integer: 0 (0x00)
snmp_api: Parsing SNMPv1 message...
dumph_recv: SNMPv1 message

dumph_recv: SNMP version
dumpx_recv: 02 01 00
dumpv_recv: Integer: 0 (0x00)
dumph_recv: community string
dumpx_recv: 04 06 70 75 62 6C 69 63
dumpv_recv: String: public
dumph_recv: PDU
dumph_recv: request_id
dumpx_recv: 02 04 1C C7 6B 2B
dumpv_recv: Integer: 482831147 (0x1CC76B2B)
dumph_recv: error status
dumpx_recv: 02 01 00
dumpv_recv: Integer: 0 (0x00)
dumph_recv: error index
dumpx_recv: 02 01 00
dumpv_recv: Integer: 0 (0x00)
dumph_recv: VarBindList
dumph_recv: VarBind
dumph_recv: Name
dumpx_recv: 06 0D 2B 06 01 04 01 BF 08 87 67 01 02 01 00
dumpv_recv: ObjID: NET-SNMP-MIB::netSnmp.999.1.2.1.0
dumph_recv: Value
snmp_agent: agent_sesion 0x8108148 created
callback: START calling callbacks for maj=3D1 min=3D5
callback: calling a callback for maj=3D1 min=3D5
mibII/vacm_vars: vacm_in_view: ver=3D0, community=3Dpublic
netsnmp_udp_getSecName: resolve <"public", 0xf20e6082>
netsnmp_udp_getSecName: compare <"public", 0x00000000/0x00000000>... =
SUCCESS
subtree: looking for subtree for context: ""
subtree: found one for: ""
mibII/vacm_vars: vacm_in_view: sn=3DanonymousSecName002, =
gn=3DanonymousGroupName002, Done checking setup
callback: END calling callbacks for maj=3D1 min=3D5 (1 called)
subtree: looking for subtree for context: ""
subtree: found one for: ""
callback: START calling callbacks for maj=3D1 min=3D0
callback: calling a callback for maj=3D1 min=3D0
mibII/vacm_vars: vacm_in_view: ver=3D0, community=3Dpublic
netsnmp_udp_getSecName: resolve <"public", 0xf20e6082>
netsnmp_udp_getSecName: compare <"public", 0x00000000/0x00000000>... =
SUCCESS
subtree: looking for subtree for context: ""
subtree: found one for: ""
vacm:getView: , found
, vt=3D1
callback: END calling callbacks for maj=3D1 min=3D0 (1 called)
snmp_agent: add_vb_to_cache(0x8108148, 1, =
NET-SNMP-MIB::netSnmp.999.1.2.1.0, 0x80ad960)
snmp_agent: tp->start NET-SNMP-AGENT-MIB::nsTransactions.2, tp->end =
SNMPv2-MIB::snmpSetSerialNo.0,
handler:calling: main handler bulk_to_next
handler:calling: calling handler bulk_to_next for mode GET
handler:calling: calling handler null for mode GET
helper:null: Got request
helper:null: oid:NET-SNMP-MIB::netSnmp.999.1.2.1.0
handler:returned: handler null returned 0
handler:returned: handler bulk_to_next returned 0
results: request results (status =3D 0):
results: NET-SNMP-MIB::netSnmp.999.1.2.1.0 =3D No Such Object =
available on this agent at this OID
snmp_send: Building SNMPv1 message...

I also put some checks into perl_module.pl to create a file in /tmp, but =
the file does not get created.=20

It seems, the module is not even started.

Any hints welcome!

Thanks,
Sven
________________________________________
Sven Hergenhahn
Infrastructure Engineer Unix
Information Technology Services
SAS EMEA HQ


------_=_NextPart_001_01C4A9E8.00F683DF
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.0.6603.0">
<TITLE>Problem to run perl_module.pl (net-snmp 5.1.2)</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=3D2 FACE=3D"Arial">Hi List,</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I'd like to provide some additional =
values via a perl subagent. I tried to use perl_module.pl from the =
net-snmp page, but it does not work. </FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I always get:</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">snmpget -v1 -Ov -c public &lt;a_box&gt; =
.1.3.6.1.4.1.8072.999.1.2.1.0</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Error in packet</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Reason: (noSuchName) There is no such =
variable name in this MIB.</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Failed object: =
NET-SNMP-MIB::netSnmp.999.1.2.1.0</FONT>
</P>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">It's compiled as follows:</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">./configure \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--host=3Di386-redhat-linux \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--build=3Di386-redhat-linux \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--target=3Di386-redhat-linux-gnu =
\</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--program-prefix=3D \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--prefix=3D/usr \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--exec-prefix=3D/usr \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--bindir=3D/usr/bin \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--sbindir=3D/usr/sbin \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--datadir=3D/usr/share \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--includedir=3D/usr/include/net-snmp =
\</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--libdir=3D/usr/lib \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--libexecdir=3D/usr/libexec \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--localstatedir=3D/var \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--sharedstatedir=3D/usr/com \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--mandir=3D/usr/share/man \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--infodir=3D/usr/share/info \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--enable-static \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--enable-embedded-perl \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--enable-shared \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--with-cflags=3D'-O2 -g -pipe =
-march=3Di386 -mcpu=3Di686' \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--with-sys-location=3DUnknown \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--with-logfile=3D/var/log/snmpd.log =
\</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">--with-persistent-directory=3D/var/net-snmp \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--with-mib-modules=3Dhost agentx smux =
\</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--with-libwrap=3D/usr/lib \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--sysconfdir=3D/etc \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--enable-ipv6 \</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--enable-ucd-snmp-compatibility =
\</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">--with-pic \</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">--with-sys-contact=3Droot@localhost</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">meat of the snmpd.conf:</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">rwuser&nbsp; rwuser</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">rouser&nbsp; rouser</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">rocommunity&nbsp; public</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">rwcommunity&nbsp; public</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">proc&nbsp; snmpd 1 5</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">load&nbsp; 5 4 3</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">agentuser&nbsp; root</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">agentgroup&nbsp; root</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">syslocation&nbsp; here</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">syscontact&nbsp; me</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">perl &quot;do =
/tmp/perl_module.pl&quot;</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">snmbd.log with debug enabled:</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">...</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">read_config: /etc/snmp/snmpd.conf:145 =
examining: perl &quot;do /tmp/perl_module.pl;&quot;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">read_config: Found a parser.&nbsp; =
Calling it: perl / &quot;do /tmp/perl_module.pl;&quot;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">perl: initializing perl =
(/usr/share/snmp/snmp_perl.pl)</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">perl: done initializing perl</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">perl: calling perl</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">perl: finished calling perl</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">...</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">NET-SNMP version 5.1.2</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">snmpd/main: We're up.&nbsp; Starting =
to process data.</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">sess_select: for all sessions: 8 6 =
4</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">snmpd/select: select( numfds=3D9, ..., =
tvp=3D(nil))</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">snmpd/select: returned, count =3D =
1</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">netsnmp_udp: recvfrom fd 8 got 48 =
bytes (from &lt;xx.xx.xx.xx&gt;)</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">sess_process_packet: session 0x80c56b0 =
fd 8 pkt 0x810de70 length 48</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Connection from =
&lt;xx.xx.xx.xx&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">dumpx_recv:02 01 00</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">dumpv_recv:&nbsp; Integer:&nbsp;&nbsp; =
0 (0x00)</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">snmp_api: Parsing SNMPv1 =
message...</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">dumph_recv: SNMPv1 message</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">dumph_recv:&nbsp;&nbsp; SNMP =
version</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">dumpx_recv:&nbsp;&nbsp;&nbsp; 02 01 =
00</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">dumpv_recv:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Integer:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 (0x00)</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">dumph_recv:&nbsp;&nbsp; community =
string</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">dumpx_recv:&nbsp;&nbsp;&nbsp; 04 06 70 =
75 62 6C 69 63</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">dumpv_recv:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
String:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">dumph_recv:&nbsp;&nbsp; PDU</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">dumph_recv:&nbsp;&nbsp;&nbsp;&nbsp; =
request_id</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">dumpx_recv:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 02 04 1C C7 6B =
2B</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">dumpv_recv:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Integer:&nbsp;&nbsp;&nbsp;&nbsp; 482831147 (0x1CC76B2B)</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">dumph_recv:&nbsp;&nbsp;&nbsp;&nbsp; =
error status</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">dumpx_recv:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 02 01 00</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">dumpv_recv:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Integer:&nbsp;&nbsp;&nbsp;&nbsp; 0 (0x00)</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">dumph_recv:&nbsp;&nbsp;&nbsp;&nbsp; =
error index</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">dumpx_recv:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 02 01 00</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">dumpv_recv:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Integer:&nbsp;&nbsp;&nbsp;&nbsp; 0 (0x00)</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">dumph_recv:&nbsp;&nbsp;&nbsp;&nbsp; =
VarBindList</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">dumph_recv:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
VarBind</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">dumph_recv:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; Name</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">dumpx_recv:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; 06 0D 2B 06 01 04 01 BF 08 87 67 01 02 01 00</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">dumpv_recv:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; ObjID: NET-SNMP-MIB::netSnmp.999.1.2.1.0</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">dumph_recv:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; Value</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">snmp_agent: agent_sesion 0x8108148 =
created</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">callback: START calling callbacks for =
maj=3D1 min=3D5</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">callback: calling a callback for =
maj=3D1 min=3D5</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">mibII/vacm_vars: vacm_in_view: =
ver=3D0, community=3Dpublic</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">netsnmp_udp_getSecName: resolve =
&lt;&quot;public&quot;, 0xf20e6082&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">netsnmp_udp_getSecName: compare =
&lt;&quot;public&quot;, 0x00000000/0x00000000&gt;... SUCCESS</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">subtree: looking for subtree for =
context: &quot;&quot;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">subtree: found one for: =
&quot;&quot;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">mibII/vacm_vars: vacm_in_view: =
sn=3DanonymousSecName002, gn=3DanonymousGroupName002, Done checking =
setup</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">callback: END calling callbacks for =
maj=3D1 min=3D5 (1 called)</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">subtree: looking for subtree for =
context: &quot;&quot;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">subtree: found one for: =
&quot;&quot;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">callback: START calling callbacks for =
maj=3D1 min=3D0</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">callback: calling a callback for =
maj=3D1 min=3D0</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">mibII/vacm_vars: vacm_in_view: =
ver=3D0, community=3Dpublic</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">netsnmp_udp_getSecName: resolve =
&lt;&quot;public&quot;, 0xf20e6082&gt;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">netsnmp_udp_getSecName: compare =
&lt;&quot;public&quot;, 0x00000000/0x00000000&gt;... SUCCESS</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">subtree: looking for subtree for =
context: &quot;&quot;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">subtree: found one for: =
&quot;&quot;</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">vacm:getView: , found</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">, vt=3D1</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">callback: END calling callbacks for =
maj=3D1 min=3D0 (1 called)</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">snmp_agent: add_vb_to_cache(0x8108148, =
1, NET-SNMP-MIB::netSnmp.999.1.2.1.0, 0x80ad960)</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">snmp_agent: tp-&gt;start =
NET-SNMP-AGENT-MIB::nsTransactions.2, tp-&gt;end =
SNMPv2-MIB::snmpSetSerialNo.0,</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">handler:calling: main handler =
bulk_to_next</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">handler:calling: calling handler =
bulk_to_next for mode GET</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">handler:calling: calling handler null =
for mode GET</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">helper:null: Got request</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">helper:null:&nbsp;&nbsp; =
oid:NET-SNMP-MIB::netSnmp.999.1.2.1.0</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">handler:returned: handler null =
returned 0</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">handler:returned: handler bulk_to_next =
returned 0</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">results: request results (status =3D =
0):</FONT>

<BR><FONT SIZE=3D2 =
FACE=3D"Arial">results:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
NET-SNMP-MIB::netSnmp.999.1.2.1.0 =3D No Such Object available on this =
agent at this OID</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">snmp_send: Building SNMPv1 =
message...</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I also put some checks into =
perl_module.pl to create a file in /tmp, but the file does not get =
created. </FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">It seems, the module is not even =
started.</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Any hints welcome!</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks,</FONT>

<BR><FONT SIZE=3D2 FACE=3D"Arial">Sven</FONT>

<BR><FONT COLOR=3D"#000080" SIZE=3D1 =
FACE=3D"Arial">________________________________________</FONT><BR>
<FONT SIZE=3D2 FACE=3D"Arial">Sven Hergenhahn<BR>
Infrastructure Engineer=A0Unix<BR>
Information Technology Services<BR>
SAS EMEA HQ<BR>
</FONT>
</P>
<BR>

</BODY>
</HTML>
------_=_NextPart_001_01C4A9E8.00F683DF--


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Dave Shield

unread,
Oct 4, 2004, 6:57:39 AM10/4/04
to

> I'd like to provide some additional values via a perl subagent. I tried=
=3D

> to use perl_module.pl from the net-snmp page, but it does not work.


> meat of the snmpd.conf:

> perl "do /tmp/perl_module.pl"


OK - so the agent will call this script as part of starting up.
What does this script do? Does it register a handler for =

the OID(s) you are interested in?

Dave

PS: Please - no HTML mail. Thanks

Sven Hergenhahn

unread,
Oct 4, 2004, 7:21:12 AM10/4/04
to
Hi David,

thanks for the answer and sorry for the HTML...

>> perl "do /tmp/perl_module.pl"

> OK - so the agent will call this script as part of starting up.

> What does this script do? Does it register a handler for=20


> the OID(s) you are interested in?

I'm trying with the example script =
(http://www.net-snmp.org/tutorial-5/toolkit/perl/perl_module.pl) and =
even that one doesn't seem to work. It should regisdter a handler, but =
as I said, it doesn't even seem to start as I added some lines at the =
top to create a file in /tmp, but the file never shows up.=20

Cheers,
Sven

Thomas Anders

unread,
Oct 4, 2004, 9:23:08 AM10/4/04
to
Sven Hergenhahn wrote:
> I'm trying with the example script (http://www.net-snmp.org/tutorial-5/toolkit/perl/perl_module.pl) and even that one doesn't seem to work. It should regisdter a handler, but as I said, it doesn't even seem to start as I added some lines at the top to create a file in /tmp, but the file never shows up.

First, that particular functionality (embedded perl support in snmpd) hasn't
received much testing, so running into problem isn't all that unlikely.

FWIW, I'm successfully running a "real-world" embedded perl module with
Net-SNMP 5.1.2 and Perl 5.6.1 on Debian, so at least it's possible. :)
However, I can't tell much about any possible problems with your RedHat
environment. I suggest running the agent under strace and/or a debugger
to find out what's happening.

Having said that, I'd love to hear from other embedded perl users
(successful or not), their environment and whether they also see the problem
described in http://sourceforge.net/mailarchive/message.php?msg_id=9328464 .


+Thomas

--
Thomas Anders (thomas.anders at blue-cable.de)

Sven Hergenhahn

unread,
Oct 6, 2004, 12:23:46 PM10/6/04
to
This is a multi-part message in MIME format.

------_=_NextPart_001_01C4A7A0.D7D1457E


Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi List,

I'd like to provide some additional values via a perl subagent. I tried =

meat of the snmpd.conf:

snmbd.log with debug enabled:

Any hints welcome!


------_=_NextPart_001_01C4A7A0.D7D1457E

</BODY>
</HTML>
------_=_NextPart_001_01C4A7A0.D7D1457E--

0 new messages