Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Feb 2001 16:51:24 -0800
From:      "Crist J. Clark" <cjclark@reflexnet.net>
To:        Cliff Sarginson <cliff@raggedclown.net>
Cc:        Peter Pentchev <roam@orbitel.bg>, Artem Koutchine <matrix@ipform.ru>, questions@FreeBSD.ORG, security@FreeBSD.ORG
Subject:   Re: Efficiency [Was: Re: rpc.statd attack]
Message-ID:  <20010217165124.C62368@rfx-216-196-73-168.users.reflex>
In-Reply-To: <E14TmQC-0006Ip-00@post.mail.nl.demon.net>; from cliff@raggedclown.net on Fri, Feb 16, 2001 at 03:03:44PM %2B0000
References:  <E14TmQC-0006Ip-00@post.mail.nl.demon.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 16, 2001 at 03:03:44PM +0000, Cliff Sarginson wrote:

[snip]

> As you can see makes all the difference :)
> But this is under Solaris ...
>  
> $ time rpcinfo -p | egrep -e 'udp.*status$' | awk '{print $4}'
> 32790
> 
> real    0m0.12s
> user    0m0.04s
> sys     0m0.07s
>   
> $ time rpcinfo -p | awk '($3 == "udp") && ($5 == "status") {print $4 }'
> 32790
> 
> real    0m0.11s
> user    0m0.05s
> sys     0m0.04s

Shocking. rpcinfo takes the same amount of time to run in both
examples. You are not incuding the awk's and grep's in your
measurements.

ITYM,

  $ rpcinfo -p | time  egrep -e 'udp.*status$' | time awk '{print $4}'
  996
          0.05 real         0.00 user         0.00 sys
          0.04 real         0.00 user         0.00 sys

  $ rpcinfo -p | time awk '($3 == "udp") && ($5 == "status") {print $4 }'
  996
          0.03 real         0.00 user         0.00 sys

-- 
Crist J. Clark                           cjclark@alum.mit.edu


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010217165124.C62368>