2004-06-09 19:15:57 +00:00
|
|
|
<?php
|
2008-08-05 22:43:14 +00:00
|
|
|
// This file is part of BOINC.
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2008 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/>.
|
2004-05-23 23:52:59 +00:00
|
|
|
|
|
|
|
require_once("../inc/util_ops.inc");
|
|
|
|
|
|
|
|
db_init();
|
2012-01-30 23:57:18 +00:00
|
|
|
admin_page_head("Failures grouped by app version and host");
|
2004-05-23 23:52:59 +00:00
|
|
|
|
|
|
|
$query_appid = $_GET['appid'];
|
|
|
|
$query_received_time = time() - $_GET['nsecs'];
|
|
|
|
|
|
|
|
$main_query = "
|
|
|
|
SELECT
|
2012-01-31 07:21:42 +00:00
|
|
|
app_version_id,
|
|
|
|
app_version_num,
|
2004-05-23 23:52:59 +00:00
|
|
|
hostid AS Host_ID,
|
|
|
|
case
|
|
|
|
when INSTR(host.os_name, 'Darwin') then 'Darwin'
|
|
|
|
when INSTR(host.os_name, 'Linux') then 'Linux'
|
|
|
|
when INSTR(host.os_name, 'Windows') then 'Windows'
|
|
|
|
when INSTR(host.os_name, 'SunOS') then 'SunOS'
|
2005-02-08 04:38:31 +00:00
|
|
|
when INSTR(host.os_name, 'Solaris') then 'Solaris'
|
|
|
|
when INSTR(host.os_name, 'Mac') then 'Mac'
|
2004-05-23 23:52:59 +00:00
|
|
|
else 'Unknown'
|
|
|
|
end AS OS_Name,
|
|
|
|
case
|
|
|
|
when INSTR(host.os_name, 'Linux') then
|
|
|
|
case
|
|
|
|
when INSTR(LEFT(host.os_version, 6), '-') then LEFT(host.os_version, (INSTR(LEFT(host.os_version, 6), '-') - 1))
|
|
|
|
else LEFT(host.os_version, 6)
|
|
|
|
end
|
|
|
|
else host.os_version
|
|
|
|
end AS OS_Version,
|
2004-05-28 22:11:42 +00:00
|
|
|
host.nresults_today AS Results_Today,
|
2004-05-24 00:02:37 +00:00
|
|
|
COUNT(*) AS error_count
|
2004-05-23 23:52:59 +00:00
|
|
|
FROM result
|
|
|
|
left join host on result.hostid = host.id
|
|
|
|
WHERE
|
|
|
|
appid = '$query_appid' and
|
|
|
|
server_state = '5' and
|
|
|
|
outcome = '3' and
|
|
|
|
received_time > '$query_received_time'
|
|
|
|
GROUP BY
|
2012-01-31 07:21:42 +00:00
|
|
|
app_version_id,
|
|
|
|
hostid
|
|
|
|
order by error_count desc
|
2004-05-23 23:52:59 +00:00
|
|
|
";
|
|
|
|
|
|
|
|
$result = mysql_query($main_query);
|
|
|
|
|
2012-01-30 23:57:18 +00:00
|
|
|
start_table();
|
|
|
|
table_header(
|
2012-01-31 07:21:42 +00:00
|
|
|
"App version", "Host ID", "OS Version", "Results today",
|
2012-01-30 23:57:18 +00:00
|
|
|
"Error count"
|
|
|
|
);
|
2004-05-23 23:52:59 +00:00
|
|
|
|
|
|
|
while ($res = mysql_fetch_object($result)) {
|
2012-01-31 07:21:42 +00:00
|
|
|
$av = BoincAppVersion::lookup_id($res->app_version_id);
|
|
|
|
$p = BoincPlatform::lookup_id($av->platformid);
|
2012-01-30 23:57:18 +00:00
|
|
|
table_row(
|
2012-01-31 07:21:42 +00:00
|
|
|
sprintf("%.2f", $res->app_version_num/100)." $p->name [$av->plan_class]",
|
|
|
|
$res->Host_ID,
|
2012-01-30 23:57:18 +00:00
|
|
|
$res->OS_Version, $res->Results_Today,
|
2012-01-31 07:21:42 +00:00
|
|
|
"<a href=db_action.php?table=result&detail=low&hostid=$res->Host_ID&app_version_id=$res->app_version_id&server_state=5&outcome=3>$res->error_count</a>"
|
2012-01-30 23:57:18 +00:00
|
|
|
);
|
2004-05-23 23:52:59 +00:00
|
|
|
}
|
|
|
|
mysql_free_result($result);
|
|
|
|
|
2012-01-30 23:57:18 +00:00
|
|
|
end_table();
|
2004-05-23 23:52:59 +00:00
|
|
|
|
2005-02-08 04:38:31 +00:00
|
|
|
admin_page_tail();
|
2004-05-23 23:52:59 +00:00
|
|
|
|
2008-08-05 22:43:14 +00:00
|
|
|
$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit
|
2004-06-09 19:15:57 +00:00
|
|
|
?>
|