no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | monitors:boinc [2009/11/23 05:36] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== BOINC ====== | ||
| + | |||
| + | ^ Author | [[ andrew@eiknet.com | Andrew Rankin ]] | | ||
| + | ^ Compatibility | Xymon 4.2 | | ||
| + | ^ Requirements | Perl, Date:: | ||
| + | ^ Download | http:// | ||
| + | ^ Last Update | 2007-09-26 | | ||
| + | |||
| + | ===== Description ===== | ||
| + | |||
| + | Boinc Monitoring script - This is for monitoring the boinc (Berkeley Open Infrastructure for Network Computing, http:// | ||
| + | |||
| + | ===== Installation ===== | ||
| + | === Client side === | ||
| + | |||
| + | - Install bb-boinc.pl into the < | ||
| + | - Modify bb-boinc.pl setting the hostname, domain, hobbit_server, | ||
| + | - Modify your clientlaunch.cfg, | ||
| + | < | ||
| + | [boinc] | ||
| + | ENVFILE $HOBBITCLIENTHOME/ | ||
| + | CMD $HOBBITCLIENTHOME/ | ||
| + | LOGFILE $HOBBITCLIENTHOME/ | ||
| + | INTERVAL 5m | ||
| + | </ | ||
| + | === Server side === | ||
| + | |||
| + | - For NCV Graphs: | ||
| + | - hobbitgraph.cfg, | ||
| + | [boinc] | ||
| + | TITLE Average BOINC Credit for USER | ||
| + | YAXIS Credit | ||
| + | DEF: | ||
| + | LINE2: | ||
| + | GPRINT: | ||
| + | GPRINT: | ||
| + | GPRINT: | ||
| + | GPRINT: | ||
| + | |||
| + | [boinc1] | ||
| + | TITLE Total BOINC Credit for USER | ||
| + | YAXIS Credit | ||
| + | DEF: | ||
| + | LINE2: | ||
| + | GPRINT: | ||
| + | GPRINT: | ||
| + | GPRINT: | ||
| + | GPRINT: | ||
| + | </ | ||
| + | - hobbitserver.cfg, | ||
| + | TEST2RRD=" | ||
| + | GRAPHS=" | ||
| + | NCV_boinc=" | ||
| + | </ | ||
| + | - bb-hosts, add the following to add the boinc info to the trends coloumn:< | ||
| + | TRENDS: | ||
| + | </ | ||
| + | |||
| + | ===== Source ===== | ||
| + | ==== bb-boinc.pl ==== | ||
| + | <hidden onHidden=" | ||
| + | <code perl> | ||
| + | # | ||
| + | ############################################################################# | ||
| + | # | ||
| + | # Written by Andrew Rankin (andrew [at] eiknet.com) | ||
| + | # boinc client monitoring script | ||
| + | # | ||
| + | ############################################################################# | ||
| + | use strict; | ||
| + | |||
| + | ## variables | ||
| + | ############################################################################## | ||
| + | my $bbtmp = '/ | ||
| + | my $bbhome = '/ | ||
| + | my $bbtest = ' | ||
| + | my $boinc_passwd = ' | ||
| + | my $hobbit_server = ' | ||
| + | my $machine = " | ||
| + | my $boinc_path = "/ | ||
| + | |||
| + | ## BB and related test constants | ||
| + | ############################################################################# | ||
| + | |||
| + | use constant GREEN => ' | ||
| + | use constant YELLOW => ' | ||
| + | use constant RED => ' | ||
| + | |||
| + | ############################################################################# | ||
| + | { | ||
| + | my $DATA = ""; | ||
| + | my $color = GREEN; | ||
| + | my $status = 'boinc OK'; | ||
| + | my %project_info; | ||
| + | |||
| + | ## Get Main Project Info | ||
| + | my $boinc_output = `$boinc_path/ | ||
| + | |||
| + | if($boinc_output =~ m/ | ||
| + | $color = RED; | ||
| + | $status = 'boinc NOT RUNNING'; | ||
| + | } | ||
| + | elsif($boinc_output =~ m/ | ||
| + | $color = RED; | ||
| + | $status = 'boinc ERROR'; | ||
| + | } | ||
| + | else { | ||
| + | my @boinc_sections = split(/ | ||
| + | my ($projects, | ||
| + | $projects =~ s/ | ||
| + | $projects =~ s/1\) -----------\n// | ||
| + | |||
| + | my @project_lines = split(/ | ||
| + | foreach my $line (@project_lines){ | ||
| + | chomp($line); | ||
| + | my ($key, | ||
| + | next if !$key or !$value; | ||
| + | $key =~ s/ //g; | ||
| + | |||
| + | # rid us of horrid decimal places | ||
| + | if($key =~ m/ | ||
| + | $value = int($value); | ||
| + | } | ||
| + | # change yes/no to 1/0 | ||
| + | if($value =~ m/no/i){ | ||
| + | $value = 0; | ||
| + | } | ||
| + | if($value =~ m/yes/i){ | ||
| + | $value = 1; | ||
| + | } | ||
| + | |||
| + | $project_info{$key} = $value; | ||
| + | $DATA .= "$key: $value\n"; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | ########################################## | ||
| + | my $report_date = `date`; | ||
| + | |||
| + | system(" | ||
| + | } | ||
| + | |||
| + | ############################################################################# | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ===== Known Bugs and Issues ===== | ||
| + | |||
| + | ===== To Do ===== | ||
| + | |||
| + | ===== Credits ===== | ||
| + | * Andrew Rankin | ||
| + | |||
| + | ===== Changelog ===== | ||
| + | |||
| + | * **2007-09-26** | ||
| + | * Initial release | ||