Exemplo n.º 1
0
{
    echo "<tr><td>{$function}</td><td>{$host}</td>";
    if ($running) {
        echo "<td bgcolor=00ff00>Running</td>\n";
    } else {
        echo "<td bgcolor=ff0000>Not running</td>\n";
    }
}
function show_daemon_status($host, $progname, $pidname)
{
    $running = daemon_status($host, $pidname);
    show_status($host, $progname, $running);
}
###############################################
# BEGIN:
start_cache(1800);
$Nmin = $cached_max_age / 60;
$dbrc = db_init(1);
// 1=soft, remember that DB might be down
page_head(PROJECT . " - Server Status");
// Date stamp
echo "<br ALIGN=RIGHT> " . PROJECT . " server status as of " . date("g:i A T") . " on " . date("l, j F Y ") . " (updated every {$Nmin} minutes).\n";
$proc_uptime = exec("cat /proc/uptime | cut -d\" \" -f-1");
$days = (int) ($proc_uptime / 86400);
$hours = (int) ($proc_uptime / 3600);
$hours = $hours % 24;
$minutes = (int) ($proc_uptime / 60);
$minutes = $minutes % 60;
echo "<br ALIGN=RIGHT>The " . PROJECT . " main server has been continuously up for " . "{$days}" . " days " . "{$hours}" . " hours " . "{$minutes}" . " minutes.\n<P>";
// tables side by side
echo "<TABLE><TR><TD align=center> \n";
Exemplo n.º 2
0
// 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/>.
require_once "../inc/util_ops.inc";
require_once "../inc/cache.inc";
// User - configuarble variables
// seconds to cache this page
$cache_sec = 300;
// Number that determines how many client errors are necessary for a WU to show up in this list.
// This number is added to min_quorum of the WU, so a value of 1 means that there must be more than
// (min_quorum + 1) errors for a WU to show up in this list.
$notification_level = 1;
start_cache($cache_sec);
admin_page_head("All-error Workunits");
db_init();
function print_wu($id, $name, $quorum, $errors)
{
    echo "<tr>\n";
    echo "<td align=\"left\" valign=\"top\">";
    echo "<a href=db_action.php?table=workunit&detail=high&id=";
    echo $id;
    echo ">";
    echo $id;
    echo "</a></td>\n";
    echo "<td align=\"left\" valign=\"top\">";
    echo $name;
    echo "</td>\n";
    echo "<td align=\"left\" valign=\"top\">";
Exemplo n.º 3
0
require_once "../inc/cache.inc";
require_once "../inc/util.inc";
require_once "../inc/xml.inc";
require_once "../inc/boinc_db.inc";
require_once "../inc/user.inc";
require_once "../inc/forum.inc";
require_once "../project/project.inc";
$auth = get_str("auth", true);
if (!$auth) {
    $id = get_int("userid");
}
$format = get_str("format", true);
if ($format == "xml") {
    // XML doesn't need translating, so use the full-file cache for this
    $cache_args = "userid=" . $id . "&amp;auth=" . $auth;
    start_cache(USER_PAGE_TTL, $cache_args);
    xml_header();
    $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);
    }
Exemplo n.º 4
0
// 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/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);
Exemplo n.º 5
0
require_once "../inc/news.inc";
require_once "../inc/cache.inc";
require_once "../inc/uotd.inc";
require_once "../inc/sanitize_html.inc";
require_once "../inc/translation.inc";
require_once "../inc/text_transform.inc";
//require_once("../inc/replacePngTags.inc");
require_once "../project/project.inc";
function show_nav()
{
    $config = get_config();
    $master_url = parse_config($config, "<master_url>");
}
$caching = false;
if ($caching) {
    start_cache(INDEX_PAGE_TTL);
}
$stopped = web_stopped();
$rssname = PROJECT . " RSS 2.0";
$rsslink = URL_BASE . "rss_main.php";
if (defined("CHARSET")) {
    header("Content-type: text/html; charset=" . tr(CHARSET));
}
page_head(PROJECT, null, null, "yes");
echo <<<END
 <div id="maincontent">
   <div id="mainrow">
    <div id="leftcol">
\t  <div id="bigtext">
      <p>
      Cosmology@Home lets you volunteer your spare computer time (like when your screen saver is on) 
Exemplo n.º 6
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);
Exemplo n.º 7
0
// <uldl_pid>	pid file of upload/download server httpd.conf
//			   (default: /etc/httpd/run/httpd.pid)
// <ssh_exe>	 path to ssh (default: /usr/bin/ssh)
// <ps_exe>	  path to ps (which supports "w" flag) (default: /bin/ps)
///////////////////////////////////////////////////////////////////////////////
require_once "../inc/util.inc";
require_once "../inc/db.inc";
require_once "../inc/xml.inc";
require_once "../inc/cache.inc";
$xml = get_int("xml", true);
$cache_args = "";
if ($xml) {
    $cache_args = "xml=1";
}
$cache_period = 600;
start_cache($cache_period, $cache_args);
$xmlout = "";
if ($argc > 0 && $argv[1] == "-f") {
    $xmlout = $argv[2];
    $xmloutfile = fopen($xmlout, "w+");
    if (!$xmloutfile) {
        die("failed to open file: {$xmlout}");
    }
}
// daemon status outputs: 1 (running) 0 (not running) or -1 (disabled)
//
function daemon_status($host, $pidname, $progname, $disabled)
{
    global $ssh_exe, $ps_exe, $project_host;
    $path = "../../pid_{$host}/{$pidname}.pid";
    $running = 0;