mirror of https://github.com/BOINC/boinc.git
- add script to repair damaged user.global_prefs fields
- compile warning fixes svn path=/trunk/boinc/; revision=25707
This commit is contained in:
parent
21a3ea90a5
commit
d2d9110584
|
@ -3981,3 +3981,16 @@ Rom 21 May 2012
|
|||
|
||||
clientgui/
|
||||
AdvancedFrame.cpp
|
||||
|
||||
David 22 May 2012
|
||||
- add script to repair damaged user.global_prefs fields
|
||||
- compile warning fixes
|
||||
|
||||
sched/
|
||||
delete_file.cpp
|
||||
sched_version.cpp
|
||||
html/ops/
|
||||
fix_venue.php
|
||||
vda/
|
||||
stats.cpp
|
||||
ssim.php
|
||||
|
|
|
@ -17,7 +17,7 @@ require_once("../html/inc/translation.inc");
|
|||
function show_participant() {
|
||||
$i = rand(0, 99);
|
||||
$j = $i+1;
|
||||
echo "<table cellpadding=8 cellspacing=0>
|
||||
echo "<table cellpadding=8 cellspacing=0 width=100%>
|
||||
<tr><td class=heading_right>
|
||||
<center>
|
||||
<span class=section_title>".tra("Computing power")."</span>
|
||||
|
@ -36,7 +36,7 @@ function show_participant() {
|
|||
function show_totals() {
|
||||
$fn = "boinc_state.xml";
|
||||
if (!file_exists($fn) || filemtime($fn) < time()-86400) {
|
||||
$x = file_get_contents("http://www.boincstats.com/xml/boinc_state.php");
|
||||
$x = file_get_contents("http://boincstats.com/en/xml/boincState");
|
||||
if ($x) {
|
||||
$f = fopen($fn, "w");
|
||||
fwrite($f, $x);
|
||||
|
|
|
@ -292,6 +292,14 @@ $mixed = array(
|
|||
$math = array(
|
||||
tra("Mathematics, computing, and games"),
|
||||
array(
|
||||
array(
|
||||
"NumberFields@home",
|
||||
"http://stat.la.asu.edu/NumberFields/",
|
||||
"Arizona State University, school of Mathematics",
|
||||
"Mathematics",
|
||||
"NumberFields@home searches for fields with special properties. The primary application of this research is in the realm of algebraic number theory. Number theorists can mine the data for interesting patterns to help them formulate conjectures about number fields. Ultimately, this research will lead to a deeper understanding of the profound properties of numbers, the basic building blocks of all mathematics.",
|
||||
"nf_banner_10.jpg"
|
||||
),
|
||||
array(
|
||||
"SAT@home",
|
||||
"http://sat.isa.ru/pdsat/",
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
|
||||
// repair user.global_prefs fields that were corrupted
|
||||
// (non-parsable XML) by a bug at some point
|
||||
|
||||
require_once("../inc/boinc_db.inc");
|
||||
|
||||
// insert "\n</venue>\n" before "</global_preferences>"
|
||||
// This fixes an XML error introduced at some point in the past
|
||||
//
|
||||
function repair_prefs($prefs) {
|
||||
$x = strstr($prefs, "</global_preferences>", true);
|
||||
if (!$x) return null;
|
||||
return "$x\n </venue>\n</global_preferences>\n";
|
||||
}
|
||||
|
||||
function process_set($users) {
|
||||
foreach ($users as $user) {
|
||||
if (!$user->global_prefs) {
|
||||
//echo "$user->id: no prefs\n";
|
||||
continue;
|
||||
}
|
||||
$retval = @simplexml_load_string($user->global_prefs);
|
||||
if ($retval) {
|
||||
//echo "$user->id: good\n";
|
||||
} else {
|
||||
echo "$user->id: prefs don't parse\n";
|
||||
$p = repair_prefs($user->global_prefs);
|
||||
if ($p) {
|
||||
$retval = @simplexml_load_string($p);
|
||||
if ($retval) {
|
||||
$user->update("global_prefs='$p'");
|
||||
echo "repair succeeded for $user->id\n";
|
||||
} else {
|
||||
echo "couldn't repair prefs for user $user->id\n";
|
||||
}
|
||||
} else {
|
||||
echo "bad prefs for user $user->id\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$n = 0;
|
||||
while (1) {
|
||||
$users = BoincUser::enum("true limit $n,1000");
|
||||
echo "processing from $n\n";
|
||||
if (!$users) break;
|
||||
process_set($users);
|
||||
$n += sizeof($users);
|
||||
}
|
||||
?>
|
|
@ -43,12 +43,13 @@
|
|||
|
||||
void usage(char* name) {
|
||||
fprintf(stderr,
|
||||
"Usage: delete_file [options] : delete a file from a host \n\n"
|
||||
"Usage: %s [options] : delete a file from a host \n\n"
|
||||
"Options:\n"
|
||||
" --file_name F file name\n"
|
||||
" --host_id H host DB ID\n"
|
||||
" [-h | --help] Show this help text.\n"
|
||||
" [-v | --version] Show version information.\n"
|
||||
" [-v | --version] Show version information.\n",
|
||||
name
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -426,7 +426,7 @@ static double max_32b_address_space() {
|
|||
// - check if we need work for the resource
|
||||
//
|
||||
static BEST_APP_VERSION* check_homogeneous_app_version(
|
||||
WORKUNIT& wu, bool reliable_only
|
||||
WORKUNIT& wu, bool /* reliable_only */
|
||||
// TODO: enforce reliable_only
|
||||
) {
|
||||
static BEST_APP_VERSION bav;
|
||||
|
|
10
vda/ssim.php
10
vda/ssim.php
|
@ -5,13 +5,19 @@
|
|||
// usage: ssim.php infile
|
||||
//
|
||||
// format of infile
|
||||
// policy policyfile1
|
||||
// policy policy_file_1
|
||||
// ...
|
||||
// policy policyfilen
|
||||
// policy policy_file_n
|
||||
// host_life_mean x1 ... xn
|
||||
// connect_interval x
|
||||
// mean_xfer_rate x
|
||||
|
||||
// output graphs:
|
||||
// infile_ft.png: fault tolerance level vs time
|
||||
// infile_du.png: disk usage vs time
|
||||
// infile_ub.png: upload BW vs time
|
||||
// infile_db.png: download BW vs time
|
||||
|
||||
function parse_input_file($filename) {
|
||||
$x = null;
|
||||
$x->name = $filename;
|
||||
|
|
|
@ -59,10 +59,10 @@ void STATS_ITEM::sample(double v, bool collecting_stats, double now) {
|
|||
#ifdef SAMPLE_DEBUG
|
||||
switch (kind) {
|
||||
case DISK:
|
||||
printf("%s: %s: %fGB -> %fGB\n", now_str(), name, value/1e9, v/1e9);
|
||||
printf("%s: %s: %f GB -> %f GB\n", now_str(), name, value/1e9, v/1e9);
|
||||
break;
|
||||
case NETWORK:
|
||||
printf("%s: %s: %fMbps -> %fMbps\n", now_str(), name, value/1e6, v/1e6);
|
||||
printf("%s: %s: %f Mbps -> %f Mbps\n", now_str(), name, value/1e6, v/1e6);
|
||||
break;
|
||||
case FAULT_TOLERANCE:
|
||||
printf("%s: %s: %.0f -> %.0f\n", now_str(), name, value, v);
|
||||
|
@ -109,12 +109,12 @@ void STATS_ITEM::print(double now) {
|
|||
double dt = now - start_time;
|
||||
switch (kind) {
|
||||
case DISK:
|
||||
printf(" mean: %fGB. Max: %fGB at %s\n",
|
||||
printf(" mean: %f GB. Max: %f GB at %s\n",
|
||||
(integral/dt)/1e9, extreme_val/1e9, time_str(extreme_val_time)
|
||||
);
|
||||
break;
|
||||
case NETWORK:
|
||||
printf(" mean: %fMbps. Max: %fMbps at %s\n",
|
||||
printf(" mean: %f Mbps. Max: %f Mbps at %s\n",
|
||||
(integral/dt)/1e6, extreme_val/1e6, time_str(extreme_val_time)
|
||||
);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue