ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: Re: [Ethereal-dev] question about Realization the capture at each two hours

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

From: Noah Misch <noah@xxxxxxxxxxxxxx>
Date: Thu, 17 Jun 2004 16:34:06 -0700
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.