Elixir Support Guide
 
 Major Elixir Systems:
 
 - summit realtime tools
 
 - waimea realtime system
   - ert 
   - archive interface
   - imreg.db
   - imstats
   - ptolemy
 
 - postrun processing
   - mkdetrend
   - mkfringe
   - ptolemy
   - standards
   - validation
 
 - distribution elixir 
 
 - skyprobe
 
 
 
 Infrastructure:
 
 - elixir computers
   hau
   ulu
   naio
   mamane
   naupaka
   uhane (shared with DADS)
   koa (to be retired)
   the flock (aeo, alae, iiwi, kolea, omao, palila)
 
 - elixir data directories
   RAWDIR   /data/elixir2/rawdir/CAMERA/RUNID
   TMPDIR   /data/elixir3/tmpdir/CAMERA/RUNID
   CATDIR   /data/elixir2/catdir/CAMERA
   DATDIR   /data/elixir2/datdir/
   DETDIR   /data/elixir1/detdir/CAMERA/RUNID
   HDXDIR   /data/elixir3/hdxdir/CAMERA/RUNID
   REFSDIR  /data/elixir2/srcdir/refs
   CONFDIR  /apps/elixir/config
   DETREND_DATABASE /data/elixir1/detdir/CAMERA/RUNID
 
 - elixir configuration system
   .ptolemyrc / ptolemy.rc / PTOLEMY
   gconfig
   -D key value
   -C config
   camera tables (CONFDIR/camera/...)
   mkrun system
 
 - elixir accounts
   ptolemy1 (currently on ulu)
   ptolemy2 (currently on naio)
 
 - mirror system
   must be in DATDIR/backup
   backup -targets - list all target disks
   backup -status (target) - list backup configuration
   backup -backup (target) - update mirror
   /data/elixir1 : /data/ulu/elixir1.mirror & /data/koa/elixir1.mirror
 
 
 
 Summit Realtime Systems
 
 - elixir.fork : called by director (endgo)
 - getseeing
 - getfocus
 - megacenter (run by hand)
 - edisp (uses DATDIR/plots/...)
 - Xvnc (on wekiu == XHOST.SUMMIT)
 
 (logs go to ~CAMERA/elixir/)
 
 
 
 Waimea Realtime Systems
 
 - ert 
   master nightly control
   see ~ptolemy2/.ertrc
 
 - elixir.link 
   grab from /data/kapu/elixir/CAMERA
   link to RAWDIR
   add to imreg.db
 
 - gettemps (to be retired)
 
 - imstats elixir 
   imstatreg -daemon
   imreg.db: CATDIR/Images.reg / CATDIR/Image.reg.bfr
 
 - sextract (ptolemy) elixir
   elixir.export (DATDIR/export.conf)
 
 - el_plots
 
 - Xvnc (on ulu == XHOST)
 
 - end-of-night
   cadc table (raw data table)
   send seeing plot to archive
 
 
 
 Skyprobe
 
 - sp_command test
 - sp_phot test
 
 - skyprobe daemon
   skyprobe@wekiu
   see ~skyprobe/.skyproberc
 
 - sp_phot
   copy from ~skyprobe/data to /data/skyprobe/rawdir
   process to /data/skyprobe/smpdir
   update database in /data/skyprobe/catdir
 
 - in waimea
   ptolemy2 srt (currently on mamane)
   sp_plot (sent to DATDIR/plots)
   web uses link to DATDIR/plot/skyprobe_*.png
 
 
 
 Typical Errors
 
 - database locked:
   CATDIR/Images.reg
   CATDIR/Images.reg.bfr 
   /data/skyprobe/catdir/Images.reg 
   DETREND_DB/detrend.db
   CATDIR/phot.db
   CATDIR/trans.db
 
   (if one of these still gives errors after clearing the lock, copy it
   to a new name and remove the original - we can merge the new and the
   old ones later)
 
 - machine down
   * the flock: ignore
   * elixir data machine:
     switch mount tables to mirror version
     comment out entry in backup.tab 
     move relevant services to a new machine
 
   * disk down 
     switch mount tables to mirror version
     comment out entry in backup.tab 
     move relevant services to a new machine
 
   * permission errors 
     set files to appropriate permission state (ie, 666 or 777)