On Wed, Mar 19, 2003 at 11:25:57AM +1100, Ben Leslie wrote:
> On Wed, 19 Mar 2003, Steve Kowalik wrote:
>
> > At 10:52 am, Wednesday, March 19 2003, Jeff Waugh mumbled:
> > > Because whoever has the most bogomips at the end, wins.
> > >
> > Okay, I'll bite.
> >
> > [EMAIL PROTECTED]:~$ awk '/bogomips/ { SUM+=$3 } END {print SUM}' /proc/cpuinfo
> > 7982.27
> >
> > What do I win? A good kick in the pants?
>
> fwiw, that script (and i guess none of the others) work on my Linux (2.5.59):
>
> """
> [EMAIL PROTECTED]:~$ awk '/bogomips/ { SUM+=$3 } END {print SUM}' /proc/cpuinfo
>
> """
>
> However,
>
> """
> [EMAIL PROTECTED]:~$ awk '/BogoMIPS/ { SUM+=$3 } END {print SUM}' /proc/cpuinfo
> 3189.74
> """"
>
> I'm not sure if there is a case insensitive search in awk.
>
> (And while I don't win the BogoMIPS, how about:
>
> [EMAIL PROTECTED]:~$ grep MemTotal /proc/meminfo
> MemTotal: 16583232 kB
Looks like it's time to patch the kernel code for /proc/meminfo
to output something more readable, like 15 Gb.
And break everything which parses it :-)
--
Woody
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug