Changeset 29969 for trunk/ippMonitor/raw/czartool_labels.php
- Timestamp:
- Dec 7, 2010, 8:30:39 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippMonitor/raw/czartool_labels.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/raw/czartool_labels.php
r29792 r29969 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></p>"; 67 67 68 68 … … 605 605 ."&allservercmd=stop"; 606 606 607 write_table_cell($class, '%s', $link, "Stop all"); 607 $link = ""; # TODO removed links temporarily 608 write_table_cell($class, '%s', $link, "Stop all"); 608 609 $link = "czartool_labels.php?pass=".$pass 609 610 ."&proj=".$proj … … 613 614 ."&allservercmd=run"; 614 615 615 write_table_cell($class, '%s', $link, "Run all"); 616 $link = ""; # TODO removed links temporarily 617 write_table_cell($class, '%s', $link, "Run all"); 616 618 echo "</tr>\n"; 617 619 … … 628 630 ."&plottype=".$plotType; 629 631 630 write_table_cell($class, '%s', $link, $server); 632 $link = ""; # TODO removed links temporarily 633 write_table_cell($class, '%s', $link, $server); 631 634 write_table_cell($class, '%s', "", $alive ? "yes" : "NO"); 632 635 … … 644 647 645 648 $link = $link . "stop"; 646 write_table_cell($class, '%s', $link, "stop"); 649 $link = ""; # TODO removed links temporarily 650 write_table_cell($class, '%s', $link, "stop"); 647 651 write_table_cell($class, '%s', "", ""); 648 652 } … … 651 655 $link = $link . "run"; 652 656 write_table_cell($class, '%s', "", ""); 653 write_table_cell($class, '%s', $link, "run"); 657 $link = ""; # TODO removed links temporarily 658 write_table_cell($class, '%s', $link, "run"); 654 659 } 655 660 } … … 759 764 ########################################################################### 760 765 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();766 #print "<br>$replHost, $replUser, $replPassword, $replDatabaseName<br/>"; 767 $dbRepl = DB::connect("mysql://$replUser:$replPassword@$replHost"); 768 if (PEAR::isError($dbRepl)) { 769 die("MySQL DB connection error: Check the configuration for $replDatabaseName"); 770 } 771 $res = $dbRepl->query('SHOW SLAVE STATUS'); 772 while ($res->fetchInto($row)) { 773 # Have a look for Last_Errno in http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html 774 $errorStatusInMySql = $row[18]; 775 $replStatus = ($errorStatusInMySql==0?"OK":"<font color=\"red\">PROBLEM</font>"); 776 echo "<tr><td>$replDatabaseName</td><td>$replStatus</td></tr>"; 777 if ($errorStatusInMySql!=0) { 778 echo "<tr><td colspan=\"2\">Connect to $replDatabaseName replication host, execute 'SHOW SLAVE STATUS', and fix the problem.<br/>"; 779 echo "Information <a href=\"http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html\">here</a></td></tr>"; 780 } 781 } 782 $dbRepl->disconnect(); 778 783 } 779 784
Note:
See TracChangeset
for help on using the changeset viewer.
