IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 31, 2011, 2:51:48 PM (15 years ago)
Author:
eugene
Message:

merging changes from trunk

Location:
branches/eam_branches/ipp-20101205/ippMonitor
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/ippMonitor/Makefile.in

    r29651 r30446  
    5555$(DESTWWW)/czartool_labels.php \
    5656$(DESTWWW)/czartool_getplot.php \
     57$(DESTWWW)/czartool_exposures.php \
    5758$(DESTWWW)/histogram.php \
    5859$(DESTWWW)/show_and_delete_image.php \
  • branches/eam_branches/ipp-20101205/ippMonitor/def/mopsStatus.d

    r29483 r30446  
    1 TABLE rawExp LEFT JOIN chipRun using(exp_id) LEFT JOIN camRun using(chip_id) LEFT JOIN fakeRun using(cam_id) LEFT JOIN warpRun using(fake_id) LEFT JOIN diffInputSkyfile AS diffInput ON diffInput.warp1 = warp_id LEFT JOIN diffRun AS diffInputRun ON diffInput.diff_id = diffInputRun.diff_id LEFT JOIN diffInputSkyfile AS diffTemplate ON diffTemplate.warp2 = warp_id LEFT JOIN diffRun AS diffTemplateRun ON diffTemplate.diff_id = diffTemplateRun.diff_id LEFT JOIN publishRun ON stage_id=diffInput.diff_id
     1TABLE rawExp LEFT JOIN chipRun using(exp_id) LEFT JOIN camRun using(chip_id) LEFT JOIN fakeRun using(cam_id) LEFT JOIN warpRun using(fake_id) LEFT JOIN diffInputSkyfile AS diffInput ON diffInput.warp1 = warp_id LEFT JOIN diffRun AS diffInputRun ON diffInput.diff_id = diffInputRun.diff_id LEFT JOIN diffInputSkyfile AS diffTemplate ON diffTemplate.warp2 = warp_id LEFT JOIN diffRun AS diffTemplateRun ON diffTemplate.diff_id = diffTemplateRun.diff_id LEFT JOIN publishRun ON stage_id=diffInput.diff_id AND (client_id=1 OR client_id=5) LEFT JOIN publishRun AS pubRun2 ON pubRun2.stage_id=diffTemplate.diff_id AND (pubRun2.client_id=1 OR pubRun2.client_id=5) LEFT JOIN magicDSRun ON magicDSRun.magic_ds_id=camRun.magicked
    22TITLE MOPS Status
    33FILE mopsStatus.php
     
    1010OP OP1 ($row[8]>$row[9]?$row[8]. "(1)":($row[9]!=0?$row[9]. "(2)":"0"))
    1111# $diffInput.diff_id+$diffTemplate.diff_id
    12 OP OP2 $row[8]+$row[9]
    13 #  "[".$diffInput.diff_id."]:[".$tdiff_id."]"
     12# PUB ID
     13OP OP2 ($row[12]>$row[13]?$row[12]. "(I)":($row[13]!=0?$row[13]. "(T)":"0"))
     14#($row[13]>$row[14])
    1415
    1516#     field                    width format  name          show         link to                   extras
    16 FIELD dateobs,                 15,   %T,     Date Obs
     17FIELD dateobs,                 13,   %T,     Date Obs
    1718FIELD exp_name,                5,    %s,     Exp Name
    1819FIELD rawExp.exp_id,           5,    %d,     Exp ID
    1920FIELD chipRun.data_group,      5,    %s,     Data grp
    2021FIELD chip_id,                 5,    %d,     Chip ID (Stage 1)
    21 FIELD cam_id,                  5,    %d,     Cam ID (Stage 2)
     22FIELD camRun.cam_id AS camID,                  5,    %d,     Cam ID (Stage 2)
    2223FIELD fake_id,                 5,    %d,     Fake ID (Stage 3)
    2324FIELD warp_id,                 5,    %d,     Warp ID (Stage 4)
     
    2526FIELD diffTemplate.diff_id AS tdiff_id,    5,    %d,     tdiff_id, none
    2627FIELD *,                       5,    %s,     Diff ID (Stage 5),         op=OP1
    27 #FIELD *,                      5,    %d,     Diff ID (Stage 5),         op=OP2
    28 FIELD camRun.magicked,         5,    %d,     Cam Magicked (Stage 6)
    29 FIELD publishRun.pub_id,       5,    %d,     Pub ID (Stage 7)
     28FIELD camRun.magicked,         5,    %d,     Magick ID (Stage 6)
     29FIELD magicDSRun.magic_ds_id,       5,    %d, DestreakID (Stage 7)
     30FIELD publishRun.pub_id AS pubId1,       5,    %d,     pubId1, none
     31FIELD pubRun2.pub_id AS pubId2,       5,    %d,     pubId2, none
     32FIELD *,                        10, %s, Pub ID, op=OP2
    3033FIELD filter,                  5,    %s,     Filter
    3134FIELD object,                  15,    %s,     Object
     35FIELD obs_mode,                5,    %s,     Obs Mode
    3236FIELD comment,                 40,    %s,     Comment
    3337
    34 FIELD diffInput.diff_id AS ddiffId,       5,    %s,     ddiffId,        none
    35 FIELD diffTemplate.diff_id AS tdiffId,    5,    %s,     tdiffId,        none
     38#FIELD diffInput.diff_id AS ddiffId,       5,    %s,     ddiffId,       none
     39#FIELD diffTemplate.diff_id AS tdiffId,    5,    %s,     tdiffId,       none
    3640
    3741MODE summary
  • branches/eam_branches/ipp-20101205/ippMonitor/raw/czartool_labels.php

    r30103 r30446  
    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><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 
     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><br/><a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PS1_IPP_CzarLogs\">Czar log pages</a><br><a href=\"czartool_exposures.php?pass=$pass&proj=$proj\">Exposure summary</a></p>";
    6867
    6968// deal with reverts: turn on or off if requested and pass current revert state for this stage onto labels table later
     
    182181            echo "<td> \n";
    183182              $today = date("Y-m-d");
    184               showSummitData($gpc1db, $today);
     183              createSummitDataTable($gpc1db, $today);
    185184            echo "</td>\n";
    186185          echo "</tr>\n";
     
    189188    echo "</tr>\n";
    190189
    191 
    192190    # 4th row
     191    echo "<tr>\n";
     192      echo "<td> \n";
     193        echo "<table>\n";
     194          echo "<tr valign=top>\n";
     195            echo "<td> \n";
     196              # storage plot
     197              echo "<img src=\"czartool_getplot.php?type=s\"><br>";
     198            echo "</td>\n";
     199            echo "<td>\n";
     200              createDatesTable($czardb);
     201            echo "</td>\n";
     202          echo "</tr>\n";
     203        echo "</table>\n";
     204      echo "</td> \n";
     205    echo "</tr>\n";
     206
     207    # 5th row
    193208    echo "<tr>\n";
    194209      echo "<td>\n";
     
    196211          echo "<tr valign=top>\n";
    197212            echo "<td> \n";
    198               # storage plot
    199               echo "<img src=\"czartool_getplot.php?type=s\"><br>";
     213              if ($selectedServer && !$serverCmd) showServerStatus($selectedServer);
    200214            echo "</td>\n";
    201215            echo "<td>\n";
     
    206220                showReplicationsStatus($REPL_HOST_GPC1, $REPL_USER_GPC1, $REPL_PASSWORD_GPC1, $REPL_DBNAME_GPC1);
    207221                showReplicationsStatus($REPL_HOST_NEBULOUS, $REPL_USER_NEBULOUS, $REPL_PASSWORD_NEBULOUS, $REPL_DBNAME_NEBULOUS);
     222
    208223              echo "</table>";
    209224            echo "</td>\n";
     
    213228    echo "</tr>\n";
    214229
    215     # 5th row
    216     echo "<tr>\n";
    217       echo "<td> \n";
    218         echo "<table>\n";
    219           echo "<tr valign=top>\n";
    220             echo "<td> \n";
    221               # server output
    222               if ($selectedServer && !$serverCmd) showServerStatus($selectedServer);
    223             echo "</td>\n";
    224             echo "<td>\n";
    225             echo "</td>\n";
    226           echo "</tr>\n";
    227         echo "</table>\n";
    228       echo "</td> \n";
    229     echo "</tr>\n";
    230 
    231230  echo "</table>\n";
    232231
     
    236235###########################################################################
    237236#
    238 # Checks summitExp table agains rawExp table
    239 #
    240 ###########################################################################
    241 function showSummitData($gpc1db, $date) {
     237# Creates a table of summitExp against rawExp
     238#
     239###########################################################################
     240function createSummitDataTable($gpc1db, $date) {
    242241
    243242    $sql = "SELECT DISTINCT exp_type FROM summitExp WHERE dateobs > '$date'";
     
    590589###########################################################################
    591590#
     591# Populates a tables with the current dates listed in the server_dates table
     592#
     593###########################################################################
     594function createDatesTable($db) {
     595
     596    $class = "list";
     597    echo "<table class=$class>\n";
     598    echo "<tr><td></td>\n";
     599    write_header_cell($class, "Server");
     600    write_header_cell($class, "Dates");
     601    echo "</tr>\n";
     602
     603    createServerDateRow($db, "stdscience");
     604    createServerDateRow($db, "registration");
     605
     606    echo "</table>\n";
     607}
     608
     609
     610###########################################################################
     611#
     612# Checks the status of all the pantasks servers
     613#
     614###########################################################################
     615function createServerDateRow($db, $server) {
     616
     617    $sql = "SELECT date FROM server_dates WHERE server LIKE '$server' ORDER BY date";
     618    if ($debug) {echo "$sql<br>";}
     619
     620    $qry = $db->query($sql);
     621    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
     622    $dates = "";
     623    $firstIn = true;
     624    while ($qry->fetchInto($row)) {
     625
     626        if ($firstIn) {
     627
     628            $dates = $row[0];
     629            $firstIn = false;
     630        }
     631        else $dates = $dates . ", " . $row[0];
     632    }
     633
     634    $class = "list";
     635    echo "<tr><td></td>\n";
     636    write_table_cell($class, '%s', "", $server);
     637    write_table_cell($class, '%s', "", $dates);
     638    echo "</tr>\n";
     639
     640}
     641
     642###########################################################################
     643#
    592644# Checks the status of all the pantasks servers
    593645#
     
    633685            ."&plottype=".$plotType;
    634686
    635         $link = ""; # TODO removed links temporarily
    636             write_table_cell($class, '%s', $link, $server);
     687        #$link = ""; # TODO removed links temporarily
     688        write_table_cell($class, '%s', $link, $server);
    637689        write_table_cell($class, '%s', "", $alive ? "yes" : "NO");
    638690
Note: See TracChangeset for help on using the changeset viewer.