Changeset 33415 for branches/meh_branches/ppstack_test/ippMonitor
- Timestamp:
- Mar 5, 2012, 5:19:48 PM (14 years ago)
- Location:
- branches/meh_branches/ppstack_test
- Files:
-
- 26 edited
- 1 copied
-
. (modified) (1 prop)
-
ippMonitor (modified) (1 prop)
-
ippMonitor/INSTALL (modified) (1 diff)
-
ippMonitor/Makefile.in (modified) (1 diff)
-
ippMonitor/czartool/czarplot.pl (modified) (9 diffs)
-
ippMonitor/czartool/czarpoll.pl (modified) (5 diffs)
-
ippMonitor/czartool/czartool/CzarDb.pm (modified) (7 diffs)
-
ippMonitor/czartool/czartool/Gpc1Db.pm (modified) (1 diff)
-
ippMonitor/czartool/czartool/MetricsIndex.pm (modified) (1 diff)
-
ippMonitor/czartool/czartool/Pantasks.pm (modified) (1 diff)
-
ippMonitor/czartool/czartool/Plotter.pm (modified) (14 diffs)
-
ippMonitor/czartool/czartool/czarconfig.xml (modified) (2 diffs)
-
ippMonitor/def/chipProcessedImfile.d (modified) (1 diff)
-
ippMonitor/def/distRun.d (modified) (1 diff)
-
ippMonitor/def/lapExposures.d (modified) (1 diff)
-
ippMonitor/def/mopsStatus.d (modified) (1 diff)
-
ippMonitor/def/stackProcessedSkyfile_Images.d (modified) (1 diff)
-
ippMonitor/def/warpProcessedSkyfiles.d (modified) (1 diff)
-
ippMonitor/def/warpProcessedSkyfiles_Images.d (modified) (1 diff)
-
ippMonitor/raw/czartool_getplot.php (modified) (1 diff)
-
ippMonitor/raw/czartool_ipptopsps.php (copied) (copied from trunk/ippMonitor/raw/czartool_ipptopsps.php )
-
ippMonitor/raw/czartool_labels.php (modified) (12 diffs)
-
ippMonitor/raw/ipp.imfiles.dat (modified) (1 diff)
-
ippMonitor/raw/nightSummary.php (modified) (1 diff)
-
ippMonitor/raw/warpProcessedExp.php (modified) (1 diff)
-
ippMonitor/raw/warpProcessedExp_Images.php (modified) (13 diffs)
-
ippMonitor/scripts/skyplot.dvo (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppstack_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/ippMonitor
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20110710/ippMonitor (added) merged: 32337 /branches/eam_branches/ipp-20110906/ippMonitor (added) merged: 32630 /branches/eam_branches/ipp-20111110/ippMonitor (added) merged: 32694
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/ippMonitor/INSTALL
r27029 r33415 13 13 psconfigure --dbhost alala --dbuser ipp --dbpass ipp --htdocs /var/www/kiawe 14 14 15 ipp004 / ipp017 example: 16 psconfigure --dbhost ipp017 --dbuser ipp --dbpass ipp --htdocs ~ipp/htdocs 15 # note that we have a special version for ippmonitor without $PSCONFIG/$PSCONFDIR values: 16 ipp@ippdb03 / ippdb03 example: 17 psconfigure --dbhost ippdb01 --dbuser ipp --dbpass ipp --htdocs /var/www/localhost/htdocs --site ~/ippconfig/ippmonitor.config 17 18 18 ipp004 / ipp004 example:19 psconfigure --dbhost ipp004 --dbuser ipp --dbpass ipp --htdocs ~ipp/htdocs20 21 # note that we have a special version for ippmonitor without $PSCONFIG/$PSCONFDIR values:22 ipp@ipp004 / ippdb01 example:23 psconfigure --dbhost ippdb01 --dbuser ipp --dbpass ipp --htdocs ~/htdocs --site ~/ippconfig/ippmonitor.config24 -
branches/meh_branches/ppstack_test/ippMonitor/Makefile.in
r31816 r33415 60 60 $(DESTWWW)/czartool_getplot.php \ 61 61 $(DESTWWW)/czartool_exposures.php \ 62 $(DESTWWW)/czartool_ipptopsps.php \ 62 63 $(DESTWWW)/histogram.php \ 63 64 $(DESTWWW)/show_and_delete_image.php \ -
branches/meh_branches/ppstack_test/ippMonitor/czartool/czarplot.pl
r32093 r33415 25 25 my $magicMask = undef; 26 26 my $rateInterval = undef; 27 my $deriv = undef;28 27 my $nebulous = undef; 29 28 my $savingToFile = undef; 30 my $analysis = undef;31 29 my $exposureId = undef; 32 30 my $log = undef; 31 my $psps = undef; 33 32 34 33 GetOptions ( … … 46 45 "nebulous|n" => \$nebulous, 47 46 "rate|r" => \$rate, 48 "deriv|f" => \$deriv,49 "analysis|a" => \$analysis,50 47 "timeseries|t" => \$timeSeries, 51 48 "verbose|v" => \$verbose, 52 49 "log|g" => \$log, 50 "psps|u" => \$psps, 53 51 ); 54 52 … … 60 58 print "* UNKNKOWN: option @ARGV\n"; 61 59 } 62 if ($analysis && !$stage) {63 $quit = 1;64 print "* REQUIRED: choose a stage for analsis -s <chip|cam|warp|etc> (default=none)\n";}65 60 if (!$histogram) { 66 61 print "* OPTIONAL: plot histogram -h (default=off)\n";} … … 73 68 if (!$rate) { 74 69 print "* OPTIONAL: plot histogram of rate -r (default=off)\n";} 75 if (!$deriv) {76 $deriv = 0;77 print "* OPTIONAL: plot first derivative -f (default=$deriv)\n";}78 if (!$analysis) {79 $analysis = 0;80 print "* OPTIONAL: include analysis -a (default=$analysis)\n";}81 70 if (!$log) { 82 71 $log = 0; … … 94 83 print "* OPTIONAL: time interval for rate plot -i <'1 hour'|'1 day'|etc> (default=depends on time frame)\n";} 95 84 if (!$begin) { 96 print "* OPTIONAL: choose a begin time -b <datetime> (default= 6:35am this morning)\n";}85 print "* OPTIONAL: choose a begin time -b <datetime> (default=18:00)\n";} 97 86 if (!$end) { 98 87 print "* OPTIONAL: choose an end time -e <datetime> (default=now)\n";} … … 102 91 print "* OPTIONAL: choose an output location -o <path> (default=none)\n"; 103 92 } 93 if (!$psps) { 94 print "* OPTIONAL: plot ippToPsps stages -u (default=off)\n";} 104 95 print "*\n*******************************************************************************\n"; 105 96 … … 109 100 110 101 # default values 111 if (!$rate && !$magicMask && !$nebulous && !$histogram && !$ analysis && !$timeSeries) {$timeSeries = 1;}102 if (!$rate && !$magicMask && !$nebulous && !$histogram && !$timeSeries) {$timeSeries = 1;} 112 103 if (!$verbose) {$verbose = 0;} 113 104 if (!$save_temps) {$save_temps = 0;} … … 128 119 $plotter = czartool::Plotter->new_display($config, $save_temps); 129 120 } 121 122 if ($psps) {$plotter->setIppToPspsMode();} 130 123 131 124 # if a single day has been chosen … … 182 175 } 183 176 184 if($analysis) {185 186 my $stageMetrics = new czartool::StageMetrics($stage, $label, $begin, $end);187 if ($czarDb->runAnalysis($stageMetrics)) {$stageMetrics->printMe();}188 } -
branches/meh_branches/ppstack_test/ippMonitor/czartool/czarpoll.pl
r32095 r33415 37 37 38 38 39 my @stages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist", "pub"); 40 39 my @stages = ( 40 "burntool", 41 "chip", 42 "cam", 43 "fake", 44 "warp", 45 "stack", 46 "diff", 47 "magic", 48 "magicDS", 49 "dist", 50 "pub"); 51 52 my @ippToPspsStages = ( 53 "processed", 54 "loaded_to_datastore", 55 "loaded_to_ODM", 56 "merge_worthy", 57 "deleted_datastore", 58 "deleted_dxlayer", 59 "merged", 60 "deleted_local"); 61 62 my @allStages = (@stages, @ippToPspsStages); 41 63 42 64 timePoll($period); … … 219 241 220 242 updateAllStages($thisServer, $newState, $labels, $begin, $end); 221 createPlots($thisServer, $labels, $begin, $end);243 if ($thisServer eq "stdscience") {createPlots($thisServer, $labels, $begin, $end);} 222 244 } 223 245 else { print "* WARNING: no $thisServer labels found in Db\n";} … … 244 266 print "* Generating plots\n"; 245 267 268 # get ippToPsps labels 269 my $ippToPspsLabels = undef; 270 $czarDb->getCurrentIppToPspsLabels($begin, $end, \$ippToPspsLabels); 271 $plotter->setIppToPspsMode(); 272 273 # create ippToPsps labels 274 foreach $stage (@ippToPspsStages) { 275 foreach $row ( @{$ippToPspsLabels} ) { 276 my ($label) = @{$row}; 277 278 chomp($label); 279 $plotter->createTimeSeries($label, $stage, $begin, $end, 1, 0, 1); 280 } 281 } 282 283 # create plots for each label for all stages for ippToPsps 284 foreach $row ( @{$ippToPspsLabels} ) { 285 my ($label) = @{$row}; 286 287 $plotter->createTimeSeries($label, undef, $begin, $end, 1, 1, 1); 288 } 289 290 246 291 # create plots for each label for each stage 292 $plotter->setStandardMode(); 247 293 foreach $stage (@stages) { 248 294 foreach $row ( @{$rows} ) { … … 250 296 251 297 chomp($label); 252 $plotter->createTimeSeries($label, $stage, $begin, $end, 1, 1, 1);298 $plotter->createTimeSeries($label, $stage, $begin, $end, 1, 0, 1); 253 299 } 254 300 } … … 265 311 $allServerLabels = "all_".$server."_labels"; 266 312 267 $plotter->createTimeSeries($allServerLabels, undef, $begin, $end, 1, 1, 1);313 $plotter->createTimeSeries($allServerLabels, undef, $begin, $end, 1, 0, 1); 268 314 269 315 foreach $stage (@stages) { 270 316 271 $plotter->createTimeSeries($allServerLabels, $stage, $begin, $end, 1, 1, 1); # TODO must be a neater way...317 $plotter->createTimeSeries($allServerLabels, $stage, $begin, $end, 1, 0, 1); # TODO must be a neater way... 272 318 } 273 319 } -
branches/meh_branches/ppstack_test/ippMonitor/czartool/czartool/CzarDb.pm
r32093 r33415 8 8 use File::Temp; 9 9 10 my @stages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist", "pub"); # TODO put elsewhere 10 my @stages = ( 11 "burntool", 12 "chip", 13 "cam", 14 "fake", 15 "warp", 16 "stack", 17 "diff", 18 "magic", 19 "magicDS", 20 "dist", 21 "pub"); # TODO put elsewhere 22 23 my @ippToPspsStages = ( 24 "processed", 25 "loaded_to_datastore", 26 "loaded_to_ODM", 27 "merge_worthy", 28 "deleted_datastore", 29 "deleted_dxlayer", 30 "merged", 31 "deleted_local"); 32 33 my @allStages = (@stages, @ippToPspsStages); 11 34 12 35 use base 'czartool::MySQLDb'; … … 28 51 bless $self, $class; 29 52 30 $self->update();31 53 return $self; 32 54 } … … 34 56 ########################################################################### 35 57 # 36 # Gets current_labels table 58 # Gets current ippToPsps labels 59 # 60 ########################################################################### 61 sub getCurrentIppToPspsLabels { 62 my ($self, $begin, $end, $labels) = @_; 63 64 my $query = $self->{_db}->prepare(<<SQL); 65 66 SELECT DISTINCT label 67 FROM processed 68 WHERE timestamp >= '$begin' 69 AND timestamp <= '$end' 70 SQL 71 72 if (!$query->execute) {return 0;} 73 74 ${$labels} = $query->fetchall_arrayref(); 75 76 return 1; 77 } 78 79 ########################################################################### 80 # 81 # Gets current labels from the current_labels table 37 82 # 38 83 ########################################################################### … … 673 718 # times 674 719 $timeSep = $self->diffTimesInSecs($thisTimestamp, $lastTimestamp); 720 if ($timeSep == 0) {$timeSep = 1;}; # HACK to prevent divide-by-zero 721 675 722 $middleTime = $self->getMiddleTime($lastTimestamp, $thisTimestamp); 676 723 $formattedMiddleTimestamp = $self->getFormattedDate($middleTime); … … 1108 1155 my $stage = undef; 1109 1156 $totalDeleted = 0; 1110 foreach $stage (@ stages) {1157 foreach $stage (@allStages) { 1111 1158 1112 1159 if (!$self->getLabelsInThisTimePeriod($stage, $fromTime, $toTime, \$labels)) {next;} … … 1214 1261 1215 1262 my $stage = undef; 1216 foreach $stage (@ stages) {1263 foreach $stage (@allStages) { 1217 1264 1218 1265 $self->optimizeTable($stage); … … 1342 1389 } 1343 1390 1344 ###########################################################################1345 #1346 # Update Db to newest version1347 #1348 ###########################################################################1349 sub update {1350 my ($self) = @_;1351 1352 my $currentRevision = -1;1353 1354 while (1) {1355 1356 $currentRevision = $self->getRevision();1357 if ($self->{_verbose}) {print "* Current Db revision = $currentRevision\n";}1358 1359 if ($currentRevision == 0) {$self->createRevision_1();}1360 elsif ($currentRevision == 1) {$self->createRevision_2();}1361 elsif ($currentRevision == 2) {$self->createRevision_3();}1362 elsif ($currentRevision == 3) {$self->createRevision_4();}1363 elsif ($currentRevision == 4) {$self->createRevision_5();}1364 elsif ($currentRevision == 5) {$self->createRevision_6();}1365 elsif ($currentRevision == 6) {$self->createRevision_7();}1366 elsif ($currentRevision == 7) {$self->createRevision_8();}1367 elsif ($currentRevision == 8) {$self->createRevision_9();}1368 elsif ($currentRevision == 9) {$self->createRevision_10();}1369 elsif ($currentRevision == 10) {$self->createRevision_11();}1370 elsif ($currentRevision == 11) {$self->createRevision_12();}1371 elsif ($currentRevision == 12) {$self->createRevision_13();}1372 else {last;}1373 }1374 }1375 1376 #######################################################################################1377 #1378 # Sets current revision of ippToPsps database1379 #1380 #######################################################################################1381 sub setRevision {1382 my ($self, $revision) = @_;1383 1384 my $query = $self->{_db}->prepare(<<SQL);1385 INSERT INTO revision (revision) VALUES ($revision);1386 SQL1387 $query->execute;1388 }1389 1390 #######################################################################################1391 #1392 # Gets current revision of ippToPsps database1393 #1394 #######################################################################################1395 sub getRevision {1396 my ($self) = @_;1397 1398 if (!$self->SUPER::doesTableExist("revision")) {return 0;}1399 1400 my $query = $self->{_db}->prepare(<<SQL);1401 SELECT revision1402 FROM revision1403 ORDER BY revision DESC LIMIT 1;1404 SQL1405 1406 $query->execute;1407 my @row = $query->fetchrow_array();1408 1409 return $row[0];1410 }1411 1412 #######################################################################################1413 #1414 # Create revision 1 of the database1415 #1416 #######################################################################################1417 sub createRevision_1 {1418 my ($self) = @_;1419 1420 print "* Creating revision 1 of '$self->{_dbName}'\n";1421 1422 my $query = $self->{_db}->prepare(<<SQL);1423 CREATE TABLE revision (1424 revision INT,1425 created TIMESTAMP DEFAULT NOW(),1426 primary key (revision)1427 );1428 SQL1429 $query->execute;1430 1431 my $stage = undef;1432 foreach $stage (@stages) {1433 1434 my $query = $self->{_db}->prepare(<<SQL);1435 CREATE TABLE $stage (1436 timestamp TIMESTAMP DEFAULT NOW(),1437 label VARCHAR(128) DEFAULT "NONE",1438 pending BIGINT NOT NULL,1439 faults BIGINT NOT NULL1440 );1441 SQL1442 $query->execute;1443 1444 }1445 1446 $self->setRevision(1);1447 }1448 1449 #######################################################################################1450 #1451 # Create revision 2 of the database1452 #1453 #######################################################################################1454 sub createRevision_2 {1455 my ($self) = @_;1456 1457 print "* Creating revision 2 of '$self->{_dbName}'\n";1458 1459 1460 my $stage = undef;1461 foreach $stage (@stages) {1462 1463 my $query = $self->{_db}->prepare(<<SQL);1464 ALTER TABLE $stage1465 ADD COLUMN reverting TINYINT NOT NULL DEFAULT 0;1466 SQL1467 $query->execute;1468 1469 }1470 1471 $self->setRevision(2);1472 }1473 1474 #######################################################################################1475 #1476 # Create revision 3 of the database1477 #1478 #######################################################################################1479 sub createRevision_3 {1480 my ($self) = @_;1481 1482 print "* Creating revision 3 of '$self->{_dbName}'\n";1483 1484 1485 my $stage = undef;1486 foreach $stage (@stages) {1487 1488 my $query = $self->{_db}->prepare(<<SQL);1489 ALTER TABLE $stage1490 ADD COLUMN processed BIGINT NOT NULL DEFAULT 0;1491 SQL1492 1493 $query->execute;1494 }1495 1496 $self->setRevision(3);1497 }1498 1499 #######################################################################################1500 #1501 # Create revision 4 of the database1502 #1503 #######################################################################################1504 sub createRevision_4 {1505 my ($self) = @_;1506 1507 print "* Creating revision 4 of '$self->{_dbName}'\n";1508 1509 my $query = $self->{_db}->prepare(<<SQL);1510 CREATE TABLE current_labels (server VARCHAR(128), label VARCHAR(128));1511 SQL1512 1513 $query->execute;1514 1515 $self->setRevision(4);1516 }1517 1518 #######################################################################################1519 #1520 # Create revision 5 of the database1521 #1522 #######################################################################################1523 sub createRevision_5 {1524 my ($self) = @_;1525 1526 print "* Creating revision 5 of '$self->{_dbName}'\n";1527 1528 my $query = $self->{_db}->prepare(<<SQL);1529 CREATE TABLE servers (1530 timestamp TIMESTAMP DEFAULT NOW(),1531 server VARCHAR(128),1532 alive TINYINT, running TINYINT);1533 SQL1534 1535 $query->execute;1536 1537 $self->setRevision(5);1538 }1539 1540 #######################################################################################1541 #1542 # Create revision 6 of the database1543 #1544 #######################################################################################1545 sub createRevision_6 {1546 my ($self) = @_;1547 1548 print "* Creating revision 6 of '$self->{_dbName}'\n";1549 1550 my $stage = undef;1551 my $index = undef;1552 foreach $stage (@stages) {1553 1554 $index = $stage . "Index";1555 my $query = $self->{_db}->prepare(<<SQL);1556 CREATE INDEX $index ON $stage (timestamp, label);1557 SQL1558 1559 $query->execute;1560 }1561 1562 my $query = $self->{_db}->prepare(<<SQL);1563 CREATE INDEX serverIndex ON servers (timestamp, server);1564 SQL1565 1566 $query->execute;1567 1568 1569 $self->setRevision(6);1570 }1571 1572 #######################################################################################1573 #1574 # Create revision 7 of the database1575 #1576 #######################################################################################1577 sub createRevision_7 {1578 my ($self) = @_;1579 1580 print "* Creating revision 7 of '$self->{_dbName}'\n";1581 1582 my $query = $self->{_db}->prepare(<<SQL);1583 ALTER TABLE current_labels1584 ADD COLUMN priority INT NOT NULL DEFAULT 0;1585 SQL1586 1587 $query->execute;1588 1589 $self->setRevision(7);1590 }1591 1592 #######################################################################################1593 #1594 # Create revision 8 of the database1595 #1596 #######################################################################################1597 sub createRevision_8 {1598 my ($self) = @_;1599 1600 print "* Creating revision 8 of '$self->{_dbName}'\n";1601 1602 # drop reverting column from all stages tables1603 my $stage = undef;1604 foreach $stage (@stages) {1605 1606 my $query = $self->{_db}->prepare(<<SQL);1607 ALTER TABLE $stage1608 DROP COLUMN reverting;1609 SQL1610 1611 $query->execute;1612 }1613 1614 # create new 'revert' table1615 my $query = $self->{_db}->prepare(<<SQL);1616 CREATE TABLE reverts (1617 stage VARCHAR(128),1618 reverting TINYINT);1619 SQL1620 1621 $query->execute;1622 1623 # insert stages into revert table1624 foreach $stage (@stages) {1625 my $query = $self->{_db}->prepare(<<SQL);1626 INSERT INTO reverts1627 (stage, reverting)1628 VALUES1629 ('$stage', 0);1630 SQL1631 $query->execute;1632 }1633 1634 $self->setRevision(8);1635 }1636 1637 #######################################################################################1638 #1639 # Create revision 9 of the database1640 #1641 #######################################################################################1642 sub createRevision_9 {1643 my ($self) = @_;1644 1645 print "* Creating revision 9 of '$self->{_dbName}'\n";1646 1647 my $query = $self->{_db}->prepare(<<SQL);1648 CREATE TABLE cluster_space (1649 timestamp TIMESTAMP DEFAULT NOW(),1650 total FLOAT,1651 available FLOAT,1652 used FLOAT,1653 hostsOver98 SMALLINT);1654 SQL1655 1656 $query->execute;1657 $query = $self->{_db}->prepare(<<SQL);1658 CREATE TABLE hosts (1659 host VARCHAR(128),1660 total FLOAT,1661 available FLOAT,1662 used FLOAT);1663 SQL1664 1665 $query->execute;1666 1667 $query = $self->{_db}->prepare(<<SQL);1668 CREATE INDEX clusterSpaceIndex ON cluster_space (timestamp);1669 SQL1670 1671 $query->execute;1672 1673 $self->setRevision(9);1674 }1675 1676 #######################################################################################1677 #1678 # Create revision 10 of the database1679 #1680 #######################################################################################1681 sub createRevision_10 {1682 my ($self) = @_;1683 1684 print "* Creating revision 10 of '$self->{_dbName}'\n";1685 1686 my $query = $self->{_db}->prepare(<<SQL);1687 ALTER TABLE hosts1688 ADD COLUMN writable TINYINT NOT NULL DEFAULT 0,1689 ADD COLUMN readable TINYINT NOT NULL DEFAULT 0;1690 SQL1691 1692 $query->execute;1693 1694 $self->setRevision(10);1695 }1696 1697 #######################################################################################1698 #1699 # Create revision 11 of the database1700 #1701 #######################################################################################1702 sub createRevision_11 {1703 my ($self) = @_;1704 1705 print "* Creating revision 11 of '$self->{_dbName}'\n";1706 1707 # same shape as other stage tables to enable easy update1708 #my $query = $self->{_db}->prepare(<<SQL);1709 #CREATE TABLE burntool (1710 # timestamp TIMESTAMP DEFAULT NOW(),1711 # label VARCHAR(128) DEFAULT "NONE",1712 # pending BIGINT NOT NULL,1713 # processed BIGINT NOT NULL,1714 # faults BIGINT NOT NULL);1715 #SQL1716 1717 # $query->execute;1718 # $query = $self->{_db}->prepare(<<SQL);1719 # CREATE INDEX burntoolIndex ON burntool (timestamp, label);1720 #SQL1721 1722 # $query->execute;1723 1724 $self->setRevision(11);1725 }1726 1727 #######################################################################################1728 #1729 # Create revision 12 of the database1730 #1731 # - adding nightlyscience table1732 #1733 #######################################################################################1734 sub createRevision_12 {1735 my ($self) = @_;1736 1737 print "* Creating revision 12 of '$self->{_dbName}'\n";1738 1739 my $query = $self->{_db}->prepare(<<SQL);1740 CREATE TABLE nightlyscience (1741 timestamp TIMESTAMP DEFAULT NOW(),1742 status VARCHAR(128) DEFAULT "NONE");1743 SQL1744 1745 $query->execute;1746 1747 $self->setRevision(12);1748 }1749 #######################################################################################1750 #1751 # Create revision 13 of the database1752 #1753 # adding server_dates table1754 #1755 #######################################################################################1756 sub createRevision_13 {1757 my ($self) = @_;1758 1759 print "* Creating revision 13 of '$self->{_dbName}'\n";1760 1761 my $query = $self->{_db}->prepare(<<SQL);1762 CREATE TABLE server_dates (1763 timestamp TIMESTAMP DEFAULT NOW(),1764 server VARCHAR(64) DEFAULT "NONE",1765 date VARCHAR(64) DEFAULT "NONE");1766 SQL1767 1768 $query->execute;1769 1770 $self->setRevision(13);1771 }1772 1391 1; 1773 1392 -
branches/meh_branches/ppstack_test/ippMonitor/czartool/czartool/Gpc1Db.pm
r32093 r33415 233 233 234 234 } 235 # 'new' stuff really includes 'update' stuff, at least for LAP. This is a hack, but there you go 236 elsif ($state eq "new") { 237 238 $query = $self->{_db}->prepare(<<SQL); 239 SELECT COUNT(state) 240 FROM $table 241 WHERE label LIKE '$label' 242 AND (state = 'new' OR state = 'update') 243 SQL 244 } 235 245 else { 236 246 -
branches/meh_branches/ppstack_test/ippMonitor/czartool/czartool/MetricsIndex.pm
r32093 r33415 54 54 my $htmlFile = $self->{htmlFile}; 55 55 56 print $htmlFile "<img src=\"masterMask.png\" alt=\"master magic mask fraction plot\" />\n";57 print $htmlFile "<img src=\"masterPro.png\" alt=\"master MD processing plot\" />\n";56 #print $htmlFile "<img src=\"masterMask.png\" alt=\"master magic mask fraction plot\" />\n"; 57 #print $htmlFile "<img src=\"masterPro.png\" alt=\"master MD processing plot\" />\n"; 58 58 59 59 opendir(DIR, $self->{path}) or die $!; -
branches/meh_branches/ppstack_test/ippMonitor/czartool/czartool/Pantasks.pm
r32102 r33415 10 10 "addstarlap", 11 11 "cleanup", 12 "deepstack", 12 13 "detrend", 13 14 "distribution", -
branches/meh_branches/ppstack_test/ippMonitor/czartool/czartool/Plotter.pm
r32093 r33415 10 10 use czartool::Config; 11 11 12 my @allStages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist", "pub"); 12 my @allStages = ( 13 "burntool", 14 "chip", 15 "cam", 16 "fake", 17 "warp", 18 "stack", 19 "diff", 20 "magic", 21 "magicDS", 22 "dist", 23 "pub"); 24 25 my @allIppToPspsStages = ( 26 "processed", 27 "loaded_to_datastore", 28 "loaded_to_ODM", 29 "merge_worthy", 30 "deleted_datastore", 31 "deleted_dxlayer", 32 "merged", 33 "deleted_local"); 34 13 35 14 36 ########################################################################### … … 75 97 ########################################################################### 76 98 # 99 # Sets plotter to use standard IPP mode, i.e. chip, cam etc 100 # 101 ########################################################################### 102 sub setStandardMode { 103 my ($self) = @_; 104 105 $self->{allStages} = \@allStages; 106 } 107 108 ########################################################################### 109 # 110 # Sets plotter to use ippToPsps mode, i.e. processed, loaded_to_datastore etc 111 # 112 ########################################################################### 113 sub setIppToPspsMode { 114 my ($self) = @_; 115 116 $self->{allStages} = \@allIppToPspsStages; 117 } 118 119 ########################################################################### 120 # 77 121 # Some initialisation code common to all constructors 78 122 # … … 83 127 $self->{_gpc1Db} = $self->{_config}->getGpc1Instance(); 84 128 $self->{_czarDb} = $self->{_config}->getCzarDbInstance(); 129 $self->setStandardMode(); 85 130 } 86 131 … … 140 185 my $stages = undef; 141 186 if (!$selectedStage) { 142 $stages = \@ allStages;187 $stages = \@{$self->{allStages}}; 143 188 $selectedStage = 'all_stages'; 144 189 } … … 203 248 "set style histogram rowstacked;" . 204 249 "set style fill solid border -1;" . 205 "set ylabel \" Exposures processed per $interval\";" .250 "set ylabel \"Items processed per $interval\";" . 206 251 "set boxwidth 0.75;" . 207 252 "plot "; 208 253 209 254 my $first = 1; 210 foreach my $stage (@ allStages) {255 foreach my $stage (@{$self->{allStages}}) { 211 256 212 257 … … 226 271 ########################################################################### 227 272 # 228 # Plots a time series for all stagesfor this label273 # Plots a time series for all or one stage for this label 229 274 # 230 275 ########################################################################### … … 238 283 my $stages = undef; 239 284 240 if (!$selectedStage) {$stages = \@ allStages;}285 if (!$selectedStage) {$stages = \@{$self->{allStages}};} 241 286 else {$stages = ["$selectedStage"]}; 242 287 … … 297 342 $timeDiff, 298 343 "", 299 " Exposures");344 "Items"); 300 345 } 301 346 … … 314 359 $timeDiff, 315 360 "", 316 "Log( Exposures)");361 "Log(Items)"); 317 362 } 318 363 … … 331 376 $timeDiff, 332 377 "", 333 " Exposures per hour");378 "Items per hour"); 334 379 } 335 380 } … … 351 396 my $stage = undef; 352 397 my $pendingMinusFaults = undef; 353 foreach $stage (@ allStages) {398 foreach $stage (@{$self->{allStages}}) { 354 399 355 400 if (!$self->{_czarDb}->countProcessedPendingAndFaults( … … 381 426 "set style histogram rowstacked;" . 382 427 "set style fill solid border -1;" . 383 "set ylabel \" Exposures\";" .428 "set ylabel \"Items\";" . 384 429 "set boxwidth 0.75;" . 385 430 "plot '".$tmpFile->filename."' using 2:xtic(1) title \"Faults\" lt 1, '' using 3 title \"Processed\" lt 2, '' using 4 title \"Pending\" lt 7;" . … … 520 565 my $firstIn = 1; 521 566 # loop through stages array so that they are ordered properly (not maintained in hash) 522 foreach my $stage (@allStages) { 567 #foreach my $stage (@allStages) { 568 foreach my $stage (@{$self->{allStages}}) { 523 569 524 570 if(!$gnuplotFiles->{$stage}) {next;} … … 620 666 "set title \"Nebulous disk use across IPP cluster ($totalPercent of total allocated)\";" . 621 667 "set style fill solid 1.00 border -1;" . 668 "set key center top;" . 622 669 "set style histogram rowstacked;" . 623 670 "set style data histograms;" . -
branches/meh_branches/ppstack_test/ippMonitor/czartool/czartool/czarconfig.xml
r32096 r33415 9 9 <font>/usr/share/fonts/corefonts/arial.ttf</font> 10 10 <size>8</size> 11 <path>/data/ipp00 4.0/czartool_plots</path>11 <path>/data/ipp009.0/czartool_plots</path> 12 12 </gnuplot> 13 13 … … 22 22 <name>gpc1</name> 23 23 <host>ippdb01</host> 24 <user>ipp user</user>25 <password>ipp user</password>24 <user>ippMonitor</user> 25 <password>ippMonitor</password> 26 26 </gpc1database> 27 27 -
branches/meh_branches/ppstack_test/ippMonitor/def/chipProcessedImfile.d
r27892 r33415 9 9 WHERE chipProcessedImfile.chip_id = chipRun.chip_id 10 10 WHERE chipProcessedImfile.fault = 0 11 12 #UNRESTRICTED WHERE 0=1 11 13 12 14 ARGS ARG1 rawImfile.exp_id=$rawExp.exp_id -
branches/meh_branches/ppstack_test/ippMonitor/def/distRun.d
r28597 r33415 7 7 8 8 WHERE distRun.dist_id = distComponent.dist_id 9 UNRESTRICTED AND 0=1 9 10 10 11 # field size format name show link to extras -
branches/meh_branches/ppstack_test/ippMonitor/def/lapExposures.d
r31816 r33415 6 6 UNRESTRICTED WHERE 0=1 7 7 8 ARGS ARG1 rawImfile.exp_id=$lapExp.exp_id9 ARGS ARG2 chipRun.chip_id=$lapExp.chip_id10 ARGS ARG3 chipRun.chip_id=$lapExp.pair_id11 ARGS ARG4 camRun.cam_id=$camRun1.cam_id12 ARGS ARG5 camRun.cam_id=$camRun2.cam_id13 ARGS ARG6 fakeRun.fake_id=$fakeRun1.fake_id14 ARGS ARG7 fakeRun.fake_id=$fakeRun2.fake_id15 ARGS ARG8 warpRun.warp_id=$warpRun1.warp_id16 ARGS ARG9 warpRun.warp_id=$warpRun2.warp_id17 ARGS ARG10 diffRun.diff_id=$diffRun.diff_id8 ARGS ARG1 rawImfile.exp_id=$lapExp.exp_id 9 ARGS ARG2 chipRun.chip_id=$lapExp.chip_id 10 ARGS ARG3 chipRun.chip_id=$lapExp.pair_id 11 ARGS ARG4 camRun.cam_id=$camRun1.cam_id 12 ARGS ARG5 camRun.cam_id=$camRun2.cam_id 13 ARGS ARG6 fakeRun.fake_id=$fakeRun1.fake_id 14 ARGS ARG7 fakeRun.fake_id=$fakeRun2.fake_id 15 ARGS ARG8 warpRun.warp_id=$warpRun1.warp_id 16 ARGS ARG9 warpRun.warp_id=$warpRun2.warp_id 17 ARGS ARG10 diffRun.diff_id=$diffRun.diff_id 18 18 19 # field size format name show link to extras 20 FIELD lapRun.seq_id, 6, %d, seq_id 21 FIELD lapExp.lap_id, 6, %d, lap_id 22 FIELD lapExp.data_state, 6, %s, State (lapExp) 23 FIELD lapExp.exp_id, 6, %d, Exp ID, value, rawImfile.php, ARG1 24 FIELD lapExp.chip_id, 6, %d, Chip1 (lapExp.chip_id), value, chipStageExp.php, ARG2 25 FIELD chipRun1.state AS ch1state, 6, %s, Chip1 State 26 FIELD camRun1.cam_id AS cam_id_1, 6, %d, Cam1 ID, value, camStageExp.php, ARG4 27 FIELD camRun1.state AS ca1state, 6, %s, Cam1 State 28 FIELD fakeRun1.fake_id AS fake_id_1, 6, %d, Fake1 ID, value, fakeStageExp.php, ARG6 29 FIELD fakeRun1.state AS fa1state, 6, %s, Fake1 State 30 FIELD warpRun1.warp_id AS warp_id_1, 6, %d, Warp1 ID, value, warpStageExp.php, ARG8 31 FIELD warpRun1.state AS wa1state, 6, %s, Warp1 State 32 FIELD lapExp.pair_id, 6, %d, Chip2 ID (lapExp.chip_id), value, chipStageExp.php, ARG3 33 FIELD chipRun2.state AS ch2state, 6, %s, Chip2 State 34 FIELD camRun2.cam_id AS cam_id_2, 6, %d, Cam2 ID, value, camStageExp.php, ARG5 35 FIELD camRun2.state AS ca2state, 6, %s, Cam2 State 36 FIELD fakeRun2.fake_id AS fake_id_2, 6, %d, Fake2 ID, value, fakeStageExp.php, ARG7 37 FIELD fakeRun2.state AS fa2state, 6, %s, Fake2 State 38 FIELD warpRun2.warp_id AS warp_id_2, 6, %d, Warp2 ID, value, warpStageExp.php, ARG9 39 FIELD warpRun2.state AS wa2state, 6, %s, Warp2 State 40 FIELD diffRun.diff_id, 6, %d, Diff ID, value, diffStageExp.php, ARG10 41 FIELD diffRun.state AS diState, 6, %s, Diff State 42 FIELD lapRun.tess_id, 8, %s, tess_id 43 FIELD lapRun.projection_cell, 10, %s, ProjCell 44 FIELD lapRun.filter, 7, %s, Filter 45 FIELD lapRun.state, 15, %s, State (lapRun) 46 FIELD lapRun.label, 15, %s, Label 47 FIELD lapRun.dist_group, 15, %s, Dist Group 48 FIELD lapRun.registered, 19, %T, Registered 49 FIELD lapRun.fault, 3, %d, fault 50 FIELD lapRun.quick_sass_id, 6, %d, quick_sass_id 51 FIELD lapRun.final_sass_id, 6, %d, final_sass_id 52 FIELD lapExp.private, 2, %d, Private 53 FIELD lapExp.pairwise, 2, %d, Pairwise 54 FIELD lapExp.active, 2, %d, Active 55 FIELD rawExp.dateobs, 19, %T, Date/Time 56 FIELD rawExp.object, 8, %s, Object 57 FIELD rawExp.comment, 80, %s, Comment 19 # field size format name show link to extras 20 FIELD lapRun.seq_id, 6, %d, seq_id 21 FIELD lapExp.lap_id, 6, %d, lap_id 22 FIELD lapExp.data_state, 6, %s, State (lapExp) 23 FIELD lapExp.exp_id, 6, %d, Exp ID, value, rawImfile.php, ARG1 24 FIELD lapExp.chip_id, 6, %d, Chip1 (lapExp.chip_id), value, chipStageExp.php, ARG2 25 FIELD chipRun1.state AS ch1state, 6, %s, Chip1 State 26 FIELD camRun1.cam_id AS cam_id_1, 6, %d, Cam1 ID, value, camStageExp.php, ARG4 27 FIELD camRun1.state AS ca1state, 6, %s, Cam1 State 28 FIELD fakeRun1.fake_id AS fake_id_1, 6, %d, Fake1 ID, value, fakeStageExp.php, ARG6 29 FIELD fakeRun1.state AS fa1state, 6, %s, Fake1 State 30 FIELD warpRun1.warp_id AS warp_id_1, 6, %d, Warp1 ID, value, warpStageExp.php, ARG8 31 FIELD warpRun1.state AS wa1state, 6, %s, Warp1 State 32 FIELD lapExp.pair_id, 6, %d, Chip2 ID (lapExp.chip_id), value, chipStageExp.php, ARG3 33 FIELD chipRun2.state AS ch2state, 6, %s, Chip2 State 34 FIELD camRun2.cam_id AS cam_id_2, 6, %d, Cam2 ID, value, camStageExp.php, ARG5 35 FIELD camRun2.state AS ca2state, 6, %s, Cam2 State 36 FIELD fakeRun2.fake_id AS fake_id_2, 6, %d, Fake2 ID, value, fakeStageExp.php, ARG7 37 FIELD fakeRun2.state AS fa2state, 6, %s, Fake2 State 38 FIELD warpRun2.warp_id AS warp_id_2, 6, %d, Warp2 ID, value, warpStageExp.php, ARG9 39 FIELD warpRun2.state AS wa2state, 6, %s, Warp2 State 40 FIELD diffRun.diff_id, 6, %d, Diff ID, value, diffStageExp.php, ARG10 41 FIELD diffRun.state AS diState, 6, %s, Diff State 42 FIELD lapRun.tess_id, 8, %s, tess_id 43 FIELD lapRun.projection_cell, 10, %s, ProjCell 44 FIELD diffInputSkyfile.skycell_id, 10, %s, Skycell ID 45 FIELD lapRun.filter, 7, %s, Filter 46 FIELD lapRun.state, 15, %s, State (lapRun) 47 FIELD lapRun.label, 15, %s, Label 48 FIELD lapRun.dist_group, 15, %s, Dist Group 49 FIELD lapRun.registered, 19, %T, Registered 50 FIELD lapRun.fault, 3, %d, fault 51 FIELD lapRun.quick_sass_id, 6, %d, quick_sass_id 52 FIELD lapRun.final_sass_id, 6, %d, final_sass_id 53 FIELD lapExp.private, 2, %d, Private 54 FIELD lapExp.pairwise, 2, %d, Pairwise 55 FIELD lapExp.active, 2, %d, Active 56 FIELD rawExp.dateobs, 19, %T, Date/Time 57 FIELD rawExp.object, 8, %s, Object 58 FIELD rawExp.comment, 80, %s, Comment 58 59 59 60 # MODE summary -
branches/meh_branches/ppstack_test/ippMonitor/def/mopsStatus.d
r32060 r33415 5 5 #WHERE rawExp.obs_mode!='ENGINEERING' 6 6 7 UNRESTRICTED WHERE dateobs>=DATE(NOW()) AND rawExp.obs_mode!='ENGINEERING' 7 UNRESTRICTED WHERE dateobs>=DATE(NOW()) AND rawExp.obs_mode!='ENGINEERING' AND rawExp.obs_mode!='STS' AND rawExp.obs_mode!='M31' AND rawExp.obs_mode!='CNP' 8 8 9 9 # OP OP1 ($ddiff_id > 0 ? $ddiff_id : $tdiff_id) -
branches/meh_branches/ppstack_test/ippMonitor/def/stackProcessedSkyfile_Images.d
r27892 r33415 18 18 19 19 # field size format name show link to extras 20 FIELD stackRun.stack_id, 5, % s, Stack ID20 FIELD stackRun.stack_id, 5, %d, Stack ID 21 21 FIELD stackRun.skycell_id, 5, %s, Skycell ID 22 22 FIELD stackRun.label, 5, %s, Label 23 23 FIELD stackRun.data_group, 5, %s, data grp 24 24 FIELD stackRun.dist_group, 5, %s, dist grp 25 FIELD stackSumSkyfile.quality, 5, %d, quality 25 26 FIELD *, 8, %s, image, image=JPEG2, stackProcessedSkyfile_Images.php, ARG7 26 27 FIELD stackRun.filter, 5, %s, Filter -
branches/meh_branches/ppstack_test/ippMonitor/def/warpProcessedSkyfiles.d
r27892 r33415 1 TABLE warpSkyfile, warpRun, fakeRun, camRun, chipRun, rawExp1 TABLE rawExp JOIN chipRun USING(exp_id) JOIN camRun USING(chip_id) JOIN fakeRun USING(cam_id) JOIN warpRun USING(fake_id) JOIN warpSkyfile USING(warp_id) 2 2 TITLE Warp Processed Skyfiles 3 3 FILE warpProcessedSkyfiles.php 4 4 MENU ipp.science.dat 5 5 6 WHERE warpSkyfile.warp_id = warpRun.warp_id 7 WHERE warpRun.fake_id = fakeRun.fake_id 8 WHERE fakeRun.cam_id = camRun.cam_id 9 WHERE camRun.chip_id = chipRun.chip_id 10 WHERE chipRun.exp_id = rawExp.exp_id 11 WHERE warpSkyfile.fault = 0 6 UNRESTRICTED WHERE 0=1 12 7 13 8 ARGS ARG1 rawImfile.exp_id=$rawExp.exp_id -
branches/meh_branches/ppstack_test/ippMonitor/def/warpProcessedSkyfiles_Images.d
r27892 r33415 1 TABLE warpSkyfile, warpRun, fakeRun, camRun, chipRun, rawExp1 TABLE rawExp JOIN chipRun USING(exp_id) JOIN camRun USING(chip_id) JOIN fakeRun USING(cam_id) JOIN warpRun USING(fake_id) JOIN warpSkyfile USING(warp_id) 2 2 TITLE Warp Processed Skyfiles 3 3 FILE warpProcessedSkyfiles.php 4 4 MENU ipp.science.dat 5 5 6 WHERE warpSkyfile.warp_id = warpRun.warp_id 7 WHERE warpRun.fake_id = fakeRun.fake_id 8 WHERE fakeRun.cam_id = camRun.cam_id 9 WHERE camRun.chip_id = chipRun.chip_id 10 WHERE chipRun.exp_id = rawExp.exp_id 11 WHERE warpSkyfile.fault = 0 6 UNRESTRICTED WHERE 0=1 7 8 # WHERE warpSkyfile.warp_id = warpRun.warp_id 9 # WHERE warpRun.fake_id = fakeRun.fake_id 10 # WHERE fakeRun.cam_id = camRun.cam_id 11 # WHERE camRun.chip_id = chipRun.chip_id 12 # WHERE chipRun.exp_id = rawExp.exp_id 13 # WHERE warpSkyfile.fault = 0 12 14 13 15 # define image names to be used below -
branches/meh_branches/ppstack_test/ippMonitor/raw/czartool_getplot.php
r32094 r33415 18 18 $plottype = $_GET[plottype]; 19 19 20 $path = "/data/ipp00 4.0/czartool_plots/"; # TODO horrible hard-coded path - read from config20 $path = "/data/ipp009.0/czartool_plots"; # TODO horrible hard-coded path - read from config 21 21 22 22 if ($label == "all") $label = "all_".$mode."_labels"; -
branches/meh_branches/ppstack_test/ippMonitor/raw/czartool_labels.php
r32101 r33415 27 27 menu($myMenu, 'Czartool on '.$lastUpdateTime, 'ipp.css', $ID['link'], $ID['proj']); 28 28 29 $states=array("full","new","drop","wait"); 30 $stages=array("burntool", "chip","cam","fake","warp","stack","diff","magic","magicDS","dist", "pub"); 29 $stages=array( 30 "burntool", 31 "chip", 32 "cam", 33 "fake", 34 "warp", 35 "stack", 36 "diff", 37 "magic", 38 "magicDS", 39 "dist", 40 "pub"); 41 31 42 $servers=array( 32 43 "addstar", … … 41 52 "replication", 42 53 "stack", 54 "deepstack", 43 55 "stdscience", 44 56 "summitcopy"); … … 149 161 echo "<br>"; 150 162 echo $table; 151 #"<table width=\"$width\" align=\"middle\" border=\"1\" cellspacing=\"0\" cellpadding=\"4\" style=\"font-size:80%\">\n"; 163 152 164 createTableTitle("Status and links", 3); 153 165 echo "<tr>\n"; … … 157 169 echo "<tr><td>Postage stamp server status</td><td><a href=\"http://pstamp.ipp.ifa.hawaii.edu/status.php\"><font color=\"blue\">here</font></a></td></tr>"; 158 170 echo "<tr><td>Documentation</td><td><a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Processing\"><font color=\"blue\">here</font></a></td></tr>"; 159 echo "<tr><td>Cluster load</td><td><a href=\"http://ganglia.pan-starrs.ifa.hawaii.edu/?r=hour&s=descending&hc=6&c=IPP%2520Production\"><font color=\"blue\">here</font></a> </td></tr>";160 echo "<tr><td>Who's using the cluster?</td><td><a href=\"http://ipp 004.ifa.hawaii.edu/clusterMonitor/top.html\"><font color=\"blue\">here</font></a></td></tr>";161 echo "<tr><td>IPP metrics</td><td><a href=\"http://ipp00 4.ifa.hawaii.edu/ippMetrics\"><font color=\"blue\">here</font></a></td></tr>";171 echo "<tr><td>Cluster load</td><td><a href=\"http://ganglia.pan-starrs.ifa.hawaii.edu/?r=hour&s=descending&hc=6&c=IPP%2520Production\"><font color=\"blue\">here</font></a> <a href=\"http://ganglia.pan-starrs.ifa.hawaii.edu/?m=cpu_report&r=hour&s=by%2520name&c=IPP+Production&h=&sh=1&hc=8&z=small\"><font color=\"blue\">cpu_report</font></a></td></tr>"; 172 echo "<tr><td>Who's using the cluster?</td><td><a href=\"http://ippmonitor.ipp.ifa.hawaii.edu/ippMonitor/clusterMonitor/top.html\"><font color=\"blue\">here</font></a></td></tr>"; 173 echo "<tr><td>IPP metrics</td><td><a href=\"http://ipp0022.ifa.hawaii.edu/ps1sc/ippMetrics\"><font color=\"blue\">here</font></a></td></tr>"; 162 174 echo "<tr><td>Czar log pages</td><td><a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PS1_IPP_CzarLogs\"><font color=\"blue\">here</font></a></td></tr>"; 163 175 echo "<tr><td>Exposure summary</td><td><a href=\"czartool_exposures.php?pass=$pass&proj=$proj\"><font color=\"blue\">here</font></a></td></tr>"; … … 165 177 $plotTypeLink = ($plotType == "linear") ? "log" : "linear"; 166 178 $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&mode=" . $selectedMode . "&label=" . $selectedLabel . "&stage=" . $selectedStage . "&revertstage=" . $stage . "&plottype=$plotTypeLink"; 167 echo "<tr><td>Plot type</td><td><a href=\"$link\"><font color=\"blue\">Change to $plotTypeLink</font></a></td></tr>";168 179 169 180 … … 180 191 $pubLabels, 181 192 $stages, 182 $states,183 193 "new", 184 194 $selectedLabel, … … 201 211 echo "<tr>"; 202 212 createTableColumnHeader("Database"); 203 createTableColumnHeader("Status ");213 createTableColumnHeader("Status (sec behind master)"); 204 214 showReplicationsStatus($REPL_HOST_GPC1, $REPL_USER_GPC1, $REPL_PASSWORD_GPC1, $REPL_DBNAME_GPC1); 205 215 showReplicationsStatus($REPL_HOST_NEBULOUS, $REPL_USER_NEBULOUS, $REPL_PASSWORD_NEBULOUS, $REPL_DBNAME_NEBULOUS); … … 349 359 $pubLabels, 350 360 $stages, 351 $states,352 361 $selectedState, 353 362 $selectedLabel, $selectedStage, $plotType) { … … 483 492 createFormattedTableCell(($selectedLabel != "all"), $link, "All labels", 0, null); 484 493 485 createFormattedTableCell(0, null, "Revert s:", 0, "$columnHeaderColor");494 createFormattedTableCell(0, null, "Reverting?", 0, "$columnHeaderColor"); 486 495 487 496 foreach ($stages as &$stage) { … … 489 498 if ($stage == "burntool") continue; 490 499 $reverting = getRevertStatus($db, $stage); 491 $link = 492 "czartool_labels.php?pass=".$pass 493 ."&proj=".$proj 494 ."&mode=" .$selectedMode 495 ."&label=".$selectedLabel 496 ."&stage=".$selectedStage 497 ."&plottype=".$plotType 498 ."&revertstage=".$stage 499 ."&revertmode="; 500 501 if(!$reverting) {$label = "Start";$link = $link . "on";} 502 if($reverting) {$label = "Stop";$link = $link . "off";} 500 #$link = 501 # "czartool_labels.php?pass=".$pass 502 # ."&proj=".$proj 503 # ."&mode=" .$selectedMode 504 # ."&label=".$selectedLabel 505 # ."&stage=".$selectedStage 506 # ."&plottype=".$plotType 507 # ."&revertstage=".$stage 508 # ."&revertmode="; 509 # 510 #if(!$reverting) {$label = "Start";$link = $link . "on";} 511 #if($reverting) {$label = "Stop";$link = $link . "off";} 512 if(!$reverting) {$label = "no";} 513 if($reverting) {$label = "yes";} 503 514 unset($reverting); 504 createFormattedTableCell(1, $link, $label, 0, "$columnHeaderColor"); 515 #createFormattedTableCell(1, $link, $label, 0, "$columnHeaderColor"); 516 createFormattedTableCell(0, null, $label, 0, "$columnHeaderColor"); 505 517 #echo "<td><a href=\"$link\"><font color=\"blue\">$label</font></td>"; 506 518 … … 904 916 //die("MySQL DB connection error: Check the configuration for $replDatabaseName"); 905 917 //die(""); 906 return ;918 return -1; 907 919 908 920 } … … 911 923 # Have a look for Last_Errno in http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html 912 924 $errorStatusInMySql = $row[18]; 913 $replStatus = ($errorStatusInMySql==0?"OK":"<font color=\"red\">PROBLEM</font>"); 925 $sec_behind = $row[32]; 926 $replStatus = ($errorStatusInMySql==0?"OK ($sec_behind)":"<font color=\"red\">PROBLEM</font>"); 914 927 echo "<tr><td>$replDatabaseName</td><td>$replStatus</td></tr>"; 915 928 if ($errorStatusInMySql!=0) { -
branches/meh_branches/ppstack_test/ippMonitor/raw/ipp.imfiles.dat
r29481 r33415 21 21 menutop | menutop | link | simple plot - chip (to remove?) | simplePlot.php 22 22 menutop | menutop | link | simple plot - cam (to remove?) | simplePlotcam.php 23 menutop | menutop | link | czartool | czartool_labels.php 23 menutop | menutop | link | czartool - standard | czartool_labels.php 24 menutop | menutop | link | czartool - ipptopsps | czartool_ipptopsps.php 24 25 menutop | menutop | link | mask stats | maskStats.php 25 26 -
branches/meh_branches/ppstack_test/ippMonitor/raw/nightSummary.php
r27054 r33415 121 121 table_section($db, $WHERE, "magicRun"); 122 122 table_section($db, $WHERE, "destreakRun"); 123 table_section($db, $WHERE, "chipBackgroundRun"); 124 table_section($db, $WHERE, "warpBackgroundRun"); 123 125 table_section($db, $WHERE, "distRun"); 124 126 // table_section($db, $WHERE, "publishRun"); -
branches/meh_branches/ppstack_test/ippMonitor/raw/warpProcessedExp.php
r31876 r33415 117 117 // query the database 118 118 if (basic == "basic") { 119 $sql = "SELECT rawExp.exp_name,rawExp.exp_id,chipRun.chip_id,camRun.cam_id,fakeRun.fake_id,warpRun.warp_id,warpRun.state,warpRun.label,warpRun.data_group,warpRun.dist_group,rawExp.telescope,rawExp.camera,rawExp.dateobs,rawExp.ra,rawExp.decl,rawExp.object,rawExp.filter,rawExp.exp_time,rawExp.airmass,rawExp.bg,rawExp.bg_stdev,rawExp.comment,ifnull(warpSummary.path_base,'noimage'),ifnull(warpSummary.projection_cell,'noimage') FROM fakeRun,camRun,chipRun,rawExp,warpRun LEFT JOIN warpSummary ON warpSummary.warp_id = warpRun.warp_id$WHERE LIMIT $dTABLE OFFSET $rowStart";119 $sql = "SELECT rawExp.exp_name,rawExp.exp_id,chipRun.chip_id,camRun.cam_id,fakeRun.fake_id,warpRun.warp_id,warpRun.state,warpRun.label,warpRun.data_group,warpRun.dist_group,rawExp.telescope,rawExp.camera,rawExp.dateobs,rawExp.ra,rawExp.decl,rawExp.object,rawExp.filter,rawExp.exp_time,rawExp.airmass,rawExp.bg,rawExp.bg_stdev,rawExp.comment,ifnull(warpSummary.path_base,'noimage'),ifnull(warpSummary.projection_cell,'noimage') FROM warpRun JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) JOIN warpSummary USING(warp_id) $WHERE LIMIT $dTABLE OFFSET $rowStart"; 120 120 } 121 121 -
branches/meh_branches/ppstack_test/ippMonitor/raw/warpProcessedExp_Images.php
r28718 r33415 77 77 78 78 if ($restricted == 0) { 79 if ("none" != "none") { 80 $WHERE = "$WHERE none"; 81 } 79 $WHERE = "WHERE 0=1"; 82 80 } 83 81 84 82 // get the result table count 85 83 if (basic == "basic") { 86 $sql = "SELECT count(*) FROM fakeRun,camRun,chipRun,rawExp,warpRunLEFT JOIN warpSummary ON warpSummary.warp_id = warpRun.warp_id $WHERE";84 $sql = "SELECT count(*) FROM rawExp JOIN chipRun USING(exp_id) JOIN camRun USING (chip_id) JOIN fakeRun USING(cam_id) JOIN warpRun USING(fake_id) LEFT JOIN warpSummary ON warpSummary.warp_id = warpRun.warp_id $WHERE"; 87 85 } 88 86 … … 111 109 // query the database 112 110 if (basic == "basic") { 113 $sql = "SELECT rawExp.exp_name,rawExp.exp_id,chipRun.chip_id,camRun.cam_id,fakeRun.fake_id,warpRun.warp_id,warpRun.state,warpRun.label,warpRun.data_group,warpRun.dist_group,rawExp.telescope,rawExp.camera,rawExp.dateobs,rawExp.ra,rawExp.decl,rawExp.object,rawExp.filter,rawExp.exp_time,rawExp.airmass,rawExp.bg,rawExp.bg_stdev,rawExp.comment,ifnull(warpSummary.path_base,'noimage'),ifnull(warpSummary.projection_cell,'noimage') FROM fakeRun,camRun,chipRun,rawExp,warpRunLEFT JOIN warpSummary ON warpSummary.warp_id = warpRun.warp_id $WHERE LIMIT $dTABLE OFFSET $rowStart";111 $sql = "SELECT rawExp.exp_name,rawExp.exp_id,chipRun.chip_id,camRun.cam_id,fakeRun.fake_id,warpRun.warp_id,warpRun.state,warpRun.label,warpRun.data_group,warpRun.dist_group,rawExp.telescope,rawExp.camera,rawExp.dateobs,rawExp.ra,rawExp.decl,rawExp.object,rawExp.filter,rawExp.exp_time,rawExp.airmass,rawExp.bg,rawExp.bg_stdev,rawExp.comment,ifnull(warpSummary.path_base,'noimage'),ifnull(warpSummary.projection_cell,'noimage'),warpRun.tess_id FROM rawExp JOIN chipRun USING(exp_id) JOIN camRun USING (chip_id) JOIN fakeRun USING(cam_id) JOIN warpRun USING(fake_id) LEFT JOIN warpSummary ON warpSummary.warp_id = warpRun.warp_id $WHERE LIMIT $dTABLE OFFSET $rowStart"; 114 112 } 115 113 … … 175 173 $buttonLink = button_restrict_string ('warpSummary.path_base', $buttonLink); 176 174 $buttonLink = button_restrict_string ('warpSummary.projection_cell', $buttonLink); 175 $buttonLink = button_restrict_string ('warpRun.tess_id', $buttonLink); 177 176 navigate_buttons ($rowStart, $rowLast, $dTABLE, 178 177 $rowTotal, $buttonLink, $ID, 'warpProcessedExp_Images.php'); … … 210 209 write_header_cell ("list", "stdev "); 211 210 write_header_cell ("list", "Comment"); 211 write_header_cell ("list", "TessId"); 212 212 echo "</tr>\n"; 213 213 echo "<tr><td></td>\n"; … … 236 236 write_sort_cell ("list", "rawExp.bg_stdev", $buttonLink, $ID, 'warpProcessedExp_Images.php'); 237 237 write_sort_cell ("list", "rawExp.comment", $buttonLink, $ID, 'warpProcessedExp_Images.php'); 238 write_sort_cell ("list", "warpRun.tess_id", $buttonLink, $ID, 'warpProcessedExp_Images.php'); 238 239 echo "</tr>\n"; 239 240 // echo "</tr>\n"; … … 268 269 write_query_row ('rawExp.bg_stdev', 5, 'min'); 269 270 write_query_row ('rawExp.comment', 65, 'string'); 271 write_query_row ('warpRun.tess_id', 65, 'string'); 270 272 echo "</tr><tr><td>≤</td>\n"; 271 273 echo "<td> </td>\n"; … … 292 294 write_query_row ('rawExp.bg_stdev', 5, 'max'); 293 295 echo "<td> </td>\n"; 296 echo "<td> </td>\n"; 294 297 echo "</tr>\n"; 295 298 // echo "</tr>\n"; … … 312 315 //Identify current warpId 313 316 $warpId = $row[5]; 314 /* echo "<tr><td>Number of elements in warpIdCollection: ".count($warpIdCollection)."</td></tr>\n"; */ 315 /* echo "<tr><td>(warpId=$warpId)</td></tr>\n"; */ 317 $tessId = $row[24]; 318 /* echo "<tr><td>Number of elements in warpIdCollection: ".count($warpIdCollection)."</td></tr>\n"; */ 319 /* echo "<tr><td>(warpId=$warpId)</td></tr>\n"; */ 316 320 317 321 if (!isSet($warpIdCollection[$warpId])) { 318 /*echo "<tr><td>$warpId not in warpIdCollection</td></tr>"; */322 /* echo "<tr><td>$warpId not in warpIdCollection</td></tr>"; */ 319 323 $warpIdCollection[$warpId] = array(); 320 324 $skyCellValue = preg_replace("|skycell[.]|","",$row[23]); 321 325 $warpIdCollection[$warpId]["12"] = $skyCellValue; 322 /*echo "<tr><td>Skycell is [$skyCellValue]</td></tr>"; */326 /* echo "<tr><td>Skycell is [$skyCellValue]</td></tr>"; */ 323 327 324 328 echo "<tr>\n"; … … 344 348 echo "<td class=\"$class\">\n"; 345 349 echo "<table border=\"1\"><tr>\n"; 346 /*echo " <td class=\"ul3x2\" id=\"$warpId.00\">$noImageValue</td>\n"; */350 /* echo " <td class=\"ul3x2\" id=\"$warpId.00\">$noImageValue</td>\n"; */ 347 351 echo " <td class=\"ul3x2\" id=\"$warpId.00\"></td>\n"; 348 352 echo " <td class=\"uc3x2\" id=\"$warpId.01\">$noImageValue</td>\n"; 349 353 echo " <td class=\"ur3x2\" id=\"$warpId.02\">$noImageValue</td>\n"; 350 354 echo "</tr><tr>\n"; 351 /*echo " <td class=\"ll3x2\" id=\"$warpId.10\">$noImageValue</td>\n"; */355 /* echo " <td class=\"ll3x2\" id=\"$warpId.10\">$noImageValue</td>\n"; */ 352 356 echo " <td class=\"ll3x2\" id=\"$warpId.10\"></td>\n"; 353 357 echo " <td class=\"lc3x2\" id=\"$warpId.11\">$noImageValue</td>\n"; … … 364 368 echo "<td class=\"$class\">\n"; 365 369 echo "<table border=\"1\"><tr>\n"; 366 /*echo " <td class=\"ul3x2\" id=\"t$warpId.00\">No image</td>\n"; */370 /* echo " <td class=\"ul3x2\" id=\"t$warpId.00\">No image</td>\n"; */ 367 371 echo " <td class=\"ul3x2\" id=\"t$warpId.00\"></td>\n"; 368 372 echo " <td class=\"uc3x2\" id=\"t$warpId.01\">No image</td>\n"; 369 373 echo " <td class=\"ur3x2\" id=\"t$warpId.02\">No image</td>\n"; 370 374 echo "</tr><tr>\n"; 371 /*echo " <td class=\"ll3x2\" id=\"t$warpId.10\">No image</td>\n"; */375 /* echo " <td class=\"ll3x2\" id=\"t$warpId.10\">No image</td>\n"; */ 372 376 echo " <td class=\"ll3x2\" id=\"t$warpId.10\"></td>\n"; 373 377 echo " <td class=\"lc3x2\" id=\"t$warpId.11\">No image</td>\n"; … … 376 380 echo "</td>\n"; 377 381 378 $cellContent = "<a href=\\\"$link\\\"> <img src=\\\"getimage.php?name=$row[22].$row[23]&rule=PPSKYCELL.JPEG2&camera=$row[11]&class_id=NONE\\\"> </a>"; 379 echo "<script type=\"text/javascript\">changeCell(\"$warpId.12\", \"$cellContent\");</script>"; 380 $imageNameValue = ($row[23]=="noimage" ? 381 "No image" : $row[23]); 382 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.12\", \"$imageNameValue\");</script>"; 382 if ($tessId != "RINGS.V3") { 383 $cellContent = "<a href=\\\"$link\\\"> <img src=\\\"getimage.php?name=$row[22].$row[23]&rule=PPSKYCELL.JPEG2&camera=$row[11]&class_id=NONE\\\"> </a>"; 384 echo "<script type=\"text/javascript\">changeCell(\"$warpId.12\", \"$cellContent\");</script>"; 385 $imageNameValue = ($row[23]=="noimage" ? 386 "No image" : $row[23]); 387 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.12\", \"$imageNameValue\");</script>"; 388 } else { 389 //The cell to update is the upper right one for new tessellation 390 $cellContent = "<a href=\\\"$link\\\"> <img src=\\\"getimage.php?name=$row[22].$row[23]&rule=PPSKYCELL.JPEG2&camera=$row[11]&class_id=NONE\\\"> </a>"; 391 echo "<script type=\"text/javascript\">changeCell(\"$warpId.02\", \"$cellContent\");</script>"; 392 $imageNameValue = ($row[23]=="noimage" ? 393 "No image" : $row[23]); 394 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.02\", \"$imageNameValue\");</script>"; 395 } 383 396 384 397 //resume with "regular" columns … … 399 412 write_table_cell ($class, '%.2f', "", $row[20]); 400 413 write_table_cell ($class, '%s', "", $row[21]); 414 write_table_cell ($class, '%s', "", $row[24]); 401 415 echo "</tr>\n"; 402 416 … … 415 429 $cellContent = "<a href=\\\"$link\\\"> <img src=\\\"getimage.php?name=$row[22].$row[23]&rule=PPSKYCELL.JPEG2&camera=$row[11]&class_id=NONE\\\"> </a>"; 416 430 417 if ($skyCellValue == $lrValue + 1) { 418 $warpIdCollection[$warpId]["11"] = $skyCellValue; 419 echo "<script type=\"text/javascript\">changeCell(\"$warpId.11\", \"$cellContent\");</script>"; 420 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.11\", \"$row[23]\");</script>"; 421 } else { 422 if ($skyCellValue == $lrValue + 2) { 423 $warpIdCollection[$warpId]["10"] = $skyCellValue; 424 echo "<script type=\"text/javascript\">changeCell(\"$warpId.10\", \"$cellContent\");</script>"; 425 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.10\", \"$row[23]\");</script>"; 431 if ($tessId != "RINGS.V3") { 432 if ($skyCellValue == $lrValue + 1) { 433 $warpIdCollection[$warpId]["11"] = $skyCellValue; 434 echo "<script type=\"text/javascript\">changeCell(\"$warpId.11\", \"$cellContent\");</script>"; 435 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.11\", \"$row[23]\");</script>"; 426 436 } else { 427 if (!isSet($warpIdCollection[$warpId]["02"])) {428 /* echo "<tr><td>Update UpperRight</td></tr>"; */429 $warpIdCollection[$warpId]["02"] = $skyCellValue;430 echo "<script type=\"text/javascript\">changeCell(\" $warpId.02\", \"$cellContent\");</script>";431 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.02\", \"$row[23]\");</script>"; 432 } else{433 $urValue = $warpIdCollection[$warpId]["02"];434 if ($urValue + 1 == $skyCellValue) {435 echo "<script type=\"text/javascript\">changeCell(\"$warpId.0 1\", \"$cellContent\");</script>";436 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.0 1\", \"$row[23]\");</script>";437 if ($skyCellValue == $lrValue + 2) { 438 $warpIdCollection[$warpId]["10"] = $skyCellValue; 439 echo "<script type=\"text/javascript\">changeCell(\"$warpId.10\", \"$cellContent\");</script>"; 440 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.10\", \"$row[23]\");</script>"; 441 } else { 442 if (!isSet($warpIdCollection[$warpId]["02"])) { 443 /* echo "<tr><td>Update UpperRight</td></tr>"; */ 444 $warpIdCollection[$warpId]["02"] = $skyCellValue; 445 echo "<script type=\"text/javascript\">changeCell(\"$warpId.02\", \"$cellContent\");</script>"; 446 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.02\", \"$row[23]\");</script>"; 437 447 } else { 438 if ($urValue + 2 == $skyCellValue) { 439 echo "<script type=\"text/javascript\">changeCell(\"$warpId.00\", \"$cellContent\");</script>"; 440 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.00\", \"$row[23]\");</script>"; 448 $urValue = $warpIdCollection[$warpId]["02"]; 449 if ($urValue + 1 == $skyCellValue) { 450 echo "<script type=\"text/javascript\">changeCell(\"$warpId.01\", \"$cellContent\");</script>"; 451 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.01\", \"$row[23]\");</script>"; 441 452 } else { 442 $expected = $urValue + 1; 443 $actual = $skyCellValue; 444 echo "<script type=\"text/javascript\">changeCell(\"$warpId.00\", \"Problem in UpperLeft corner: expected $expected but was $actual\");</script>"; 445 echo "<tr><td>Problem in Upper part!</td></tr>"; 446 } 447 } 453 if ($urValue + 2 == $skyCellValue) { 454 echo "<script type=\"text/javascript\">changeCell(\"$warpId.00\", \"$cellContent\");</script>"; 455 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.00\", \"$row[23]\");</script>"; 456 } else { 457 $expected = $urValue + 1; 458 $actual = $skyCellValue; 459 echo "<script type=\"text/javascript\">changeCell(\"$warpId.00\", \"Problem in UpperLeft corner: expected $expected but was $actual\");</script>"; 460 echo "<tr><td>Problem in Upper part!</td></tr>"; 461 } 462 } 463 } 448 464 } 465 } 466 } else { /* New tessellation */ 467 468 /* echo "<p>$lrValue - $skyCellValue</p>"; */ 469 470 if ($skyCellValue == $lrValue + 1) { 471 $warpIdCollection[$warpId]["11"] = $skyCellValue; 472 echo "<script type=\"text/javascript\">changeCell(\"$warpId.01\", \"$cellContent\");</script>"; 473 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.01\", \"$row[23]\");</script>"; 474 } else { 475 if ($skyCellValue == $lrValue + 2) { 476 $warpIdCollection[$warpId]["10"] = $skyCellValue; 477 echo "<script type=\"text/javascript\">changeCell(\"$warpId.00\", \"$cellContent\");</script>"; 478 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.00\", \"$row[23]\");</script>"; 479 } else { 480 if (!isSet($warpIdCollection[$warpId]["02"])) { 481 /* echo "<tr><td>Update UpperRight</td></tr>"; */ 482 $warpIdCollection[$warpId]["02"] = $skyCellValue; 483 echo "<script type=\"text/javascript\">changeCell(\"$warpId.12\", \"$cellContent\");</script>"; 484 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.12\", \"$row[23]\");</script>"; 485 } else { 486 $urValue = $warpIdCollection[$warpId]["02"]; 487 if ($urValue + 1 == $skyCellValue) { 488 echo "<script type=\"text/javascript\">changeCell(\"$warpId.11\", \"$cellContent\");</script>"; 489 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.11\", \"$row[23]\");</script>"; 490 } else { 491 if ($urValue + 2 == $skyCellValue) { 492 echo "<script type=\"text/javascript\">changeCell(\"$warpId.10\", \"$cellContent\");</script>"; 493 echo "<script type=\"text/javascript\">changeCell(\"t$warpId.10\", \"$row[23]\");</script>"; 494 } else { 495 $expected = $urValue + 1; 496 $actual = $skyCellValue; 497 echo "<script type=\"text/javascript\">changeCell(\"$warpId.00\", \"Problem in UpperLeft corner: expected $expected but was $actual\");</script>"; 498 echo "<tr><td>Problem in Upper part!</td></tr>"; 499 } 500 } 501 } 502 } 503 449 504 } 450 505 } -
branches/meh_branches/ppstack_test/ippMonitor/scripts/skyplot.dvo
r27674 r33415 8 8 black 9 9 gold 10 orange 10 11 end 11 12 … … 17 18 7 18 19 3 20 0 19 21 end 20 22 … … 26 28 0.9 27 29 1.3 30 0.5 28 31 end 29 32
Note:
See TracChangeset
for help on using the changeset viewer.
