SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
telnet

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
telnet
Author Message
Y.S. Manjula



Joined: 05 Apr 2005
Posts: 2

Post telnet Reply with quote

I am using 24x7 Scheduler Ver. 3.4.24 (not registered)
I need to login a server in my network using TELNET and have to give some commands (eg: ls -ltr, sqlplus).
I used "Telnet Automation" Job under "FTP, Web, & Telnet Examples" 24x7 Scheduler provided.
I edited it's script and enter my server IP, User name and password.
I can login to that server using this job, but cannot enter commands.
I edited that job as follows,
Dim( sFileList, string )

TelnetConfig( "terminal", "show" )
TelnetOpen( "10.40.25.110", "aaa", "aaaaa" )
TelnetSend( "ls -ltr" )
TelnetReceive( sFileList )
TelnetClose( )

MessageBox( sFileList )
While running this job I received a error message as follows,
Ls -ltr
Type Is -ltr unknown
TERM=(unknown)
Continue?
How can I enter this command?

Tue Apr 05, 2005 12:12 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7974

Post Re: telnet Reply with quote

1. after TelnetOpen try adding Wait( 5 ) to allow your Telnet server session to initialize completely.
2. If that along is not enough tell your Telnet server explicitly that you want to emulate vt100 terminal
TelnetSend("set term=vt100")

3. To find out your default terminal settings login using regular command line Telnet client and then after login run
printenv | grep TERM

or if that doesn't work then
set | grep term

4. Let us know what you get there

: I am using 24x7 Scheduler Ver. 3.4.24 (not registered)
: I need to login a server in my network using TELNET and have to give some
: commands (eg: ls -ltr, sqlplus).
: I used "Telnet Automation" Job under "FTP, Web, & Telnet
: Examples" 24x7 Scheduler provided.
: I edited it's script and enter my server IP, User name and password.
: I can login to that server using this job, but cannot enter commands.
: I edited that job as follows,
: Dim( sFileList, string )

: TelnetConfig( "terminal", "show" )
: TelnetOpen( "10.40.25.110", "aaa", "aaaaa" )
: TelnetSend( "ls -ltr" )
: TelnetReceive( sFileList )
: TelnetClose( )

: MessageBox( sFileList )
: While running this job I received a error message as follows,
: Ls -ltr
: Type Is -ltr unknown
: TERM=(unknown)
: Continue?
: How can I enter this command?

Tue Apr 05, 2005 1:22 am View user's profile Send private message
Y.S. Manjula



Joined: 05 Apr 2005
Posts: 2

Post Re: telnet Reply with quote

1. First I tried adding Wait ( 5 ), but it not worked.
2. After that I found default terminal settings using your command "printenv | grep TERM" result is "TERM=ansi"
3. After that I nchanged my script like this

Dim( sFileList, string )

TelnetConfig( "terminal", "show" )

TelnetOpen( "10.40.25.11", "marc", "marc001" )

Wait( 5 )

TelnetSend("set term=vt100")

TelnetSend( "ls -ltr" )

TelnetReceive( sFileList )

TelnetClose( )

MessageBox( sFileList )
4. But it not worked. I received error Message like this

set term=vt100

Type set term=vt100 unknown

TERM=(unknown) ls -ltr

Type ls -ltr unknown

TERM=(unknown)

Continue?

: 1. after TelnetOpen try adding Wait( 5 ) to allow your Telnet server session
: to initialize completely.
: 2. If that along is not enough tell your Telnet server explicitly that you
: want to emulate vt100 terminal
: TelnetSend("set term=vt100")

: 3. To find out your default terminal settings login using regular command
: line Telnet client and then after login run
: printenv | grep TERM

: or if that doesn't work then
: set | grep term

: 4. Let us know what you get there

Tue Apr 05, 2005 11:20 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7974

Post Re: telnet Reply with quote

if your regular Telnet prompt includes a $ (e.g. marc$) type
export TERM=vt100

If it is a % prompt, you are probably using the C shell and need to type
setenv TERM vt100

This will change your terminal type for the duration of the current job session. To alter it within your start-up file, so that it applies to every session:

from the $ prompt type
pico .bash_profile

or from the % prompt type
pico .login

use the arrow keys to go to the part that includes the comment
# Sort out the terminal.
and overtype 'unknown' with vt100 (no quotes)

press the ctrl key and type x to exit pico
when prompted for the filename press return

: 1. First I tried adding Wait ( 5 ), but it not worked.
: 2. After that I found default terminal settings using your command
: "printenv | grep TERM" result is "TERM=ansi"
: 3. After that I nchanged my script like this

: Dim( sFileList, string )

: TelnetConfig( "terminal", "show" )

: TelnetOpen( "10.40.25.11", "marc", "marc001" )

: Wait( 5 )

: TelnetSend("set term=vt100")

: TelnetSend( "ls -ltr" )

: TelnetReceive( sFileList )

: TelnetClose( )

: MessageBox( sFileList )
: 4. But it not worked. I received error Message like this

: set term=vt100

: Type set term=vt100 unknown

: TERM=(unknown) ls -ltr

: Type ls -ltr unknown

: TERM=(unknown)

: Continue?

Tue Apr 05, 2005 11:52 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.