EBZ/CED July 1999 mon_sci5k --------- * INTRODUCTION mon_sci5k is in /mdisw/idl/cal/egse. The program interprets 5k science data in real time as it comes over the EGSE socket. It is an IDL program. You can also start this from the shell command line by typing 'xmonsci5k. In addition to displaying information about the science data, mon_sci5k records some summary information in the log directories for plotting on the web pages and future reference. The code has several unrelated functions: * Store health-monitoring information for future plotting * Interpret science data to check that it is arriving correctly * Interpret and display LOI data on-screen * Abstract roll information from the LOI data * HEALTH MONITORING and CRON JOBS To keep the health monitoring pages and the operating logs up-to-date, mon_sci5k should always be running on mdisas in the background. Every 20 minutes, cron runs go_mon_sci5k. /mdisw/idl/ops/go_mon_sci5k.pro is a program that checks if the mon_sci5k process is running and starts it if it is not running. It mails the idl-cron users with the message "Starting up mon_sci5k" if the program isn't running and has to be restarted. The cronjob logs to ~mdi/Imon_sci5k. This is the only cronjob that does not use qproc because, in the case that mon_sci5k is restarted, the job does not terminate. If you see a mail message saying that the cronjob has restarted mon_sci5k then something caused it to crash and this should be looked into. WARNING: go_mon_sci5k is still subject to runaway in extremely loaded conditions on mdisas! The code uses the last-modified time on the latest log file to determine whether mon_sci5k is still running. If, for any reason, the running mon_sci5k hangs for more than about 5 minutes (eg if the load average on the host computer soars high enough), then go_mon_sci5k will spawn a new instance, exacerbating the load problem!! This should be fixed by using real process-ID locking, but that's a difficult problem in IDL. The health summary information is written to files in the directory $GSE_MON5K_DIR once a minute. On mdisas, that's /md81/log/mon5k. The health information is written to files named .mon, where the timestamp is the time that the program started running. Also in that directory are .roll files; see the lower section on roll monitoring. * DISPLAY of information and images: mon_sci5k displays science data products and command echo packets as they arrive from the spacecraft. To see the latest data products arriving, you just type "mon_sci5k" on a computer with a running EGSE that's receiving telemetry (mdicmd, mdisas, mditlm). If the sequencer isn't running, then you will see echoes of uplinked commands; but the sci5k stream uses the whole channel and displaces the command echo when the sequencer is running. You can view the current LOI images using "mon_sci5k,/disp_loi" on an X terminal or computer console. That throws up a window with the current LOI data on it, so you can get a visual idea of the data quality and the shape of the Sun. * ROLL information: Using the dopplergrams, mon_sci5k can calculate the position ("P") angle of the solar images hitting MDI. The calculation is not purely from the data: ancillary orbital information is needed to account for offsets due to the spacecraft's proper motion. The ancillary information can be derived from the actual SOHO roll files ("ORBIT" data) or from a simpleminded calculation ("CALC" data). Whenever mon_sci5k receives LOI data, it writes current roll calculations to the $GSE_MON5K_DIR directory, in "roll" files similar to the "mon" files that are used for health monitoring. The .roll files are used for generating roll monitoring web pages. You can plot the contents of existing .roll files with the program "plot_roll" in /mdisw/idl/ops. A cronjob runs to compile roll data from the .roll files and plot the roll data as part of the health page updates. There is also a way to monitor the roll plots on a minute to minute basis, for use when the FOT is maneuvering SOHO. This eats up a lot of CPU (largely because of inefficiencies in IDL and in the coding, not because it's a hard programming task), so we only use it when needed. To obtain minute-to-minute roll plots, tell IDL `.run fot_roll', and look at the web page: http://mdiwww/tmp/roll_monitor.html. * FILES: IDL programs: /mdisw/ops/go_mon_sci5k.pro /mdisw/idl/cal/egse/redo_monsci5k.pro /mdisw/idl/cal/egse/mon_sci5k.pro /mdisw/idl/cal/egse/decode_sci5k.pro /mdisw/idl/cal/egse/fits_sci5k.pro /mdisw/idl/cal/egse/disploi_mon5k.pro /mdisw/idl/cal/egse/calc_loi_roll.pro Log files: $GSE_MON5K_DIR/*.mon $GSE_MON5K_DIR/*.roll * SEE ALSO: plot_roll fot_roll