Ethereal-users: Re: [Ethereal-users] Cpu time

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Sun, 4 Nov 2001 14:13:35 -0800
On Sun, Nov 04, 2001 at 03:43:51PM +0200, Antonatos wrote:
> The time command will hold statistics for the graphical part of the
> ethereal as well and not only for the capture part (I think)

Yes, because the mechanism that "time" uses has no idea what the
application it's timing is doing, so it can't make a distinction between
the graphical and capture parts.

However, if you're doing a capture, the graphical part is consuming CPU
while you're capturing, as the counts of packets captured are updated on
the screen, so the fact that it holds those statistics for both is a
feature, not a bug.

The only problem with "time" is that it includes CPU time spent starting
Ethereal, doing the capture if you do a capture, reading in the capture
file, dissecting the packets in the capture file so as to generate the
summary lines for the packet list display, etc..

If you want something that captures only the CPU time spent capturing
packets, you will need to put code into Ethereal yourself, using the
"times()" call or the "getrusage()" call or something such as that, or
build a profiled version and turn profiling off at the beginning, turn
it on when capturing, and turn it off again when done (if your
OS/compiler/etc. support turning profiling on and off, e.g. with
"moncontrol()").