How far can your computer run?

Status
Not open for further replies.

Jayce

Fully Optimized
Messages
3,056
Location
/home/jason
Taking this from the UbuntuForums. I thought it was kind of interesting. By issuing this command:

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/\(.$\)/.\1 miles/'

It will tell you how long your computer can run (if it had legs, of course) before it would die.

My result - 387.0 miles.

Some guys on the other forums ran this test on Ubuntu servers as well. The numbers were pretty darn high on those beasts.
 
What does it do to tell you how far it can run?

Yeah - it's nothing that's worth bragging to your friends I guess. I assume it just analyzes your available processor load, memory, hardware, etc and sees what it would take to fully bench it before a system failure, and somehow ends up barfing out a number readable in miles. I base this assumption on the fact I ran that command twice, and the 2nd time it dropped by almost 85 miles because I had more applications open at the time.
 
does that command work in windows, anyone?

No, it won't work on Windows. My buddy tried it on his Mac (which would by nature have a higher chance to run a Linux command than Windows would) but it errored out. However, the funny thing is despite it erroring out, it still gave him an answer. His answer was 7 miles.

Despite the error, I'm sure the answer was relatively accurate. :p
 
Moved my small server from centOS to openSUSE today. Ran the test: less than 38.2 miles. Ouch.
2500.228/30 + 2500.228/30 + 89568/1024/3+ 1767.55/15+70
but I think I found a "bug"
EDIT:
Code:
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|md)"){ s+= $2} s+= $2;} END {print s/1024/50"/15+70";}'`|bc|sed 's/\(.$\)/.\1 miles/'
You'll need that "md" in there if you use software RAID, brought my score up to 45 miles.
 
Status
Not open for further replies.
Back
Top Bottom