$resultunitquery = mysql_query("SELECT * FROM result WHERE workunitid=" . $workunit->id);
     $nrofresults = mysql_num_rows($resultunitquery);
     for ($index = 0; $index < $nrofresults; ++$index) {
         $resultunit = mysql_fetch_object($resultunitquery);
         $jobstderr = parse_element($resultunit->stderr_out, "<stderr_txt>");
         if ($jobstderr) {
             row1("Error output of this job");
             row2("", $jobstderr);
         }
     }
 } else {
     $resultunit = mysql_fetch_object(mysql_query("SELECT * FROM result WHERE id=" . $workunit->canonical_resultid));
     $xmldoc = $resultunit->xml_doc_out;
     $nroffiles = 0;
     $cursor = 0;
     while ($tempfileinfo = parse_next_element($xmldoc, "<file_info>", &$cursor)) {
         $outputfiles[$nroffiles++] = parse_element($tempfileinfo, "<name>");
     }
     if ($nroffiles >= 1) {
         $fanoutnr = parse_config($config, "<uldl_dir_fanout>");
         row1("Output of this job");
         row2("Number of output files of job: ", $nroffiles);
         for ($index = 0; $index < $nroffiles; ++$index) {
             $filename = $outputfiles[$index];
             $url = "upload/" . fan_out_dir($filename, $fanoutnr) . "/" . $filename;
             $outputfilelink = '<a href="' . $url . '">' . $filename . '</a>';
             row2("Output file " . ($index + 1) . ": ", $outputfilelink);
         }
     }
     $jobstderr = parse_element($resultunit->stderr_out, "<stderr_txt>");
     if ($jobstderr) {
Пример #2
0
    $web_running = -1;
}
show_status($www_host, tra("data-driven web pages"), $web_running);
// Check for httpd.pid file of upload/download server.
//
$uldl_running = file_exists($uldl_pid);
if ($uldl_running == 0) {
    $uldl_running = -1;
}
show_status($uldl_host, tra("upload/download server"), $uldl_running);
$sched_running = !file_exists("../../stop_sched");
show_status($sched_host, tra("scheduler"), $sched_running);
// parse through config.xml to get all daemons running
//
$cursor = 0;
while ($thisxml = trim(parse_next_element($config_xml, "<daemon>", $cursor))) {
    $host = parse_element($thisxml, "<host>");
    if ($host == "") {
        $host = $project_host;
    }
    $cmd = parse_element($thisxml, "<cmd>");
    list($cmd) = explode(" ", $cmd);
    $log = parse_element($thisxml, "<output>");
    if (!$log) {
        $log = $cmd . ".log";
    }
    list($log) = explode(".log", $log);
    $pid = parse_element($thisxml, "<pid_file>");
    if (!$pid) {
        $pid = $cmd . ".pid";
    }