Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

To Shell or To Perl, that is the question

by tradez (Pilgrim)
on Mar 05, 2002 at 19:51 UTC ( #149482=perlquestion: print w/replies, xml ) Need Help??
tradez has asked for the wisdom of the Perl Monks concerning the following question:

Fellow Monks, I come to you with a question over a few things. First of course is perl versus another solution (basic shell) and the next is over libpcap and tcpdump. I currently have a script (shell) that looks something like this snidbit:
#!/bin/sh # # # Sector au-135 cd /tmp/tcptrace FILENAME=au135-`date +%Y%m%d%H%M%S`.tcpdump /usr/sbin/tcpdump -n -c 30000 -w /tmp/tcptrace/$FILENAME -i eth1 host +`/usr/local/bin/which-hosts au-135 50|/usr/local/bin/`& MYJOB=$! sleep 60 sync kill $MYJOB /usr/local/bin/tcptrace-munch $FILENAME rm /tmp/tcptrace/$FILENAME
Basically I am going to be going back to tcpdump to dump data for a certain "sector" of users on a broadband network. With shell, I am using sleep, and doing these all at once. I am planning on updating to perl with systems calls and forking off multiple tcpdump sessions at once, but I wanted to ask if anyone had done something like this before. Will tcpdump run multiple sessions? What type of load are we talking if somewhere around 15 sessions are running? What type of degredation of integrity/is there any that I can expect from the data recieved through tcpdump? Thanks ahead of time for any help you can spare.

"Never underestimate the predicability of stupidity"
- Bullet Tooth Tony, Snatch (2001)

Replies are listed 'Best First'.
Re: To Shell or To Perl, that is the question
by C-Keen (Monk) on Mar 05, 2002 at 20:16 UTC
    I doubt that running tcpdump "parallel" would give you an improvement since your hardware has to deliver the packets and is therefore the bottleneck in your setup. Would be different if you had mutliple networking hardware...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://149482]
Approved by root
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2018-05-25 00:30 GMT
Find Nodes?
    Voting Booth?