Runlog: Difference between revisions

From CLONWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The number of programs located in ''$CLON/src/runlog'' and running at various stages of the Data Aquisition process.
The number of programs located in ''$CLON/src/runlog'' are running at various stages of the Data Aquisition process.


'''run_log_begin''' executed in the end of ''Prestart'' transition (see ''run_prestart_end.csh'' rcscript)
'''run_log_begin''' executed in the end of ''Prestart'' transition (see ''run_prestart_end.csh'' rcscript); it collects run-related data and the number of epics channels, produces log file $CLON_PARMS/run_log/archive/begin_<session>_<runnum>.txt, sends data to ipc, dbrouter and datastream. Can be run in recovery mode, in that case it reads data from the log file and sends it to dbrouter.
 
'''begin_run_event''' executed in the end of ''Prestart'' transition (see ''run_prestart_end.csh'' rcscript); it inserts parameter events into special bos/fpack parameter file
 
'''sync_begin_run_event''' executed in Event Builder script of ''Prestart'' transition (see ''run_prestart_eb.csh'' rcscript); it inserts synchronous begin run events into data stream


'''run_log_comment''' executed in Event Recorder script of ''Prestart'' transition (see ''run_prestart_er.csh'' rcscript)
'''run_log_comment''' executed in Event Recorder script of ''Prestart'' transition (see ''run_prestart_er.csh'' rcscript)


'''run_log_files''' executed in the end of ''End'' transition (see ''run_end_end.csh'' rcscript)
'''run_log_files''' executed in the end of ''End'' transition (see ''run_end_end.csh'' rcscript); it reads files $CLON_PARMS/run_files/runfile_<session>_<runnumber>.txt written by Event Recorder, and updates database; if update was successful it tags these files; after file


'''run_log_end''' executed in the end of ''End'' transition (see ''run_end_end.csh'' rcscript), immediately after ''run_log_files''
'''run_log_end''' executed in the end of ''End'' transition (see ''run_end_end.csh'' rcscript), immediately after ''run_log_files''
Line 13: Line 17:
'''run_log_recovery''' reprocess raw datafiles from raid disk(s) or ''/work/recovery'' directory and restores ascii files lost in case of end run failure.
'''run_log_recovery''' reprocess raw datafiles from raid disk(s) or ''/work/recovery'' directory and restores ascii files lost in case of end run failure.


'''run_log_end_update''' can be run after run is finished to recover database information in case of end run failure. It assumes that ascii files were restored by running ''run_log_recovery''.
'''run_log_end_update''' can be run after run is finished to recover database information in case of end run failure. It assumes that ascii files were restored by running ''run_log_recovery''; Sergey B. developed that program being unaware of cron job, whole scheme must be reconsidered ...
 
 


CRON job is running every hour on clon10 to restore database in case if end of run failed. It starts script ''run_cleanup'', which it turn runs following commands:
CRON job is running every hour on clon10 to restore database in case if end of run failed. It starts script ''run_cleanup'', which it turn runs following commands:
Line 20: Line 26:
  run_log_end -a clasprod -s clasprod *.txt
  run_log_end -a clasprod -s clasprod *.txt
  run_file_clean *.txt
  run_file_clean *.txt
Database got updated, new xml tags inserted into run_files, and after that run_files moved into archive subdirectory.
as result database got updated, new xml tags inserted into run_files, and after that run_files moved into archive subdirectory.

Latest revision as of 14:50, 4 June 2009

The number of programs located in $CLON/src/runlog are running at various stages of the Data Aquisition process.

run_log_begin executed in the end of Prestart transition (see run_prestart_end.csh rcscript); it collects run-related data and the number of epics channels, produces log file $CLON_PARMS/run_log/archive/begin_<session>_<runnum>.txt, sends data to ipc, dbrouter and datastream. Can be run in recovery mode, in that case it reads data from the log file and sends it to dbrouter.

begin_run_event executed in the end of Prestart transition (see run_prestart_end.csh rcscript); it inserts parameter events into special bos/fpack parameter file

sync_begin_run_event executed in Event Builder script of Prestart transition (see run_prestart_eb.csh rcscript); it inserts synchronous begin run events into data stream

run_log_comment executed in Event Recorder script of Prestart transition (see run_prestart_er.csh rcscript)

run_log_files executed in the end of End transition (see run_end_end.csh rcscript); it reads files $CLON_PARMS/run_files/runfile_<session>_<runnumber>.txt written by Event Recorder, and updates database; if update was successful it tags these files; after file

run_log_end executed in the end of End transition (see run_end_end.csh rcscript), immediately after run_log_files

run_log_summary extract from database and print run summary for specified run(s)

run_log_recovery reprocess raw datafiles from raid disk(s) or /work/recovery directory and restores ascii files lost in case of end run failure.

run_log_end_update can be run after run is finished to recover database information in case of end run failure. It assumes that ascii files were restored by running run_log_recovery; Sergey B. developed that program being unaware of cron job, whole scheme must be reconsidered ...


CRON job is running every hour on clon10 to restore database in case if end of run failed. It starts script run_cleanup, which it turn runs following commands:

cd $CLON_PARMS/run_files
run_log_files -a clasprod -s clasprod *.txt
run_log_end -a clasprod -s clasprod *.txt
run_file_clean *.txt

as result database got updated, new xml tags inserted into run_files, and after that run_files moved into archive subdirectory.