IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 7, 2010, 8:30:39 AM (15 years ago)
Author:
rhenders
Message:

removed links to stop/run servers for now; added link to IPP metrics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/raw/czartool_labels.php

    r29792 r29969  
    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></p>";
    6767
    6868
     
    605605        ."&allservercmd=stop";
    606606
    607     write_table_cell($class, '%s', $link, "Stop all");
     607    $link = ""; # TODO removed links temporarily
     608        write_table_cell($class, '%s', $link, "Stop all");
    608609    $link = "czartool_labels.php?pass=".$pass
    609610        ."&proj=".$proj
     
    613614        ."&allservercmd=run";
    614615
    615     write_table_cell($class, '%s', $link, "Run all");
     616    $link = ""; # TODO removed links temporarily
     617        write_table_cell($class, '%s', $link, "Run all");
    616618    echo "</tr>\n";
    617619
     
    628630            ."&plottype=".$plotType;
    629631
    630         write_table_cell($class, '%s', $link, $server);
     632        $link = ""; # TODO removed links temporarily
     633            write_table_cell($class, '%s', $link, $server);
    631634        write_table_cell($class, '%s', "", $alive ? "yes" : "NO");
    632635
     
    644647
    645648                $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");
    647651                write_table_cell($class, '%s', "", "");
    648652            }
     
    651655                $link = $link . "run";
    652656                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");
    654659            }
    655660        }
     
    759764###########################################################################
    760765function 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();
     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();
    778783}
    779784
Note: See TracChangeset for help on using the changeset viewer.