- Timestamp:
- Dec 17, 2010, 10:06:13 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/ippMonitor/raw/czartool_labels.php
r29792 r30103 64 64 include 'version.php'; 65 65 echo "</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>";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><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>"; 67 67 68 68 … … 399 399 ."&plottype=".$plotType; 400 400 401 $searchState = "new"; 402 if ($server == "update") $searchState = "update"; 403 401 404 // write rows 402 405 foreach ($labels as &$thisLabel) { … … 437 440 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 438 441 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; 440 443 getStateAndFaults($db, $thisLabel, $selectedState, "chip", $str, $anyFaults); 441 444 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 442 445 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; 444 447 getStateAndFaults($db, $thisLabel, $selectedState, "cam", $str, $anyFaults); 445 448 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 446 449 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; 448 451 getStateAndFaults($db, $thisLabel, $selectedState, "fake", $str, $anyFaults); 449 452 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 450 453 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; 452 455 getStateAndFaults($db, $thisLabel, $selectedState, "warp", $str, $anyFaults); 453 456 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 454 457 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; 456 459 getStateAndFaults($db, $thisLabel, $selectedState, "stack", $str, $anyFaults); 457 460 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); 458 461 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; 460 463 getStateAndFaults($db, $thisLabel, $selectedState, "diff", $str, $anyFaults); 461 464 write_table_cell($class, '%s', $anyFaults ? $link : "", $str); … … 605 608 ."&allservercmd=stop"; 606 609 607 write_table_cell($class, '%s', $link, "Stop all"); 610 $link = ""; # TODO removed links temporarily 611 write_table_cell($class, '%s', $link, "Stop all"); 608 612 $link = "czartool_labels.php?pass=".$pass 609 613 ."&proj=".$proj … … 613 617 ."&allservercmd=run"; 614 618 615 write_table_cell($class, '%s', $link, "Run all"); 619 $link = ""; # TODO removed links temporarily 620 write_table_cell($class, '%s', $link, "Run all"); 616 621 echo "</tr>\n"; 617 622 … … 628 633 ."&plottype=".$plotType; 629 634 630 write_table_cell($class, '%s', $link, $server); 635 $link = ""; # TODO removed links temporarily 636 write_table_cell($class, '%s', $link, $server); 631 637 write_table_cell($class, '%s', "", $alive ? "yes" : "NO"); 632 638 … … 644 650 645 651 $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"); 647 654 write_table_cell($class, '%s', "", ""); 648 655 } … … 651 658 $link = $link . "run"; 652 659 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"); 654 662 } 655 663 } … … 759 767 ########################################################################### 760 768 function 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.html769 $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(); 778 786 } 779 787
Note:
See TracChangeset
for help on using the changeset viewer.
