[Top][All Lists]

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

Re: Testing firewall ports with parallel

From: Ole Tange
Subject: Re: Testing firewall ports with parallel
Date: Sat, 20 Jan 2018 05:51:28 +0100

On Thu, Jan 18, 2018 at 6:55 PM, Divan Santana <address@hidden> wrote:

> Like a lot of GNU software parallel is awesome.


> How can I achieve the below equivalent in a better way?
>       []='443 32137'

It seems you can run:

  nc -w 2 -vz 443 32137

So if you do not need to parallelize on the ports then doing this
should be fine:

mylist.txt: 443 32137 443


cat mylist.txt | parallel --slf run_on_servers.txt --onall eval nc -w 2 -vz

The 'eval' is needed because GNU Parallel quotes arguments, so they
are seen as a single argument even if they contain spaces. This is
typically what you want if you pass it filenames with spaces or
similar. However, today we really want the spaces in the input value
split the input. 'eval' de-quotes one level.

> Also, ideally I could use parallel to do the above test in parallel on
> multiple hosts.

The above should run all the test on all servers.


reply via email to

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