
Code: Select all
$ cat geeklength
#!/bin/sh
echo `uptime|grep days|sed 's/.*up \([0-9]*\) day.*/\1\/10+/'; cat /proc/cpuinfo|grep '^cpu MHz'|awk '{print $4"/30 +";}';free|grep '^Mem'|awk '{print $3"/1024/3+"}'; df -P -k -x nfs -x smbfs | grep -v '(1k|1024)-blocks' | awk '{if ($1 ~ "/dev/(scsi|sd)"){ s+= $2} s+= $2;} END {print s/1024/50"/15+70";}'`|bc|sed 's/\(.$\)/.\1cm/'

As you posted this script can you confim that longer is better? I think its that way around....meowsqueak wrote:Reminds me of this script which integrates uptime with a few other things:
Don't worry - it doesn't do any harm - it returns a length in centimetres which you can use to, errrr, compare with other people...
My four machines score 79.5, 38.8, 36.7 and 22.7cm - fairly low I'm guessing. What do other people get?

Code: Select all
20/10+ 1539.918/30 + 510596/1024/3+ 1526.18/15+70Code: Select all
uptime|grep days|sed 's/.*up \([0-9]*\) day.*/\1\/10+/'Code: Select all
cat /proc/cpuinfo|grep '^cpu MHz'|awk '{print $4"/30 +";}'Code: Select all
free|grep '^Mem'|awk '{print $3"/1024/3+"}'Code: Select all
df -P -k -x nfs -x smbfs | grep -v '(1k|1024)-blocks' | awk '{if ($1 ~ "/dev/(scsi|sd)"){ s+= $2} s+= $2;} END {print s/1024/50"/15+70";}'

