[CentOS] sendmail and rbl blocking - generating statistics
William L. Maltby
CentOS4Bill at triad.rr.com
Sat Mar 17 19:53:10 UTC 2007
On Wed, 2007-03-14 at 22:35 +0000, Will McDonald wrote:
> On 14/03/07, John Summerfield <debian at herakles.homelinux.org> wrote:
> > Ryan Simpkins wrote:
> > >
> > > Am I using time right to measure it?
> > No, you're timing the cat only.
Correct.
>
> I don't think that's the case, you know. If I run the following:
>
> [wmcdonald at stella ~]$ ls -lh /tmp/messages.1
> -rw-r--r-- 1 root root 4.3M Mar 14 20:03 /tmp/messages.1
> [wmcdonald at stella ~]$ time cat /tmp/messages.1 1> /dev/null
>
> real 0m0.018s
> user 0m0.001s
> sys 0m0.017s
>
> [wmcdonald at stella ~]$ time cat /tmp/messages.1 | grep '*.foo' 1> /dev/null
>
> real 0m0.047s
> user 0m0.021s
> sys 0m0.026s
>
> Running both commands repeatedly shows similar time differences, I
> think 'time''s timing the execution time of the whole command.
I'm unsure, but I think that's wrong?
Try time { cat /tmp/messages.1 | grep '*.foo' 1> /dev/null ; }
This avoids certain overheads and does the job OP really wants?
>
> Will.
> <snip sig stuff>
--
Bill
More information about the CentOS
mailing list