1834450 Members
1985 Online
110067 Solutions
New Discussion

Re: remsh timeouts

 
Mark Lucking
New Member

remsh timeouts

Hello,

Can anybody tell me how to check the timeout settings for a remsh and rexec call. I am trying to write a script that makes use of these utilities and wanted to learn a little more?
What are the default timeouts for remsh and rexec calls?
4 REPLIES 4
The Real MD
Valued Contributor

Re: remsh timeouts

Take a look at the following contributions these might help.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?admit=716493758+1079878470525+28353475&threadId=3589

Regards

Martin.
Sanjiv Sharma_1
Honored Contributor

Re: remsh timeouts

Hi Mark,

Please check this:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=23522

hth.
Everything is possible
Bill Hassell
Honored Contributor

Re: remsh timeouts

This is not going to be easy if your script is not interactive. remsh and rexec are designed to run a command on the remote system. If the command is sleep 999999 then the connection will never timeout--there is no separate timeout for the connection. Shells such as POSIX and ksh do have a timer but it only runs when the shell is waiting for input. In a remote connection, this gets complicated. The only choice on the local side is to start a background process on your local machine that checks for the remsh/rexec process and if it disappears, come to an end of job. If too much time occurs, have the background process kill the remsh/rexec process. NOTE: arbitrary killing of processes has the potential to create problems, and almost guarenteed to cause problems if you use kill -9.


Bill Hassell, sysadmin
Mark Grant
Honored Contributor

Re: remsh timeouts

I am not entirely sure if this is helpful but I am attaching a perl wrapper around "remsh" that I used a few years ago for giving remsh a timeout.

It has a 30 second timeout but you can change that easily in the script.
Never preceed any demonstration with anything more predictive than "watch this"