Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^5: Autoflush fails

by Anonymous Monk
on May 31, 2012 at 05:31 UTC ( #973429=note: print w/replies, xml ) Need Help??


in reply to Re^4: Autoflush fails
in thread Autoflush fails

However, the results are buffered if I pipe it to "perl -pe 1"

You'll find they're probably buffered if you pipe to anything ( even cat )

So the solution is to ddg://tcpdump buffered and find tcpdump: Re: pipeline buffering which says

if you don't specify -w, -U means "flush the standard output after the information for each packet is printed"

So there you have it, install sufficiently modern version of tcpdump that comes with -U option that flushes more often

FYI there also exists pcapdump, Net::Pcap::Easy... Tutorials: Network Programming: Perl and Net::Pcap

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://973429]
help
Chatterbox?
[choroba]: We say "Eat breakfest alone, eat lunch with a friend, give dinner to an enemy"
[choroba]: But you know who's your greatest enemy, right? *wink*
[Discipulus]: so also the dinner alone?
[choroba]: touché
[Discipulus]: first!! drinking is my best fu

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2017-10-19 11:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (252 votes). Check out past polls.

    Notices?