2010-06-03 20:26:02 +00:00
|
|
|
<?php
|
2011-02-09 22:11:34 +00:00
|
|
|
// This file is part of BOINC.
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2011 University of California
|
|
|
|
//
|
|
|
|
// 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/>.
|
2010-06-03 20:26:02 +00:00
|
|
|
|
|
|
|
require_once("../inc/util.inc");
|
|
|
|
|
2011-02-09 22:11:34 +00:00
|
|
|
check_get_args(array("hostid"));
|
|
|
|
|
2010-06-03 20:26:02 +00:00
|
|
|
function rsc_name($t) {
|
|
|
|
switch ($t) {
|
2011-08-25 22:12:48 +00:00
|
|
|
case 2: return tra("CPU");
|
|
|
|
case 3: return tra("nvidia GPU");
|
|
|
|
case 4: return tra("ATI GPU");
|
2010-06-03 20:26:02 +00:00
|
|
|
}
|
2011-08-25 22:12:48 +00:00
|
|
|
return tra("Unknown");
|
2010-06-03 20:26:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function av_desc($gavid) {
|
|
|
|
if ($gavid >= 1000000) {
|
|
|
|
$appid = (int)($gavid/1000000);
|
|
|
|
$app = BoincApp::lookup_id($appid);
|
2011-08-25 22:12:48 +00:00
|
|
|
if (!$app) return tra("Anonymous platform, missing app");
|
2010-06-03 20:26:02 +00:00
|
|
|
$rsc_type = $gavid % 1000000;
|
|
|
|
$r = rsc_name($rsc_type);
|
2011-08-25 22:12:48 +00:00
|
|
|
return "$app->user_friendly_name (".tra("anonymous platform").", $r)";
|
2010-06-03 20:26:02 +00:00
|
|
|
|
|
|
|
} else {
|
|
|
|
$av = BoincAppVersion::lookup_id($gavid);
|
2011-08-25 22:12:48 +00:00
|
|
|
if (!$av) return tra("Missing app version");
|
2010-06-03 20:26:02 +00:00
|
|
|
$app = BoincApp::lookup_id($av->appid);
|
2011-08-25 22:12:48 +00:00
|
|
|
if (!$app) return tra("Missing app");
|
2010-08-10 19:45:34 +00:00
|
|
|
$platform = BoincPlatform::lookup_id($av->platformid);
|
2011-08-25 22:12:48 +00:00
|
|
|
if (!$platform) return tra("Missing platform");
|
2010-06-03 20:26:02 +00:00
|
|
|
$pc = (strlen($av->plan_class))?"($av->plan_class)":"";
|
|
|
|
$v = number_format($av->version_num/100, 2);
|
2010-08-10 19:45:34 +00:00
|
|
|
return "$app->user_friendly_name $v $platform->name $pc";
|
2010-06-03 20:26:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function show_hav($hav) {
|
|
|
|
row1(av_desc($hav->app_version_id));
|
2011-08-25 22:12:48 +00:00
|
|
|
row2(tra("Number of tasks completed"), $hav->pfc_n);
|
|
|
|
row2(tra("Max tasks per day"), $hav->max_jobs_per_day);
|
|
|
|
row2(tra("Number of tasks today"), $hav->n_jobs_today);
|
|
|
|
row2(tra("Consecutive valid tasks"), $hav->consecutive_valid);
|
2010-06-03 20:26:02 +00:00
|
|
|
$x = number_format($hav->turnaround_avg/86400, 2);
|
2010-09-09 17:28:36 +00:00
|
|
|
if ($hav->et_avg) {
|
|
|
|
$gflops = 1e-9/$hav->et_avg;
|
2011-08-25 22:12:48 +00:00
|
|
|
row2(tra("Average processing rate"), $gflops);
|
2010-09-09 17:28:36 +00:00
|
|
|
}
|
2011-08-25 22:12:48 +00:00
|
|
|
row2(tra("Average turnaround time"), "$x days");
|
2010-06-03 20:26:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$hostid = get_int('hostid');
|
|
|
|
|
|
|
|
$havs = BoincHostAppVersion::enum("host_id=$hostid");
|
|
|
|
|
2010-08-10 19:45:34 +00:00
|
|
|
page_head(tra("Application details for host %1", $hostid));
|
2010-06-03 20:26:02 +00:00
|
|
|
start_table();
|
|
|
|
foreach ($havs as $hav) {
|
2010-06-30 20:14:36 +00:00
|
|
|
//if (!$hav->pfc_n) continue;
|
2010-06-03 20:26:02 +00:00
|
|
|
show_hav($hav);
|
|
|
|
}
|
2010-06-03 20:28:26 +00:00
|
|
|
end_table();
|
2010-06-03 20:26:02 +00:00
|
|
|
|
2010-06-03 20:28:26 +00:00
|
|
|
page_tail();
|
2010-06-03 20:26:02 +00:00
|
|
|
?>
|