parallel
[Top][All Lists]
Advanced

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

Re: Sflow input stream and parallel


From: Ole Tange
Subject: Re: Sflow input stream and parallel
Date: Fri, 15 Jul 2016 19:35:45 +0200

On Thu, Jul 7, 2016 at 2:33 PM, Łukasz Matys <lukasz@e-matys.com> wrote:
> Hello.
> I use an sflowtool to collect sflow data like below, and next grep some 
> things for example:
>
> # cat aaa.txt
> 8.8.8.8
> 8.8.4.4
> #
>
> # sflowtool -p 6000 -l +v 250 | grep -f aaa.txt
> FLOW,10.10.10.10,1030,1024,f6b52f7a0ccd,000c3116381b,0x0800,250,0,8.8.8.8,91.232.38.10,17,0x00,52,53,1188,0x10,192,170,16384
> FLOW,10.10.10.10,1025,1030,003088117faa,f6b52f7a0ccd,0x0800,250,0,109.196.0.2,8.8.8.8,17,0x00,59,7366,53,0x00,101,79,16384
> FLOW,10.10.10.10,1027,1030,d4ca6d78364d,f6b52f7a0ccd,0x0800,250,0,88.199.95.5,8.8.4.4,17,0x00,62,3557,53,0x10,87,65,16384
> FLOW,10.10.10.10,1003,1031,dc38e111a008,f6b52f7a0ccd,0x0800,250,0,82.160.41.112,8.8.4.4,1,0x00,122,3,3,0x10,136,114,16384
> FLOW,10.10.10.10,1002,1031,10f3112ff3e5,f6b52f7a0ccd,0x0800,250,0,46.77.91.27,8.8.8.8,1,0x00,59,3,1,0x10,249,227,16384
> FLOW,10.10.10.10,1017,1031,001d7173f780,f6b52f7a0ccd,0x0800,250,0,185.23.21.52,8.8.4.4,17,0x00,61,9911,53,0x00,114,92,16384
> ^C

How much data is produced?

>
> I have read all documentation and can not achieve the same result using 
> 'parallel'.
>
> # /usr/local/sflowtool/bin/sflowtool -p 6000 -l +v 250 | parallel --pipe grep 
> -f aaa.txt

--pipe defaults to 1 MB blocks, so if sflowtool produces less that 1
MB per core, you will not see any output before sflowtool stops.

> No output data ;-(.
> Any ideas?

/usr/local/sflowtool/bin/sflowtool -p 6000 -l +v 250 | head -n 1000 |
parallel --pipe grep -f aaa.txt
/usr/local/sflowtool/bin/sflowtool -p 6000 -l +v 250 | parallel -u
--pipe grep -f aaa.txt
/usr/local/sflowtool/bin/sflowtool -p 6000 -l +v 250 | parallel
--block 200 --pipe grep -f aaa.txt


/Ole



reply via email to

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