Networking Forums

Networking Forums > Computer Networking > Linux Networking > tcpump/tethereal scripts to capture and archive data

Reply
Thread Tools Display Modes

tcpump/tethereal scripts to capture and archive data

 
 
guser@packetstorm.org
Guest
Posts: n/a

 
      08-07-2006, 05:11 PM
Anyone have some automated scripts that will start a tcpdump/tethereal
process, capture the data and rotate the data in a manner so that the
filesystem does not fill up (ie some kind of circular queueing?).

I know tethereal can do this but in the event of a power outage causing
the system to reboot (or scheduled patch maintenance), tethereal "loses
it's place". So something like

tethereal -s 65535 -i eth1 -n -q -t a -w /captures -b filesize:50000 -b
files:900 -f " ... "

Works great as the filesize and number of files have been calculated
for the amount of disk storage.

But throw in a reboot or if the tethereal process dies then there is no
way for tethereal to know where it left off and I have to offload that
older data somewhere, purge the directory and restart the command. If I
do not, then the filesystem fills the rest of the way up.

thanks,

 
Reply With Quote
 
 
 
 
ed
Guest
Posts: n/a

 
      08-07-2006, 07:52 PM
On 7 Aug 2006 10:11:48 -0700
(E-Mail Removed) wrote:

> Anyone have some automated scripts that will start a tcpdump/tethereal
> process, capture the data and rotate the data in a manner so that the
> filesystem does not fill up (ie some kind of circular queueing?).


find . -mtime +1 -exec rm -rf {} ';'

to remove everything over a day old?

you could put that in a while loop, until there is more than N% of disk
available, but I suggest you just calculate your daily traffic and
adjust to suit.

--
Regards, Ed :: http://www.linuxwarez.co.uk
just another bash hacker
Chuck Norris once had a head on collision with the sun. Luckily, the
sun is so far away that the shift of its position had no effect on
Earth.
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to capture tcpdump data to simulate connections from multiple IPs? draghuram@gmail.com Linux Networking 3 06-24-2006 01:38 AM
Capture network traffic, without the data component of TCP packets. Nick Windows Networking 2 03-19-2005 09:14 PM
Data capture capability for MN-500 Al Broadband Hardware 1 11-16-2004 06:21 AM
how to capture raw data from socket Christian Bongiorno Linux Networking 1 10-30-2004 08:38 PM
Network cable to capture data.. BWGames Linux Networking 2 04-30-2004 08:31 AM



1 2 3 4 5 6 7 8 9 10 11