Register
It is currently Mon Sep 01, 2014 1:39 am

command (process) hangs when called from script?


All times are UTC - 6 hours


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Tue Aug 13, 2013 2:07 am   

Joined: Tue Aug 13, 2013 1:52 am
Posts: 1
Hi!
Run into a problem with my script so I need some help :)
Anyway I wrote a script that reads ip addresses and host name from file and checks all hosts, one by one, with "iperf" command. It all works fine until one of the hosts is temporarily unreachable. If I do it from command line:

Code:
iperf -c 10.210.7.1 -r -y c

I get ...
Code:
connect failed: Connection timed out

and it exits..

But in script
Code:
#!/bin/bash
/usr/bin/iperf -c 10.210.7.1 -r -y c

I get "connect failed: Connection timed out" bit it hangs, it continues when killed with "ctrl+c" or from another session for example. Whole script is larger offcourse, but problem comes down to this part :(

If someone had similar problem I would appreciate some help...

Thx!


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 10 guests


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 post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP