Ethereal-dev: Re: [Ethereal-dev] question about Realization the capture at each two hours
On Wed, Jun 16, 2004 at 09:52:57AM +0800, Li Haijiang wrote:
> thanks for you reply.I am sorry for my poor english.
> I know the capture options have the function of "Multiple file" that can realize
> the new capture file every 2 hours.I think ,Starting new capture file is different
> from starting capture.Is it that? I want to start capture at a specific point in
> time(for example,6:00),and then stop capture after 15 minutes.and start next
> capture at 7:00 automatically.after 15 minutes,start next capture at 8:00
> automatically.
> It is what i try to do.can you give me some suggestion for my opinion?
> Thanks.
I would set up a cron job to run tethereal when you wish to start the capture,
and pass a ``-a'' indicating your desired duration. For example, this crontab
entry will run begin a capture every 6:00 AM and store packets to /tmp/capture
for fifteen minutes:
0 6 * * * tethereal -a duration:900 -w /tmp/capture
See crontab(5) and tethereal(1) for available customizations on the crontab
entry and tethereal invocation, respectively. Use ethereal to open and analyze
the capture file after the fact.