Ignore:
Timestamp:
02/19/09 21:22:19 (16 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/scripts/sourcefile

    r9221 r9355  
    6060            rm -v $lockfile
    6161         fi
    62          date
    6362         exit
    6463      fi
     
    9089      rm -v $lockfile
    9190   fi
    92    date
    9391   printprocesslog "INFO finished $0"
    9492   exit
     
    184182   checklock0=$?
    185183   case $checklock0 in
    186       0)   echo " checklock0=$checklock0 -> continue " ;;
    187       1)   echo " checklock0=$checklock0 -> file $lockfile exists"
    188            date
     184      0)   printprocesslog "INFO checklock0=$checklock0 -> continue "
     185           ;;
     186      1)   printprocesslog "WARN checklock0=$checklock0 -> file $lockfile exists"
    189187           $@
    190188           exit;;
    191       *)   echo " checklock0=$checklock0 -> something went completely wrong" ;;
     189      *)   printprocesslog "ERROR checklock0=$checklock0 -> something went completely wrong" ;;
    192190   esac
    193191}
     
    218216{
    219217   case $@ in
    220       start)   echo "setstatus start"
     218      start)   printprocesslog "INFO setstatus start"
    221219               starttime="Now()"
    222220               ;;
    223221       stop)   case $check in
    224                   ok)  echo "setstatus stop - ok"
     222                  ok)  printprocesslog "INFO setstatus stop - ok"
    225223                       statustime="Now()"
    226224                       ;;
    227                   no)  echo "setstatus stop - nothing new"
     225                  no)  printprocesslog "INFO setstatus stop - nothing new"
    228226                       check="ok"
    229227                       ;;
    230                    *)  echo "setstatus stop - failed"
     228                   *)  printprocesslog "INFO setstatus stop - failed"
    231229                       starttime=noreset
    232230                       if [ "$check" == "" ]
     
    242240               esac
    243241               ;;
    244           *)   echo "error -> exit"
    245                printprocesslog "ERROR function evalstatus got wrong variable"
     242          *)   printprocesslog "ERROR function evalstatus got wrong variable"
    246243               finish
    247244               ;;
     
    279276{
    280277   process=
    281    echo "getting todo..."
     278   printprocesslog "INFO getting todo..."
    282279   getdbsetup
    283280   getstepinfo
     
    303300      query=$query" limit 0, $@ "
    304301   fi
    305    echo " QUERY: "$query
     302   printprocesslog "INFO QUERY: "$query
    306303   if ! process=`mysql -s -u $us --password=$pw --host=$ho $db -e " $query "`
    307304   then
    308       echo "ERROR could not query processes from db -> exit"
    309305      printprocesslog "ERROR could not query processes from db (program: $program, function gettodo)"
    310306      finish
     
    313309   if [ "$process" = "" ]
    314310   then
    315       echo " => nothing to do"
     311      printprocesslog "INFO => nothing to do"
    316312      finish
    317313   else
     
    340336   query=$query" and isnull(fStartTime) and isnull(fFailedTime) and isnull(fProgramId) and isnull(fReturnCode) "
    341337   query=$query" group by $column "
    342 #   echo " QUERY: "$query
     338#   printprocesslog "INFO QUERY: "$query
    343339   if ! numproc=`mysql -s -u $us --password=$pw --host=$ho $db -e " $query "`
    344340   then
    345       echo "ERROR could not query number of todo proceses from db -> continue"
    346341      printprocesslog "ERROR could not query number of processes from db (program: $program, function getstatus)"
    347342      cont
     
    364359   if [ "$reset" = "no" ]
    365360   then
    366       echo "YOU CAN'T RESET $column for ${primaries[$s+$s]}!!!"
    367       printprocesslog "ERROR you can't reset $column for ${primaries[$s+$s]}"
     361      printprocesslog "ERROR You cannot reset $column for ${primaries[$s+$s]}"
    368362      finish
    369363   fi
     
    391385      query=$query" and ${prims[$i]}='${primaries[$s*${#prims[@]}+$i]}' "
    392386   done   
    393    echo " QUERY: "$query
     387   printprocesslog "INFO QUERY: "$query
    394388   if ! mysql -s -u $us --password=$pw --host=$ho $db -e " $query "
    395389   then
    396       echo "ERROR could not insert status into db -> exit"
    397390      printprocesslog "ERROR could not set status in db (program: $program, function setstatus)"
    398391      finish
Note: See TracChangeset for help on using the changeset viewer.