This is a multi-part message in MIME format.

--===============1957701946==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C6FE1A.AF8808C5"

This is a multi-part message in MIME format.

------_=_NextPart_001_01C6FE1A.AF8808C5
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

=20
Hi, (PLS instruct me to become a member)=20
=20
I downloaded and installed the net-snmp-5.4.0.pre4-1.win32.exe on WinXP.
I tried to call snmptranslate from TCL and
use EXpect (5.21 for Window) to get the output as follow:
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
set outfile [open "translate.out" w+]
spawn snmptranslate -m ALL -Tp -OS
..iso.org.dod.internet.mgmt.mib-2.system.sysLocation.0
while (1) {
expect {
eof {
break;
}
"*+*R--" {
puts $outfile "R: $expect_out(buffer)"
}
"*+*RW-" {
puts $outfile "RW: $expect_out(buffer)"
}
}
}
}
close $outfile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
=20
every thing looks fine! I got the tree view of the OID
=20
But... when I turn it into procedure as:
=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D
proc expect_translateCmd {oid} {
set outfile [open "translate-1.out" w+]
spawn snmptranslate -m ALL -Tp -OS $oid =20
while (1) {
expect {
eof {
break;
}
"*+*R--" {
puts $outfile "R: $expect_out(buffer)"
}
"*+*RW-" {
puts $outfile "RW: $expect_out(buffer)"
}
}
}
}
close $outfile
=20
(Caller)
......=20
set oid " .iso.org.dod.internet.mgmt.mib-2.system.sysDescr.0"
expect_translateCmd $oid
.....
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D
=20
I never get the tree view and always get the message:
=20
"
No log handling enabled - turning on stderr logging

..iso.org.dod.internet.mgmt.mib-2.system.sysDescr.0 : (0 )=20
"
=20
The only difference is instead of specifying the actual oid, $oid is
use in spawn of the procedure.
=20
Thanks for the reply!!
=20
=20
Jim

------_=_NextPart_001_01C6FE1A.AF8808C5
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable



charset=3Dus-ascii">


size=3D2> 


size=3D2>Hi, class=3D778375600-02112006>   =
(PLS instruct=20
me to become a =
member) 

class=3D157104022-31102006> 

I =
downloaded and=20
installed the net-snmp-5.4.0.pre4-1.win32.exe on WinXP. I tried to call=20
snmptranslate from TCL and

use =
EXpect (5.21 for=20
Window) to get the output as follow:

class=3D157104022-31102006> 

class=3D157104022-31102006>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

class=3D157104022-31102006>   =20
set outfile [open "translate.out" w+]

class=3D157104022-31102006>   =20
spawn snmptranslate -m ALL -Tp -OS=20
..iso.org.dod.internet.mgmt.mib-2.system.sysLocation.0
  &nbs=
p; =20
while (1) {
         expect=20
{
           &n=
bsp;    =20
eof=20
{
           &n=
bsp;         =20
break;
          &nb=
sp;         =20
}
           &n=
bsp;    =20
"*+*R--"=20
{
           &n=
bsp;          =20
puts $outfile "R:=20
$expect_out(buffer)"
        &=
nbsp;           &n=
bsp;=20
}
           &n=
bsp;    =20
"*+*RW-"=20
{
           &n=
bsp;          =20
puts $outfile "RW:=20
$expect_out(buffer)"
        &=
nbsp;           =20
}
           &n=
bsp;   =20
}
     }
}
   close=20
$outfile

class=3D157104022-31102006>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

class=3D157104022-31102006> 

every =
thing looks=20
fine! I got the tree view of the OID

class=3D157104022-31102006> 

But... =
when I turn=20
it into procedure as:

class=3D157104022-31102006> 

class=3D157104022-31102006>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D

proc=20
expect_translateCmd {oid} {
 set outfile [open "translate-1.out" =

w+]

spawn =
snmptranslate=20
-m ALL -Tp=20
-OS $oid     
     =
while=20
(1) {
         expect=20
{
           &n=
bsp;    =20
eof=20
{
           &n=
bsp;         =20
break;
          &nb=
sp;         =20
}
           &n=
bsp;    =20
"*+*R--"=20
{
           &n=
bsp;          =20
puts $outfile "R:=20
$expect_out(buffer)"
        &=
nbsp;           &n=
bsp;=20
}
           &n=
bsp;    =20
"*+*RW-"=20
{
           &n=
bsp;          =20
puts $outfile "RW:=20
$expect_out(buffer)"
        &=
nbsp;           =20
}
           &n=
bsp;   =20
}
     }
}

close=20
$outfile

class=3D157104022-31102006> 

class=3D157104022-31102006>(Caller)

size=3D2>..... class=3D778375600-02112006> color=3D#0000ff> 

size=3D2> class=3D778375600-02112006>set oid =
"
  class=3D157104022-31102006> size=3D2>.iso.org.dod.internet.mgmt.mib-2.system.sysDescr.0"
>

class=3D157104022-31102006>expect_translateCmd=20
$oid

class=3D157104022-31102006>....

class=3D157104022-31102006>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3 D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D

class=3D157104022-31102006> 

I =
never get the tree=20
view and always get the message:

class=3D157104022-31102006> 

size=3D2> class=3D778375600-02112006> color=3D#0000ff> "

size=3D2> class=3D778375600-02112006> No log handling enabled - =
turning on=20
stderr logging

size=3D2>.iso.org.dod.internet.mgmt.mib-2.system.sysDescr.0 :  (0 =
) class=3D778375600-02112006> color=3D#0000ff> 

size=3D2> class=3D778375600-02112006>"

size=3D2> class=3D778375600-02112006> 

size=3D2> class=3D778375600-02112006> The only =
difference is=20
instead of specifying the actual oid, $oid is use in spawn of the=20
procedure.

class=3D157104022-31102006> 

Thanks =
for the=20
reply!!

class=3D157104022-31102006> 

class=3D157104022-31102006> 

class=3D157104022-31102006>Jim


------_=_NextPart_001_01C6FE1A.AF8808C5--


--===============1957701946==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=...057&dat=121642
--===============1957701946==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
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/...net-snmp-users

--===============1957701946==--