Ethereal-users: Re: [Ethereal-users] tethereal eats my memory

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Bob DeBolt <bob.debolt@xxxxxxxxxxxxxx>
Date: Tue, 16 Aug 2005 05:51:06 -0600
On Tuesday 16 August 2005 03:52, Stefan Sabolowitsch wrote:


You may want to use the "files and duration" switches.

Here is a script I use based on the use of tcpdump, it should be easily 
adaptable to tethereal. I run this on a cron timer based on how much data the 
network moves. Busy network = shorter rotation periods. I have used tcpdump 
and this script for years without an issue.

#!/bin/sh
BACK=/var/log/mail/src-`date '+%m-%d-%H-%M'`
DUMP=/var/log/src-all.cap
PIDFILE=/var/log/tcpdump.pid

if [ -f $DUMP ]; then
  mv $DUMP $DUMP.prev
fi

nohup tcpdump -ni rl1 -s 1514 -w $DUMP &

PIDNEW=$!

kill `cat $PIDFILE`

echo $PIDNEW > $PIDFILE

if [ -f $DUMP.prev ]; then
  mv $DUMP.prev $BACK
  gzip $BACK
fi
~