Changeset 39804
- Timestamp:
- Nov 4, 2016, 5:51:29 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/ippMonitor/raw/czartool_labels.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/raw/czartool_labels.php
r39498 r39804 80 80 81 81 $servers=array( 82 "addstar", 83 "addstarlap", 82 #"addstar", 83 #"addstarlap", 84 "ippqub:stdscience_ws", 84 85 "cleanup", 85 "detrend",86 #"detrend", 86 87 "distribution", 87 88 "pstamp", … … 270 271 createTableColumnHeader("Status (sec behind master)"); 271 272 showReplicationsStatus($REPL_HOST_GPC1, $REPL_USER_GPC1, $REPL_PASSWORD_GPC1, $REPL_DBNAME_GPC1); 272 273 showReplicationsStatus($REPL_HOST_NEBULOUS_SECONDARY, $REPL_USER_NEBULOUS_SECONDARY, $REPL_PASSWORD_NEBULOUS_SECONDARY, $REPL_DBNAME_NEBULOUS_SECONDARY); 273 274 # XXX EAM : problem showReplicationsStatus($REPL_HOST_NEBULOUS, $REPL_USER_NEBULOUS, $REPL_PASSWORD_NEBULOUS, $REPL_DBNAME_NEBULOUS); 274 275 showReplicationsStatus($REPL_HOST_PSTAMP, $REPL_USER_PSTAMP, $REPL_PASSWORD_PSTAMP, $REPL_DBNAME_PSTAMP); 275 276 showReplicationsStatus($REPL_HOST_IPPADMIN, $REPL_USER_IPPADMIN, $REPL_PASSWORD_IPPADMIN, $REPL_DBNAME_IPPADMIN); 276 277 showReplicationsStatus($REPL_HOST_ISP, $REPL_USER_ISP, $REPL_PASSWORD_ISP, $REPL_DBNAME_ISP); 277 showReplicationsStatus($REPL_HOST_NEBULOUS_SECONDARY, $REPL_USER_NEBULOUS_SECONDARY, $REPL_PASSWORD_NEBULOUS_SECONDARY, $REPL_DBNAME_NEBULOUS_SECONDARY);278 ## showReplicationsStatus($REPL_HOST_NEBULOUS_SECONDARY, $REPL_USER_NEBULOUS_SECONDARY, $REPL_PASSWORD_NEBULOUS_SECONDARY, $REPL_DBNAME_NEBULOUS_SECONDARY); 278 279 echo "</table>"; 279 280 … … 313 314 314 315 // list the results 315 while ( dbFetchInto($qry,$row)) {316 while ($qry->fetchInto($row)) { 316 317 317 318 echo "<tr>"; … … 358 359 359 360 // list the results 360 while ( dbFetchInto($qry,$expType)) {361 while ($qry->fetchInto($expType)) { 361 362 362 363 $sql = "SELECT COUNT(*) FROM summitExp WHERE dateobs > '$date' AND exp_type = '$expType[0]'"; 363 364 $qry2 = $projectdb->query($sql); 364 dbFetchInto($qry2,$summit);365 $qry2->fetchInto($summit); 365 366 $sql = "SELECT COUNT(*) FROM summitExp JOIN rawExp ON summitExp.exp_name = rawExp.exp_name WHERE summitExp.dateobs > '$date' AND summitExp.exp_type = '$expType[0]'"; 366 367 $qry2 = $projectdb->query($sql); 367 dbFetchInto($qry2,$mhpcc);368 $qry2->fetchInto($mhpcc); 368 369 369 370 echo "<tr>"; … … 397 398 $qry = $db->query($sql); 398 399 if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";} 399 while ( dbFetchInto($qry,$row)) {400 while ($qry->fetchInto($row)) { 400 401 401 402 $labels[] = $row[0]; … … 621 622 $qry = $db->query($sql); 622 623 if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";} 623 dbFetchInto($qry,$row);624 $qry->fetchInto($row); 624 625 625 626 return $row[0]; … … 655 656 $qry = $db->query($sql); 656 657 if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";} 657 dbFetchInto($qry,$row);658 $qry->fetchInto($row); 658 659 659 660 return $row[0]; … … 673 674 $qry = $db->query($sql); 674 675 if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";} 675 dbFetchInto($qry,$row);676 $qry->fetchInto($row); 676 677 677 678 $pending = $row[0]; … … 730 731 $dates = ""; 731 732 $firstIn = true; 732 while ( dbFetchInto($qry,$row)) {733 while ($qry->fetchInto($row)) { 733 734 734 735 if ($firstIn) { … … 887 888 $qry = $db->query($sql); 888 889 if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";} 889 dbFetchInto($qry,$row);890 $qry->fetchInto($row); 890 891 891 892 $alive = $row[0]; … … 906 907 $qry = $db->query($sql); 907 908 if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";} 908 dbFetchInto($qry,$row);909 $qry->fetchInto($row); 909 910 910 911 return $row[0]; … … 947 948 } 948 949 $res = $dbRepl->query('SHOW SLAVE STATUS'); 949 while ( dbFetchInto($res,$row)) {950 while ($res->fetchInto($row)) { 950 951 # Have a look for Last_Errno in http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html 951 952 $errorStatusInMySql = $row[18]; 952 953 $sec_behind = $row[32]; 953 $replStatus = ($errorStatusInMySql==0?"OK ($sec_behind)":"<font color=\"red\">PROBLEM</font>"); 954 if ($sec_behind===NULL) { 955 $sec_behind = 99999999; 956 $errorStatusInMySql = 999999999; 957 } 958 $replStatus = ($errorStatusInMySql==0?"OK ($sec_behind)":"<font style=\"BACKGROUND-COLOR: yellow\" color=\"red\">PROBLEM</font>"); 954 959 echo "<tr><td>$replDatabaseName</td><td>$replStatus</td></tr>"; 955 960 if ($errorStatusInMySql!=0) {
Note:
See TracChangeset
for help on using the changeset viewer.
