Пример #1
0
    $n = count_estimate("select count(id) as total from result where server_state=4");
    echo "\r\n\t\t<tr><td>in progress</td><td>" . number_format($n) . "</td></tr>\r\n\t";
    $n = count_estimate("select count(id) as total from result where server_state=5 and file_delete_state=2");
    echo "\r\n\t\t<tr><td>deleted</td><td>" . number_format($n) . "</td></tr>\r\n\t";
    $n = count_estimate("select count(id) as total from result where server_state=5 and outcome=1 and validate_state=1");
    echo "\r\n\t\t<tr><td>valid</td><td>" . number_format($n) . "</td></tr>\r\n\t";
    $n = numerical_query("SELECT COUNT(id) AS total FROM result WHERE server_state=5 AND outcome=1 AND validate_state=1 AND ( received_time > {$w_ago} )");
    echo "\r\n\t\t<tr><td>valid last week</td><td>" . number_format($n) . "</td></tr>\r\n\t";
    $n = count_estimate("select count(id) as total from result where server_state=5 and outcome=1 and validate_state=2");
    echo "\r\n\t\t<tr><td>invalid</td><td>" . number_format($n) . "</td></tr>\r\n\t";
    $n = time(0) - find_oldest();
    $days = (int) ($n / 86400);
    $hours = (int) ($n / 3600);
    $hours = $hours % 24;
    $minutes = (int) ($n / 60);
    $minutes = $minutes % 60;
    echo "\r\n\t\t<tr><td>Oldest Unsent Result</td><td>" . $days . " d " . $hours . " h " . $minutes . " m</td></tr>\r\n\t";
    echo "\r\n\t\t</table>\r\n\t";
}
// Server restrictions
// Display cgi-bin restriction status
if (file_exists("../../cgi-bin/.htaccess")) {
    echo "<P><font color=RED>\r\n\t\t<b>The " . PROJECT . " scheduler is currently restricted \r\n\t  to uwm.edu and a few other domains.\r\n\r\n\t</b></font><P>\r\n\t ";
}
echo "</TD></TR>\r\n\t</TABLE>\r\n\t";
echo "<br> 1) the sum of the benchmarked FLops/s of all hosts in the database";
echo "<br> 2) the sum of the benchmarked FLops/s of all hosts that have contacted the Einstein@Home scheduler within the past week";
echo "<br> 3) the sum of the FLops of all valid results from last week divided by the number of seconds in a week";
page_tail();
end_cache(600);
Пример #2
0
while ($res = _mysql_fetch_object($dbresult)) {
    $id = $res->workunitid;
    if ($id != $previd) {
        if ($errors > $prevquorum + $notification_level) {
            print_wu($previd, $prevname, $prevquorum, $errors);
            $rescount++;
        }
        $previd = $id;
        $prevname = $res->name;
        $prevquorum = $res->min_quorum;
        $errors = 0;
    }
    if ($res->outcome == 3) {
        $errors++;
    }
    if ($res->outcome == 1) {
        $errors = 0;
    }
}
_mysql_free_result($dbresult);
if ($errors > $prevquorum) {
    print_wu($id, $prevname, $prevquorum, $errors);
    $rescount++;
}
echo "</table>\n<br>";
echo $rescount;
echo " entries\n";
admin_page_tail();
end_cache($cache_sec);
$cvs_version_tracker[] = "\$Id\$";
//Generated automatically - do not edit
Пример #3
0
    $retval = db_init_xml();
    if ($retval) {
        xml_error($retval);
    }
    if ($auth) {
        $user = lookup_user_auth($auth);
        $show_hosts = true;
    } else {
        $user = lookup_user_id($id);
        $show_hosts = false;
    }
    if (!$user) {
        xml_error(-136);
    }
    show_user_xml($user, $show_hosts);
    end_cache(USER_PAGE_TTL, $cache_args);
} else {
    db_init();
    // need to do this in any case,
    // since show_user_summary_public() etc. accesses DB
    // The page may be presented in many different languages,
    // so here we cache the data instead
    //
    $cache_args = "userid=" . $id;
    $cached_data = get_cached_data(USER_PAGE_TTL, $cache_args);
    if ($cached_data) {
        // We found some old but non-stale data, let's use it
        $data = unserialize($cached_data);
        $user = $data->user;
        $community_links = $data->clo;
    } else {
Пример #4
0
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
// This file was modified by contributors of "BOINC Web Tweak" project.
require_once "../inc/util.inc";
require_once "../inc/team.inc";
require_once "../inc/cache.inc";
define('MEMBERS_LIMIT', 1000);
if (isset($_GET["sort_by"])) {
    $sort_by = $_GET["sort_by"];
} else {
    $sort_by = "expavg_credit";
}
$offset = get_int("offset", true);
if (!$offset) {
    $offset = 0;
}
if ($offset >= MEMBERS_LIMIT) {
    error_page("Limit exceeded: Can only display the first " . MEMBERS_LIMIT . " members.");
}
$teamid = get_int("teamid");
$cache_args = "teamid={$teamid}&amp;offset={$offset}&amp;sort_by={$sort_by}";
start_cache(TEAM_PAGE_TTL, $cache_args);
$team = BoincTeam::lookup_id($teamid);
page_head('Members of <a href="team_display.php?teamid=$teamid">$team->name</a>');
display_team_members($team, $offset, $sort_by);
page_tail();
end_cache(TEAM_PAGE_TTL, $cache_args);
Пример #5
0
// BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
//
// This file was modified by contributors of "BOINC Web Tweak" project.
require_once "../inc/db.inc";
require_once "../inc/util.inc";
require_once "../inc/cache.inc";
start_cache(3600);
page_head(tra("Download BOINC add-on software"));
echo "\r\n\t<p>" . tra("You can download applications in several categories.") . "\r\n\t<ul>\r\n\t<li>" . tra("These applications are not endorsed by %1 and you use them at your own risk.", PROJECT) . "\r\n\t<li>" . tra("We do not provide instructions for installing these applications.\r\nHowever, the author may have provided some help on installing or uninstalling the application. \r\nIf this is not enough you should contact the author.") . tra("Instructions for installing and running BOINC are %1here%2.", "<a href=http://boinc.berkeley.edu/participate.php>", "</a>") . "<li>" . tra("This list is managed centrally at %1the BOINC website%2.", "<a href=\"http://boinc.berkeley.edu/addons.php\">", "</a>") . "\r\n\t</ul>\r\n";
$httpFile = @fopen("http://boinc.berkeley.edu/addons.php?strip_header=true", "rb");
if (!$httpFile) {
    echo "";
} else {
    fpassthru($httpFile);
    fclose($httpFile);
}
echo "\r\n\t<p><p>\r\n";
page_tail();
end_cache(3600);
Пример #6
0
    // show_counts("Results ready to send","results_ready_to_send",$n);
    show_counts("Results ready to send", "results_ready_to_send", get_mysql_count("result where server_state = 2"));
    show_counts("Results in progress", "results_in_progress", get_mysql_count("result where server_state = 4"));
    show_counts("Workunits waiting for validation", "workunits_waiting_for_validation", get_mysql_count("workunit where need_validate=1"));
    show_counts("Workunits waiting for assimilation", "workunits_waiting_for_assimilation", get_mysql_count("workunit where assimilate_state=1"));
    show_counts("Workunits waiting for deletion", "workunits_waiting_for_deletion", get_mysql_count("workunit where file_delete_state=1"));
    show_counts("Results waiting for deletion", "results_waiting_for_deletion", get_mysql_count("result where file_delete_state=1"));
    $result = mysql_query("select MIN(transition_time) as min from workunit");
    $min = mysql_fetch_object($result);
    mysql_free_result($result);
    $gap = (time() - $min->min) / 3600;
    if ($gap < 0 || $min->min == 0) {
        $gap = 0;
    }
    show_counts("Transitioner backlog (hours)", "transitioner_backlog_hours", $gap);
    if (!$xml) {
        echo "</table>";
    }
}
$xmlstring = "  </database_file_states>\n</server_status>\n";
if ($xml) {
    echo $xmlstring;
} else {
    if ($xmlout) {
        fwrite($xmloutfile, $xmlstring);
    }
    echo "\r\n\t\t</td>\r\n\t\t<td>&nbsp;</td>\r\n\t\t</tr>\r\n\t\t</table>\r\n\t";
    page_tail();
}
end_cache($cache_period, $cache_args);
Пример #7
0
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">";
echo "<html>\r\n\t<head>\r\n\t<title>" . PROJECT . "</title>\r\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"main.css\" media=\"all\" />\r\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"" . STYLESHEET . "\">\r\n\t<link rel=\"alternate\" type=\"application/rss+xml\" title=\"" . $rssname . "\" href=\"" . $rsslink . "\">\r\n";
include 'schedulers.txt';
echo "\r\n\t</head><body>\r\n\t<span class=page_title>" . PROJECT . "</span>\r\n\t<table cellpadding=\"8\" cellspacing=\"4\">\r\n\t<tr><td rowspan=\"2\" valign=\"top\" width=\"40%\">\r\n";
if ($stopped) {
    echo "\r\n\t\t<b>" . PROJECT . " is temporarily shut down for maintenance.\r\n\t\tPlease try again later</b>.\r\n\t";
} else {
    db_init();
    show_nav();
}
echo "\r\n\t<p>\r\n\t<a href=\"http://boinc.berkeley.edu/\"><img align=\"middle\" border=\"0\" src=\"img/pb_boinc.gif\" alt=\"Powered by BOINC\"></a>\r\n\t</p>\r\n\t</td>\r\n";
if (!$stopped) {
    $profile = get_current_uotd();
    if ($profile) {
        echo "\r\n\t\t\t<td id=\"uotd\">\r\n\t\t\t<h2>" . tra("User of the day") . "</h2>\r\n\t\t";
        show_uotd($profile);
        echo "</td></tr>\n";
    }
}
echo "\r\n\t<tr><td id=\"news\">\r\n\t<h2>News</h2>\r\n\t<p>\r\n";
show_news($project_news, 5);
if (count($project_news) > 5) {
    echo "<a href=\"old_news.php\">...more</a>";
}
echo "\r\n\t<p class=\"smalltext\">\r\n\tNews is available as an\r\n\t<a href=\"rss_main.php\">RSS feed</a> <img src=\"img/rss_icon.gif\" alt=\"RSS\">.</p>\r\n\t</td>\r\n\t</tr></table>\r\n";
if ($caching) {
    page_tail_main(true);
    end_cache(INDEX_PAGE_TTL);
} else {
    page_tail_main();
}