(file) Return to show_active.csh CVS log (file) (dir) Up to [Development] / JSOC / proj / workflow

File: [Development] / JSOC / proj / workflow / show_active.csh (download) / (as text)
Revision: 1.2, Thu Jan 6 20:00:31 2011 UTC (11 years, 11 months ago) by phil
Branch: MAIN
CVS Tags: Ver_LATEST, Ver_9-5, Ver_9-41, Ver_9-4, Ver_9-3, Ver_9-2, Ver_9-1, Ver_9-0, Ver_8-8, Ver_8-7, Ver_8-6, Ver_8-5, Ver_8-4, Ver_8-3, Ver_8-2, Ver_8-12, Ver_8-11, Ver_8-10, Ver_8-1, Ver_8-0, Ver_7-1, Ver_7-0, Ver_6-4, Ver_6-3, Ver_6-2, Ver_6-1, Ver_6-0, Ver_5-14, Ver_5-13, HEAD
Changes since 1.1: +1 -1 lines
Fix product location

#! /bin/csh -f
# monitor program


if ($#argv >= 1) then
     set LIST = "*"$1"*"
else
     set LIST = "*"
endif
# echo "$LIST"

if ($?WORKFLOW_ROOT) then
  set WFDIR = $WORKFLOW_DATA
  set WFCODE = $WORKFLOW_ROOT
else
  echo Need WORKFLOW_ROOT variable to be set.
  exit 1
endif

set nonomatch

cd $WFDIR

while (-e GATEKEEPERBUSY)
   echo -n '.'
   sleep 1
end

clear

echo " "
set nowtxt = `date -u +%Y.%m.%d_%H:%M:%S`"_UTC" 
echo -n "TIME = $nowtxt, LAST_NEWICKET = "
cat LAST_NEWTICKET

cd $WFDIR/gates
foreach gate ( $LIST )
     cd $WFDIR/gates/$gate
     set gatestatus = `cat gatestatus`
     if ($gatestatus == "HOLD") then
         cd ..
         continue
     endif
     cd active_tickets
     set ticketlist = `/bin/ls`
     set ntickets = $#ticketlist
     if ($ntickets) then
         echo " "
         echo -n "GATE $gate" "   for "
         cat ../product
         foreach ticket ($ticketlist)
            set STATUS = `grep STATUS $ticket`
 	    set WANTLOW = `grep WANTLOW $ticket`
 	    set WANTHIGH = `grep WANTHIGH $ticket`
 	    set ACTION = `grep ACTION $ticket`
            set TASKID = `grep TASKID $ticket`
            echo "  $ticket"": $STATUS, $WANTLOW, $WANTHIGH, $ACTION, $TASKID"
 	 end # active
     endif
     cd ..
end

echo " "


Karen Tian
Powered by
ViewCVS 0.9.4