PFS Software Documentation

The Observatories of the Carnegie Institution for Science (Carnegie Observatories), Pasadena, CA


Location of this document: http://users.obs.carnegiescience.edu/birk/PFS/how.html



Meta Temperature Controller and Web-Status Update

The Meta Temperature Controller status web-page is updated by a combination of scripts started by a cron job on the observer workstations at Clay and scripts running on the webserver at SBS.

  • crontab at LCO:
      */5  * * * * ./PFS/pfs_log.csh &> /dev/null 
      */20 * * * * sleep 10 ; ./PFS/pfs_scp.csh &> /dev/null 
      1    9 * * * ./PFS/temp.csh $HOME/.pfs.log birk@xxx,crane@xxx  
      3    9 * * * ./PFS/ionp.csh $HOME/.pfs.log birk@xxx,crane@xxx,ian@xxx  
    

  • pfs_log.csh:
      #! /bin/csh -f
      setenv PFSHOME $HOME/PFS 
      setenv PFSBIN  $PFSHOME/src  
      setenv PFSLOG  $PFSHOME  
      setenv PFSDAT  $PFSHOME  
      $PFSBIN/pfslog -c 24.700 -p 10.0 -i 0.1 -d 0.5 
    

  • pfs_scp.csh
      #! /bin/csh -f
      rm -f /tmp/pfs_meta.log
      tail -600   $HOME/PFS/pfs_meta.log > /tmp/pfs_meta.log
      scp /tmp/pfs_meta.log instruments@xxx:PFS/
    

  • crontab at SBS:
      */10 * * * * sleep 30 ; cd $HOME/PFS/Scripts ; gnuplot gnu-meta &> /dev/null
      */20 * * * * sleep 45 ; cp $HOME/PFS/pfs_meta.log $HOME/HTML/Software/PFS/
    
  • gnu-meta


  • temp.csh
      #! /bin/csh -f
      set file = /tmp/pfs_temp.log ; rm -f $file
      grep 'Air:'    $1 | tail -1 >> $file
      grep 'TableT'  $1 | tail -1 >> $file
      grep 'GlycolT' $1 | tail -1 >> $file
      if ( $2 == "" ) then
        cat $file
      else
        mail -s 'PFS instrument status' $2 < $file
      endif
    

  • ionp.csh
      #! /bin/csh -f
      set file = /tmp/pfs_ionp.log ; rm -f $file
      grep 'IonPump' $1 | tail -1 >> $file
      grep 'VacuumG' $1 | tail -1 >> $file
      grep 'CCDtemp' $1 | tail -1 >> $file
      grep 'CCDheat' $1 | tail -1 >> $file
      if ( $2 == "" ) then
        cat $file
      else
        mail -s 'PFS dewar status' $2 < $file
      endif
    


    2008-04-28, Christoph C. Birk, Carnegie Observatories