Environment variables

Aus HERMESwiki
Version vom 28. Oktober 2011, 16:05 Uhr von Caro (Diskussion _ Beiträge) (added category)
(Unterschied) ← Nächstältere Version _ Aktuelle Version (Unterschied) _ Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

The Environment Variables Passed by the uDST Daemon

To do a task, the uDST daemon creates a subprocess and then passes a set of environment variables to this subprocess to communicate the nature of the task. In this document, these environment variables and their contents are described in detail.

(1) HERMES_ROOT - the hermes production directory as defined in the udst.conf file
(2) HRC_ROOT - the base directory contain the hrc files from the production. This environment variable is constructed by tacking on the prefix /production/hrc and the suffix /root to the hrc version field of the fill's entry in the fill.conf file. For example, if the hrc version field is "97d", HRC_ROOT is set to /production/hrc/97d/root.
(3) SLOW_ROOT - the base directory contain the fillfiles from the slow production. This environment variable is constructed by tacking on the prefix /production/slow to the slow production version field of the fill's entry in the fill.conf file, e.g. if the version is "07d0", SLOW_ROOT is set to /production/slow/slow07d0
(4) DQ_ROOT - the directory containing the data quality bit patterns produced by Kevin McIlhany. This environment variable is set from the value of the "dqroot" parameter in the udst.conf file.
(5) UDST_ROOT - the base directory for the uDST production. This environment variable is set from the value of the "compath" parameter in the udst.conf file.
(6) HRC_VERSION - the hrc version, this environment variable is set from the hrc version field of the fill's entry in the fill.conf file.
(7) SLOW_VERSION - the slow production version, this environment variable is set from the slow production version field of the fill's entry in the fill.conf file.
(8) UDST_VERSION - the udst production version, this environment variable is set from the udst production version field of the fill's entry in the fill.conf file.
(9) PRODUCTION_LEVEL - the extent to which the uDST production should be progress as determined from the status/command field (column 8) of the fill's entry in the fill.conf file. This variable is only created when a fill is put into production and the valid values are "FULL" and "SETUP" to do a complete production or just the setup production, respectively.
(10) FILLNO - the fill number assigned to this fill. This number is taken from column 2 of the fill's entry in the fill.conf file.
(11) TYPE - the type of uDSTs to produce as determined from the type field of the fill's entry in the fill.conf file. The only valid values for this environment variable are g1, sm, or pd.
(12) MODE - the production mode for uDSTs as determined from the mode field of the fill's entry in the fill.conf file. The only valid values for this environment variables are test or prod.
(13) WIPE_LEVEL -

the extent to which the uDST production should be erased as determined from the status/command field of the fill's entry in the fill.conf file. The daemon only passes this variable to the subprocesses created to remove a uDST production from disk. The only valid values for this environment variable are:

WIPE: remove the whole production (including the production infrastructure); this fill will not automatically be rescheduled for production by the daemon
REDO: remove the whole production (including the production infrastructure); this fill will then be reproduced by the daemon
INSP: remove the uDSTs but keep the production infrastructure intact; this feature is intended to facilitate debugging the uDST production program.
NOTE 1: since the subprocess is executed from a daemon, it does not have any environment variables a priori. In particular, the path to the shareable images are not available and thus most executable codes will crash. These paths are set in all production scripts right at the beginning to avoid the aforementioned problem.
NOTE 2: the "true" name of the fill, e.g. "fill.07.09.96-12:35:22", is *NOT* sent as a environment variable because the executed process is expected to extract this information from its current working directory.