IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 17, 2010, 10:06:13 AM (16 years ago)
Author:
eugene
Message:

merge from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/ippMonitor/raw/czartool_labels.php

    r29792 r30103  
    6464include 'version.php';
    6565echo "</p>";
    66 echo "<p  align=\"center\"> Current status of the IPP as of $lastUpdateTime (faults are shown in parentheses). <br>Documentation can be found <a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Processing\">here</a> and cluster load monitored <a href=\"http://ganglia.pan-starrs.ifa.hawaii.edu/?r=hour&s=descending&c=IPP%2520Production\">here</a><br>Current nightly science status: $nsStatus<br>Use <a href=\"$link\"> $plotTypeLink</a> plots <br/><a href=\"http://ipp004.ifa.hawaii.edu/clusterMonitor/top.html\">Who uses the cluster?</a></p>";
     66echo "<p  align=\"center\"> Current status of the IPP as of $lastUpdateTime (faults are shown in parentheses). <br>Documentation can be found <a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Processing\">here</a> and cluster load monitored <a href=\"http://ganglia.pan-starrs.ifa.hawaii.edu/?r=hour&s=descending&c=IPP%2520Production\">here</a><br>Current nightly science status: $nsStatus<br>Use <a href=\"$link\"> $plotTypeLink</a> plots <br/><a href=\"http://ipp004.ifa.hawaii.edu/clusterMonitor/top.html\">Who uses the cluster?</a><br><a href=\"http://ipp004.ifa.hawaii.edu/ippMetrics\">IPP Metrics</a><br/><a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PS1_IPP_CzarLogs\">Czar log pages</a></p>";
    6767
    6868
     
    399399        ."&plottype=".$plotType;
    400400
     401    $searchState = "new";
     402    if ($server == "update") $searchState = "update";
     403
    401404    // write rows
    402405    foreach ($labels as &$thisLabel) {
     
    437440        write_table_cell($class, '%s', $anyFaults ? $link : "", $str);
    438441
    439         $link = "failedChipProcessedImfile.php?pass=" . $pass . "&proj=" . $proj . "&chipRun.label=" . $thisLabel . "&chipRun.state=new";
     442        $link = "failedChipProcessedImfile.php?pass=" . $pass . "&proj=" . $proj . "&chipRun.label=" . $thisLabel . "&chipRun.state=".$searchState;
    440443        getStateAndFaults($db, $thisLabel, $selectedState, "chip", $str, $anyFaults);
    441444        write_table_cell($class, '%s', $anyFaults ? $link : "", $str);
    442445
    443         $link = "failedCamProcessedExp.php?pass=" . $pass . "&proj=" . $proj . "&camRun.label=" . $thisLabel . "&camRun.state=new";
     446        $link = "failedCamProcessedExp.php?pass=" . $pass . "&proj=" . $proj . "&camRun.label=" . $thisLabel . "&camRun.state=".$searchState;
    444447        getStateAndFaults($db, $thisLabel, $selectedState, "cam", $str, $anyFaults);
    445448        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
    446449
    447         $link =  "failedFakeProcessedImfile.php?pass=" . $pass . "&proj=" . $proj . "&fakeRun.label=" . $thisLabel . "&fakeRun.state=new";
     450        $link =  "failedFakeProcessedImfile.php?pass=" . $pass . "&proj=" . $proj . "&fakeRun.label=" . $thisLabel . "&fakeRun.state=".$searchState;
    448451        getStateAndFaults($db, $thisLabel, $selectedState, "fake", $str, $anyFaults);
    449452        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
    450453
    451         $link = "failedWarpSkyfiles.php?pass=" . $pass . "&proj=" . $proj . "&warpRun.label=" . $thisLabel . "&warpRun.state=new";
     454        $link = "failedWarpSkyfiles.php?pass=" . $pass . "&proj=" . $proj . "&warpRun.label=" . $thisLabel . "&warpRun.state=".$searchState;
    452455        getStateAndFaults($db, $thisLabel, $selectedState, "warp", $str, $anyFaults);
    453456        write_table_cell($class, '%s',  $anyFaults ? $link : "",  $str);
    454457
    455         $link = "failedStackSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&stackRun.label=" . $thisLabel . "&stackRun.state=new";
     458        $link = "failedStackSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&stackRun.label=" . $thisLabel . "&stackRun.state=".$searchState;
    456459        getStateAndFaults($db, $thisLabel, $selectedState, "stack", $str, $anyFaults);
    457460        write_table_cell($class, '%s',  $anyFaults ? $link : "", $str);
    458461
    459         $link = "failedDiffSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&diffRun.label=" . $thisLabel . "&diffRun.state=new";
     462        $link = "failedDiffSkyfile.php?pass=" . $pass . "&proj=" . $proj . "&diffRun.label=" . $thisLabel . "&diffRun.state=".$searchState;
    460463        getStateAndFaults($db, $thisLabel, $selectedState, "diff", $str, $anyFaults);
    461464        write_table_cell($class, '%s',  $anyFaults ? $link : "",  $str);
     
    605608        ."&allservercmd=stop";
    606609
    607     write_table_cell($class, '%s', $link, "Stop all");
     610    $link = ""; # TODO removed links temporarily
     611        write_table_cell($class, '%s', $link, "Stop all");
    608612    $link = "czartool_labels.php?pass=".$pass
    609613        ."&proj=".$proj
     
    613617        ."&allservercmd=run";
    614618
    615     write_table_cell($class, '%s', $link, "Run all");
     619    $link = ""; # TODO removed links temporarily
     620        write_table_cell($class, '%s', $link, "Run all");
    616621    echo "</tr>\n";
    617622
     
    628633            ."&plottype=".$plotType;
    629634
    630         write_table_cell($class, '%s', $link, $server);
     635        $link = ""; # TODO removed links temporarily
     636            write_table_cell($class, '%s', $link, $server);
    631637        write_table_cell($class, '%s', "", $alive ? "yes" : "NO");
    632638
     
    644650
    645651                $link = $link . "stop";
    646                 write_table_cell($class, '%s', $link, "stop");
     652                $link = ""; # TODO removed links temporarily
     653                    write_table_cell($class, '%s', $link, "stop");
    647654                write_table_cell($class, '%s', "", "");
    648655            }
     
    651658                $link = $link . "run";
    652659                write_table_cell($class, '%s', "", "");
    653                 write_table_cell($class, '%s', $link, "run");
     660                $link = ""; # TODO removed links temporarily
     661                    write_table_cell($class, '%s', $link, "run");
    654662            }
    655663        }
     
    759767###########################################################################
    760768function showReplicationsStatus($replHost, $replUser, $replPassword, $replDatabaseName) {
    761   #print "<br>$replHost, $replUser, $replPassword, $replDatabaseName<br/>";
    762   $dbRepl = DB::connect("mysql://$replUser:$replPassword@$replHost");
    763   if (PEAR::isError($dbRepl)) {
    764     die("MySQL DB connection error: Check the configuration for $replDatabaseName");
    765   }
    766   $res = $dbRepl->query('SHOW SLAVE STATUS');
    767   while ($res->fetchInto($row)) {
    768     # Have a look for Last_Errno in http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html
    769     $errorStatusInMySql = $row[18];
    770     $replStatus = ($errorStatusInMySql==0?"OK":"<font color=\"red\">PROBLEM</font>");
    771     echo "<tr><td>$replDatabaseName</td><td>$replStatus</td></tr>";
    772     if ($errorStatusInMySql!=0) {
    773       echo "<tr><td colspan=\"2\">Connect to $replDatabaseName replication host, execute 'SHOW SLAVE STATUS', and fix the problem.<br/>";
    774       echo "Information <a href=\"http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html\">here</a></td></tr>";
    775     }
    776   }
    777   $dbRepl->disconnect();
     769    #print "<br>$replHost, $replUser, $replPassword, $replDatabaseName<br/>";
     770    $dbRepl = DB::connect("mysql://$replUser:$replPassword@$replHost");
     771    if (PEAR::isError($dbRepl)) {
     772        die("MySQL DB connection error: Check the configuration for $replDatabaseName");
     773    }
     774    $res = $dbRepl->query('SHOW SLAVE STATUS');
     775    while ($res->fetchInto($row)) {
     776        # Have a look for Last_Errno in http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html
     777        $errorStatusInMySql = $row[18];
     778        $replStatus = ($errorStatusInMySql==0?"OK":"<font color=\"red\">PROBLEM</font>");
     779        echo "<tr><td>$replDatabaseName</td><td>$replStatus</td></tr>";
     780        if ($errorStatusInMySql!=0) {
     781            echo "<tr><td colspan=\"2\">Connect to $replDatabaseName replication host, execute 'SHOW SLAVE STATUS', and fix the problem.<br/>";
     782            echo "Information <a href=\"http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html\">here</a></td></tr>";
     783        }
     784    }
     785    $dbRepl->disconnect();
    778786}
    779787
Note: See TracChangeset for help on using the changeset viewer.