Experiment.config Reference Manual
The Experiment.config
file is a shell script
which defines key features
of an instrument's configuration by defining shell variables.
It should originate in your source directory and
also be added to your .spec file on a line which reads:
SCRIPTS = Experiment.config
This will cause "make distribution" to copy this file to the
GSE directory and/or the flight directory. In real flight
configurations where a separate computer is used for data
acquisition, Experiment.config must also be copied into the
/home/flight directory. (More on that later)
Among other things, Experiment.config may contain the
following:
|
|
- QNX6 flight.sh variables:
|
- Experiment=abc
- HomeDir=/home/abc
- These two lines are always required. The HomeDir must not
be node-specific, since it should refer to both the GSE
directory on the GSE node and the flight directory on the
flight node.
- FlightNode=3
- This is usually not required, since the scripts should be
able to locate the flight node via the Experiment name. This
may be specified for ad-hoc experiments or simulations.
It is very important that this agree with reality if
specified.
For QNX6: Since node names are easily configurable,
it is required that FlightNode be defined whenever using
a dedicated parent loop (usually by invoking 'login flight'
from tinit) and must not be defined when running ad hoc
operations on a local node. The value is the node's simple
hostname, e.g. FlightNode=tilde
.
- AltDir=//1/pc/home/abc
- AltDir specifies an alternate location to find the flight
directory. This is used when the flight filesystem is on
removable media which might move to a different location for data
analysis. The AltDir specification will only be used if the
flight node is not found on the network.
- This line replaces the definition of EXTRACTIONS in earlier
versions of the reduce script. If defined, these extractions
will be run during a "reduce".
- Analysis='anal/crunch.sh $analdir'
- Defines an executable (or executable script) to be
invoked by reduce after any extractions have been performed.
$analdir is a shell variable which defines where the extraction
products (e.g. spreadsheets) are located. $directory is another
variable which indicates where the raw data is located.
If the script requires options, they should be included
in the definition.
It is my practice to store Analysis scripts in the anal
subdirectory, so a natural definition might be:
Analysis='anal/script -f opt $analdir'. Note that single quotes
must be used in this definition so the shell variables won't be
expanded too early.
- FixDisk=no
- Referenced by saverun, this option determines whether the
QNX chkfsys is run on the flight disk before any file copying
is performed. The default is no.
- CopyData=yes
- Referenced by reduce, this option determines whether logged
TM data is copied from the flight node to the GSE node. The
default is yes. Specifying no does not disable extractions or
analysis which will simply reference the raw data directly on
the flight node. The extracted data will be place in the
current directory and in subdirectories thereof.
- CopyHook='. CopyHook'
- If defined, reduce eval's this variable after data is
copied.
- CopySpace=5000
- If defined, specifies the amount of space in KB that
should be left on the target device after the data is
copied. If the condition cannot be met, the copy is skipped
and a warning message is issued, but the rest of the reduce
operation continues.
- SaveFiles="run.info"
- When creating a run directory, saverun automatically copies
all files in the HomeDir matching the patterns "*.pcm *.tmc *.prt
*.tma *.sol tm.dac VERSION". SaveFiles is a list of additional
files which saverun should copy. This is useful if you have
custom configuration files which vary from run to run which you
would like to save.
- LogFiles="*.log"
- LogFiles identifies files located in the HomeDir of the
flight node that should be moved into the run directory by
saverun. The default value of "*.log" will move the standard
experiment log file, (and *.log should therefore be part of any
LogFiles definition). Any directories which match these patterns
will be ignored.
- LogDirs="log*"
- LogDirs identifies subdirectories that saverun should move
into the run directory. Any regular files (non-directories) which
match these patterns will be ignored.
- RunLog="saverun.log"
- RunLog indicates that the specified file should contain text
describing the nature of the run. If the file is found in the run
directory after all the SaveFiles, LogFiles and LogDirs have been
processed, no further action is required. Otherwise, saverun will
prompt the user to enter a description of the run which will be
written to this file.
- Dircksum=maybe
- If set to "yes", specifies that dircksum should be run on all
new run directories after all the files are moved and/or copied
into it. If set to "no", dircksum will never be run.
If set to "maybe", the user will be prompted to
determine whether a dircksum is warranted unless the run
has been designated a 'flight' run, in which case the
"maybe" is promoted to "yes".
If Dircksum is undefined, dircksum will be run for
flight data only and not for any other run type.
Running dircksum can add a considerable amount of
time to the processing of flight data,
but experimenters should definitely consider enabling this option
as one of the best methods of safeguarding the quality of their
data as it is propogated from system to system.
- RunType=raw/flight
- Specifies the subdirectory under which new runs should
be saved by saverun. The specified directory must be one of
'raw/flight', 'raw/preflt', 'raw/cal', 'raw/data', 'raw/junk'
or 'ask'. In the case of 'ask', the user will be prompted for
where to save the data. If RunType is unspecified, the runs
are saved directly under the run directory.
- SaverunHook='. SaveHook'
- If defined, saverun eval's this variable after it is
determined that there are log files worth saving and
before the RunType has been determined.
QNX6 Script Selection Variables
These variables define what instrument operation script is run
by the flight.sh
script.
- SCRIPT_OVERRIDE=
/net/$FlightNode$HomeDir/script
- EXP_NODES=
"hci hcigse"
- SCRIPT_OVERRIDE allows a “doit” script to specify which
startup script to run on the flight computer
or to prevent any script from running. As such, it is strongly recommended
for any instrument, and the value specified here is a useful default.
The value of this variable is the name of a file that may contain
the name of a script. If the file exists, the name of the script is
read from the file, and the file is deleted.
As of flight-2.5.36, SCRIPT_OVERRIDE works in conjunction with the EXP_NODES
variable to specify a script file location on any one of multiple nodes.
If SCRIPT_OVERRIDE is not an absolute path (does not start with a slash), it
is assumed to be a file name relative to the $HomeDir directory on any one
of the nodes specified in the EXP_NODES variable. When using EXP_NODES, it is
reasonable to set SCRIPT_OVERRIDE=script
with no additional path information
required.
EXP_NODES is also used by the distribute convenience command. When given
no arguments, distribute runs make distribution
with TGTNODE
specified correctly for each node in $EXP_NODES.
- PICKFILE=
'eval echo runfile.`sbswitch`'
- If SCRIPT_OVERRIDE is not defined or the file it specifies does
not exist and PICKFILE is defined,
PICKFILE is eval'ed, and the output is the name of a script file.
- RUNFILE=
interact
- If neither of the previous two cases apply and RUNFILE is defined, it is the name of the script to run. Otherwise the script name is
runfile.dflt
.
- SUBBUSD=
serusb
- Since subbus access may be required by PICKFILE before the
RUNFILE is executed, we need a place to start subbusd. If this
variable is defined and /dev/huarp/subbus is not present, flight.sh
will launch subbusd_$SUBBUSD before deciding what script to run.
The currently available options are
serusb
and
sc104
.
- SUBBUSD_DELAY=
3
- If
SUBBUSD
and SUBBUSD_DELAY
are both
defined, SUBBUSD_DELAY
specifies the number of seconds
to sleep
before launching the specified subbusd driver.
This may be necessary if the flight computer boot up time is shorter
than the subbus device initialization.
- NETWORK_DELAY=
0
- Specifies the number of seconds to
sleep
during
instrument startup before
checking for script files on the network. The default is 3 seconds. If
set to 0, no delay will occur. It may make sense to defeat or reduce
this delay if SUBBUSD_DELAY
is defined.
- LOOP_ON_FILE=
saverun.log
- If the named file exists after the instrument shuts down,
flight.sh
will automatically run reduce
and then restart the instrument.
The LOOP_ON_FILE
should probably be the same file as that
defined by RunLog
. Also make sure that RunType
is defined so saverun will not hang waiting for interaction.
- RESTART_FILE=
restart.txt
- If the named file exists after the instrument shuts down,
flight.sh
will delete the file and automatically restart the instrument without
running reduce
.
- OSUPDATEREQ
- This is not a variable defined in Experiment.config at all.
If flight.sh discovers a file named OSUPDATEREQ in the current
directory during instrument startup, it will sleep until the file
is deleted. This can make it easier to interrupt normal processing
to update operating system or instrument files.
- LOOP_START_FILE=
loopstart.txt
- This variable defines the name of a temporary file created and deleted
by
flight.sh
as part of the looping control architecture. The
default name is loopstart.txt
and should rarely if ever need
to be redefined.
- LOOP_STOP_FILE=
loopstop.txt
- This variable defines the name of a temporary file created and deleted
by
flight.sh
as part of the looping control architecture. The
default name is loopstop.txt
and should rarely if ever need
to be redefined.
Additional definitions may be added over time and should be
documented here when added. Ambitious experimenters are
encouraged to add their own experiment-specific
configuration information to
this file. I will be happy to help implement such an
approach.
Return to Manuals Guide