On Tue, May 06, 2008 at 10:45:23AM +0200, Penguin Lover Etaoin Shrdlu squawked: > On Tuesday 6 May 2008, 10:39, Neil Bothwick wrote: > > On Tue, 6 May 2008 10:11:07 +0200, Etaoin Shrdlu wrote: > > > cat /proc/cpuinfo|grep '^cpu MHz'|awk '{print $4"/30 +";}' > > > > This uses three commands when one will do, there's no need for cat or > > grep > > > > awk '/^cpu MHz/ {print $4"/30 +";}' /proc/cpuinfo > > > > Similarly for the free command. > > Ah sure. I just wanted to explain what the commands do, and didn't even > try to make corrections. > > > Longer isn't always better ;-) > > But it produces better obfuscated code! :-)
Yay! Free bug-fixing! I love this list. Actually, I have that script sitting on my computer since some time in 2002. I didn't write it: it was written by a friend of mine and posted to the college unix users group mailing list, with comments as to what the proper scaling factors are all around. The scaling factors for the various components were chosen at that time because it seemed to be good, realistic numbers to compare performances of then-current desktop boxes. At least *we* felt it works better than bogomips. As to the part of looking at used memory instead of total memory: I don't remember it doing that, I have to go back to check. The double counting of scsi disks is a bug, mostly because this script was written before UDEV when it wasn't an issue. Lastly: this is just some good, not-too-clean locker-room-style fun. Don't take it too seriously! Regards, W -- In this course we will of course make use of God's Units, namely h-bar = c = 1 but occasionally I will indulge myself in my personal addition to those units, in the form of 2 = -1 = pi = i = 1 please feel free to interject whenever you feel confused, and I will make my best effort to clarify things. ~Prof. Herman Verlinde explaining the things. PHY 509, Intro to QFT, first lecture 09-12-03 Sortir en Pantoufles: up 515 days, 11:57 -- gentoo-user@lists.gentoo.org mailing list