TelnetSend

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
ainterne
Junior Coder
Posts: 29
Joined: Tue Jun 05, 2007 4:03 am

TelnetSend

Post by ainterne » Tue Jun 26, 2007 6:57 pm

Hi can someone help me please:

I run the following, but when I get to trying to run the remote script nothing gets sent.... I have tried . ./ and ./ etc.....but the command is never run. The log file shows the command being sent.

Is there something obvious I am missing here?

Thanks in advance for any assistance......

TelnetConnect>eccdns.ecc.xxxx.com,23,hTN
wait>2
TelnetWaitFor>hTN,login:,5,r
TelnetSend>hTN,plewis12%CR%
TelnetWaitFor>hTN,Password:,5,r
TelnetSend>hTN,xxxxxxx%CR%
TelnetWaitFor>hTN,/u/plewis12$,5,r
TelnetSend>hTN,sesu%CR%
TelnetWaitFor>hTN,Please enter your password:,5,r
TelnetSend>hTN,xxxxxxx%CR%
TelnetWaitFor>hTN,/u/plewis12$,5,r
TelnetSend>hTN,/u/plewis12/getdhcpstats.sh%CR% ***THIS FAILS.***
TelnetWaitFor>hTN,/u/plewis12$,5,r
MessageModal>TELNET_SESSIONLOG
TelnetClose>hTN
Phil.......

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Jun 28, 2007 6:24 am

This issue was resolved by increasing the timeout. The code above specifies a 5 millisecond timeout. If the telnet command takes longer than 5 ms to complete the command will time out. ainterne increased the timeout to 100ms and the script completed successfully.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

sunole
Newbie
Posts: 14
Joined: Wed Aug 29, 2007 6:28 pm

telnet wait for sec or msec??

Post by sunole » Wed Sep 05, 2007 10:39 pm

is this true that the timeout is in ms?? the documentation says the timeout is in seconds, and it looks to me that it is in seconds too, but i am not sure. please let me know, thanks

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Sep 06, 2007 7:03 am

Sorry, you are correct, the timeout is in seconds. I guess ainterne must have had quite a slow telnet connection, or the command that was being executed took longer than 5 seconds to complete.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts