|
|
#1 (permalink) |
|
Senior Member
Super #1
Joined in Nov 2003
Lives in New Hampshire
1,254 posts
Gave thanks: 3
Thanked 27 times
|
Server Load Fun
So I decided to make my own server load image, and I started to wonder, why do we use this arbitrary number? According to the script Kayla released, the number is out of 20. Why do we use this numer that's otherwise arbitrary instead of using a percentage? Percentages are eaiser to use I'd say.
But then I noticed something. Math is wrong in the code released by Kayla. It assumes that the maximum server load could be 20, but then it generates the graph out of 28. Even worse, if the scale was 28, it's limited to 20, so the graph can never be more than 71% full. So basically everybody's server load button is wrong. Oh and also if it is out of 20, my button is correct - and better, it uses a percentage. YAY. Anybody want in? PHP Code:
Last edited by FredFredrickson; September 6th, 2007 at 7:33 PM.. Reason: I'm good at math |
|
|
|
|
|
#2 (permalink) |
|
minor deity
Super #1
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,387 posts
Gave thanks: 28
Thanked 94 times
|
How are you determining the percentage and it's accuracy?
__________________
Proud to be a Surmunity Mod! XEON Make a fundamental difference! My Sites: Curious about Brewing Beer? Join the community! >>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax Get into an Art museum Victorian London It's your brain -ON WEB - mybrainhost.com (under development) What SHOULD Government do? Much Less than it Does! |
|
|
|
|
|
#3 (permalink) |
|
He shoots.. He scores!
Super #1
Joined in Feb 2007
Lives in A room with no windows.
Hosted on SH110
1,448 posts
Gave thanks: 46
Thanked 140 times
|
Here goes...
He assumes, $maximumserverload = 20 and Then he gets the avg server load $fp = fopen("/proc/loadavg", "r");Then divides average over max $loadperc = round(($loadav / $maximumserverload) * 100, 2); He's got some fancy other code in there, but thats the gist of it. I assume accuracy would depend on (1) do you believe 20 is the max (2) do you believe /proc/loadavg
__________________
SH110
|
|
|
|
|
|
#4 (permalink) |
|
Senior Member
Super #1
Joined in Nov 2003
Lives in New Hampshire
1,254 posts
Gave thanks: 3
Thanked 27 times
|
According to the script, the max server load is 20, so we have a scale. However, the script used two different scales. but tried to show them on the same graph. Not sure which was right, if either. I'm assuming that the server load has a max.. ??
|
|
|
|
|
|
#5 (permalink) | |
|
Surpass Abuse Admin
Super #1
Joined in Mar 2005
Lives in Houston, TX
Hosted on NONE
7,797 posts
Gave thanks: 11
Thanked 278 times
|
Quote:
![]()
__________________
Unofficial IRC Channel: #surpass EFNetUnofficial = No official support. Support requests can be submitted to our helpdesk. |
|
|
|
|
|
|
#8 (permalink) |
|
Surpass Abuse Admin
Super #1
Joined in Mar 2005
Lives in Houston, TX
Hosted on NONE
7,797 posts
Gave thanks: 11
Thanked 278 times
|
It has a Domo Kun in it! I'm sorry FredFredrickson, but caseylee wins...
__________________
Unofficial IRC Channel: #surpass EFNetUnofficial = No official support. Support requests can be submitted to our helpdesk. |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|