All the main programs involved in the pipeline are called daemons because they never stop running and are independant from each other. Although they perform completely different tasks, all the daemons have strong common points, as explained now.
Each daemon is a C-Shell script. When started, a daemon reads its parameters and then goes into an infinite loop. This main loop is made of an active part, where the daemon does the actual processing of the files, and an idle part, where the daemon sleeps and can be safely interrupted.
All the source codes are currently located in /archive/sw/daemon.
Each daemon has its own working directory, as shown above. It contains files (images) to be processed (usually brought in by another daemon) plus some control files whose name starts with a dot (.). When the daemon is running, the following control files are present:
When the daemon is not running there shouldn't be any .status file in the working directory. Each daemon removes it when it exits gracefully. When the daemon is not running, the content of the .pid file, if any, is undefined.
The archiver daemons have some other control files which are described in section 4.3.1
Each daemon takes its parameters from a parameter file (subsequently called parfile). A daemon parfile is a regular CFHT parfile and is therefore parsed with the Pegasus par command. A daemon is started with the generic sequence:
daemon_name-p parfile
However the operator should never start a daemon that way (see 3.2.2).
A daemon parfile contains at least the card daemon_dir which gives the path to the daemon's working directory. When invoked, a daemon first parses its parfile.
All the parfiles are currently located in /archive/sw/par.
Each daemon has its standard output and standard error logged into a logfile. All the logfiles are currently located in /archive/sw/log.
All the archivers and some miscellaneous daemons maintain a listfile, that is ,a list of the files already processed along with relevant informations (disk label, save set...). The only constraint on the format of these files is that there is one line per file and the first word of each line is the name of the file. All the listfiles are currently located in /archive/sw/list.