Folding@home Live Statistics Update

This forum contains information about 3rd party applications which may be of use to those who run the FAH client and one place where you might be able to get help when using one of those apps.

Moderator: Site Moderators

Folding@home Live Statistics Update

Postby Torque » Wed Aug 29, 2012 5:08 am

Umm you may want to go here viewforum.php?f=14 and talk to some of the other 3rd party stats devolipers Harlem, MtM, smoking2000 and UncleFungus. They can probably answer the questions you have since they have been working with F@H stats fro quite a while. Although I have not seen MtM around for a while.


I'm a new member and I want to ask for help refering to javascript coding. My aim is to create a counter, which displays the current Grand Score of my team at any time. I want to implement the code on websites to give all the users a greater overview of their current work and a cool experience of our contribution. I'm pretty sure, this is interesting for several other teams.

I've already finished the core ideas, but don't know how to set up the javascript...

Start of programming:
1) get system time of Operating System (exact hours, minutes, seconds)
2) get the value of "Report generated on" (source code: row 78, extract from ... teamnum=33)
3) calculate the time difference between 1) and 2) => This is the actual expiration after the Report has been generated (the value must always be smaller than around 1 hour, because of the hourly update!). You have to pay attention to the differnt time zones...
4) get the value of the 3-hour-update amount (source code: row 342, extract from
5) calculate the PPS variable (PPS=points per second) => PPS = (3-hour-update amount from kakao stats)/(3600*3)
6) get the value of "Grand Score" (hourly updated by Stanford) (source code: row 96, extract from ... teamnum=33)
7) Current Grand Score = "Grand Score" [extracted from 6)] + PPS [calculated @ 5)] * (time difference in seconds) [calculated @ 3)]

I'm pretty sure, that the Current Grand Score won't always display the 100% correct amount of points. But if the hourly updates are quite equal, the Current Grand Score is a very cool tool and the approximation is okay! The more stable the 3-hour-update amount, the more correct the approximation.

This is for Team 33. The other teams just have to change the URLs and it will work fine, too.

There are still a few problems, but I don't know how to solve them. For example the CSS, to beautify the numbers.
I think, it would make more sense to add commas after each 3 numbers. So you can distinguish between the thousands, millions,...
Feel free to start coding and contacting me.

Thanks a lot for ideas and your help!
- Torque -

This is a very early sample of the code (see below):


<style type="text/css">

color: #808080;

.tabelle {
border:1px solid #0090E0;

.tabelle td{
border:1px solid #0090E0;



var PPS = 0.345755544;
var c = 100

function startCount()
var timer = setInterval(count,1000);

function count()
var el = document.getElementById('counter');
var currentNumber = parseFloat(el.innerHTML);
el.innerHTML = (Math.round((currentNumber+PPS) * 100) / 100) + c;


<body onload="startCount();">

Current Grand Score:
<div id="counter"> 0 </div>

<form name="tabelle td">
<input class="nummer" type="text" id="Anzeige" value="0"> </form>

Posts: 3
Joined: Sun Feb 12, 2012 12:07 pm

Re: Folding@home Live Statistics Update

Postby smoking2000 » Fri Sep 21, 2012 3:24 pm

2) You don't want to scrape the CGI teampage, use the static version instead.

4) You don't want to scrape the Kakao stats either, the XML API from Extreme OverClocking is a better choice. Also, what "3-hour-update amount", the linked webpage doesn't show any.

I would suggest you move the stats parsing to a server side script which does all the calculations and stores the values in a JSON file. This file can be requested from Javascript to fill in the counter template.
User avatar
Posts: 571
Joined: Mon Dec 03, 2007 6:20 am
Location: Amsterdam

Re: Folding@home Live Statistics Update

Postby bruce » Fri Sep 21, 2012 4:38 pm

The suggestions from smoking2000 are particularly important. In the past, scripts and/or programs have parsed the Stanford statistics for "live" data and have been blocked because of the cumulative load placed on those servers by "everybody" running the script. Limits had to be placed on programs that over-used the stats server, including blocking access for overuse. Your proposed program goes a long way toward limiting the number of accesses to the live stats, but smoking2000's suggestions would make your program even more respectful of the server resources needed to supply the requested data.
Posts: 21869
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

Return to 3rd party contributed software

Who is online

Users browsing this forum: No registered users and 2 guests