Database Distribution: System Files

Contents

local.config

This csh script is sourced by scripts such as run_import.sh to set up the SRT and DBMauto environments. Normally there is only one configuration file per site, although there may be more, for example is a site is both a Master and a Slave.

For sh and bash users the file will have to be modified. Change lines from:-

  set switch value
to:-
  switch=value
  export switch    
  ( on bash you can abbreviate this to:
       export switch=value )

The local configuration file starts by defining a set variables that define:-

Initial values for these variables are taken from the environment during priming but may be adjusted as required. If your setup scripts are in a non-standard place then you can by-pass these variables and hack your version of launch.csh (.or .sh) replacing the section that starts:-

    ###  Load the configuration file.

replacing them with the code you need to set up MINOS.

local config also defines :-

It is essential, both for importing and exporting, that a Database account with write access is selected with the ENV_TSQL_* variables. These are primed with the ENV_TSQL_UPDATE_* variables, or set to "???" if those variables are not defined while priming. Make sure that local.config only lists one database, the default might be to have 2 with "temp" as the first, in which case the updates will go into "temp"!!

The remainder of the configuration file contains the following entries to configure DBMauto:-

run_import.sh

This is a cron job script used to import data into the local database.

run_checksum.sh

This is a cron job script that is part of the Distribution Validation System. It carries out a checksum analysis of the local database and sends the results to the dbm_coordinator_list.

FNAL_import.context

This is a file read by run_import.sh to determine what update to take next and when to send heartbeat mail

Here is a typical .context file:-

Hearbeat No:           19
Update No:             146

run_export.sh scripts also use .context files although these have a further two lines. For example-

Heartbeat No:          19
Update No:             146
Export last date:      2003-01-09 12:32:24
Export previous date:  2003-01-09 11:18:15

DBMauto supports a second type of Heartbeat: clock synchronised, that reports at a specified time of day rather than after a specified number of program executions. The advantage is that it appears at the same time day even if, for some reason, the cron job has run less frequently (or more frequently). This format looks like:-

Heartbeat No:          At: 01:00:00  Next: 2006-05-20 01:00:00
It gives the time of day (At:) and when the next report is due (Next:). To switch to this form simply change your context file to this format but follow the data and time syntax exactly or it will not be recognised and will continue to use program execution counting.

Note that date/times all are in UTC.

After priming or repriming the database change the update number to the value corresponding to the priming update set you used.

FNAL_import.log

This contains a log of the imports into the local database. For Master sites there is a corresponding log of exports. Note that date/times all are in UTC.


Return to the top-level Database Distribution document
Last Modified: $Date: 2007/01/23 07:47:26 $