Hi All,
Please help me with this little problem I have, as it is bothring be a lot.
I have writte an ext script which logs into a FTP server does a dir command and then excits. All FTP commands are specified in a input file and the output is saved in a temp file used for the status message to Hobbit.
Henrik kindly advised me to use a bbhostgrep to search the FTP server details from the bb-hosts file and this works as expected. In order to speed up the testing I have created a "subscript" which I call with som paramaters from the "master script" and this way have some parrallel run of the test. Its like this:
$BBHOME/ext/ftp-test.sh $HOST $USER $PASSWD &
This also works fine.
The problem starts when a FTP connection fails or is slow. Then my subscript is not terminated and the master script hangs. This in turn leads to purple alarms for all hosts. I have tried to implement in my master script a check using ps for a previously running subscribt for the individual hosts, but this is not work as expected.
So my question is how can I have my "sub script" really fork from the master script ? I do not need it to return to the master script because the subscript sends the status to Hobbit.
Any help is greatly appreciated.
Regards, Thomas
Hi Thomas,
So my question is how can I have my "sub script" really fork from the master script ? I do not need it to return to the master script because the subscript sends the status to Hobbit.
Try something like expect: http://expect.nist.gov/
Regards, Dirk
On Fri, Oct 21, 2005 at 09:02:52AM +0200, Thomas wrote:
The problem starts when a FTP connection fails or is slow. Then my subscript is not terminated and the master script hangs. This in turn leads to purple alarms for all hosts.
Use "ncftpls" from the ncftp toolkit. "ncftpls -t 10 ftp://ftp.foo.com/" will timeout after 10 seconds.
Henrik
participants (3)
-
Dirk.Kastens@uni-osnabrueck.de
-
henrik@hswn.dk
-
tlp-hobbit@holme-pedersen.dk