Associate
- Joined
- 27 Apr 2004
- Posts
- 2,377
Here's a link to my Munin so you can see what I'm talking about, before I start confusing people:
http://venus.piggott.me.uk/munin/piggott.me.uk/saturn.piggott.me.uk.html#Folding@home
For now I've only got it working on Linux but might have a go at getting it working on Windows too at some point.
See http://munin.projects.linpro.no/ for more information on Munin. I've just written a plugin to graph FAH WU progress (as seen in the first link), and thought I'd post here in case it's of any use to anyone. Not sure how many will want to use it but hey, worth checking.
Since the explanation doesn't take long I thought I may aswell post it without waiting to see if anyone's interested first.
Since PHP is pretty much the only language I know, that is what I wrote it in, which means you will need the PHP-CLI installed - apt-get install php5-cli should take care of that on Debian based systems if you don't already have it.
Then put the following in /usr/share/munin/plugins/folding using your favourite editor (nano for me). You will probably need to do this as root (using su or sudo):
You will need to edit $cpus to equal the number of Folding clients you have installed on the machine, and $foldingpath to the base directory of your Folding install as created by finstall. Then save and exit.
Now run:
as root to make the plugin executable, and run:
to link the folding plugin into the munin config, again as root. Then run:
as root again, to make munin-node pick up the new plugin. That's it, done. Just wait a few minutes for Munin to update and you should now have nice graphs showing WU progress.
Hope someone finds this useful, null
http://venus.piggott.me.uk/munin/piggott.me.uk/saturn.piggott.me.uk.html#Folding@home
For now I've only got it working on Linux but might have a go at getting it working on Windows too at some point.
See http://munin.projects.linpro.no/ for more information on Munin. I've just written a plugin to graph FAH WU progress (as seen in the first link), and thought I'd post here in case it's of any use to anyone. Not sure how many will want to use it but hey, worth checking.
Since the explanation doesn't take long I thought I may aswell post it without waiting to see if anyone's interested first.
Since PHP is pretty much the only language I know, that is what I wrote it in, which means you will need the PHP-CLI installed - apt-get install php5-cli should take care of that on Debian based systems if you don't already have it.
Then put the following in /usr/share/munin/plugins/folding using your favourite editor (nano for me). You will probably need to do this as root (using su or sudo):
Code:
#!/usr/bin/php
<?php
/* Very very basic plugin to graph Folding@Home WU Progress in Munin.
/ Written by David Piggott - www.piggott.me.uk
*/
$cpus = 2;
$foldingpath = "/home/david/foldingathome/";
if($argv[1] == "config"){
echo "graph_title Folding@Home WU Progress\n";
echo "graph_vlabel %\n";
echo "graph_category Folding@Home\n";
for($i = 1; $i <= $cpus; $i++){
echo "CPU{$i}.label CPU{$i}\n";
}
echo "graph_info This graph shows the progress of Folding@Home Work Units.\n";
}else{
for($i = 1; $i <= $cpus; $i++){
$lines = file("{$foldingpath}CPU{$i}/unitinfo.txt");
$parts = explode(" ", $lines[5]);
$progress[$i] = trim($parts[1], "%");
echo "CPU{$i}.value {$progress[$i]}\n";
}
}
?>
Now run:
Code:
chmod +x /usr/share/munin/plugins/folding
Code:
ln -s /usr/share/munin/plugins/folding /etc/munin/plugins/
Code:
/etc/init.d/munin-node restart
Hope someone finds this useful, null

Last edited: