parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Testing timeout of httpd by nc command with parallel


From: Ole Tange
Subject: Re: Testing timeout of httpd by nc command with parallel
Date: Mon, 24 Oct 2011 16:58:40 +0200

On Thu, Oct 20, 2011 at 11:36 AM, Keigo Tanaka <keigo.tanaka@gmail.com> wrote:
> Hi,
>
> I am testing the timeout values of multiple web servers.
>
> Here, the basic way to test one web server is like this:
> $ date; nc 192.168.0.2 80; date;
> Thu Oct 20 07:34:00 UTC 2011
> Thu Oct 20 07:35:20 UTC 2011
>
> * In this case, the timeout value is 80 seconds.
>
> I've changed this test into traditinal way of shell script, and of course it
> works well.(But long waiting time.)
>
> for i in 192.168.0.2 192.168.0.3 192.168.0.4
> do
>  echo $i ; date; nc $i 80; date;
> done
>
> Next, I tried following but it does not work properly.
> $ parallel -j 10000% "echo {}; date; nc {} 80; date;" ::: 192.168.0.2
> 192.168.0.3 192.168.0.4

Maybe nc wants to have the terminal? As default the first argument get
stdin (standard input), but you can try:

cat hostlist | parallel --tag -j0 "/usr/bin/time -f %e nc {} 80 </dev/tty"


/Ole



reply via email to

[Prev in Thread] Current Thread [Next in Thread]