NAME

FEI_Watch

Sics a watchdog on an FEI file type.

SYNOPSIS

FEI_Watch [<options>] [-Type] <file type>]

OPTIONS

-Catalog <catalog>

The name of the database catalog to contain the Conductor pipeline tables. The catalog name may be qualified by the <pipeline> name, following a '.' delimiter. Default: HiRISE.

-Pipeline <pipeline>

The name of the Conductor pipeline to receive Source_Pathname entries for new files found in the FEI server file type. Default: The <file type> name.

-Type <file type>

The name of the FEI file type (a.k.a. venue) to watch for HiRISE observation data files. The option switch need not be supplied; a command line argument without a preceeding option switch is taken to be the file type name.

-Start | -After <time>

Files marked with a time after the start time are to be selected by the FEI_Watchdog. The time format is:

-Notify <notify list> ...]

A comma delimited list of email addresses which will receive notification messages from the FEI_Watchdog and the downlink pipeline. Multiple uses of this option accumulate to the list of names. Default: The username for whomever is running this procedure.

-[Very_]Verbose | -Quiet

Verbose operation provides details about what is being done. Very verbose operation lists each command that is executed. Quiet operation minimizes messages. Default: Quiet.

-Help

The man page for this procedure is listed.

DESCRIPTION

FEI_Watch is a front-end stetup wrapper for FEI_Watchdog.

The following prerequisites must be met:

The <file type> is confirmed confirmed as being present on the FEI server. The procedure will abort if this does not succeed.

A $HiRISE_ROOT/Configuration/<pipeline>/<pipeline>.conf file is created if it does not exist. This includes creation of the directory (all segments of the pathname). The configuration file is created from the template $HiRISE_ROOT/HiDog/HiDog.conf configuration file. Parameters marked with a comment, on the same line, containing the single keyword PIPELINE, FILE_TYPE or NOTIFY will have their values replaced with the <pipeline>, <file type> and <notify list> values, respectively, in the new configuration file.

The Conductor pipeline tables - <pipeline>_Sources and <pipeline>_Procedures - are created in the database <catalog> if they don't already exist. The procedures table is loaded with the procedures defined by HiDog_Pipeline-Create. The contents of the sources table remain unchanged.

The <pipeline>_Watchdog.last_time file in the configuration file directory is updated, or created if it doesn't exist, with the start <time> for selecting files to download. However, if a <pipeline>_Watchdog.lock file exists then this indicates that a FEI_Watchdog process is already monitoring the pipeline and a new one for the same pipeline will not be started; only one watchdog should be monitoring any given pipeline.

Now that the appropriate operating environment for the FEI_Watchdog has been established this procedure executes it, passing all the required operating parameters to it.

Exit Status

0 - Success

On shutdown as a result of an external signal.

1 - Bad command line syntax

A command line syntax usage message will be provided.

2 - A system error occured.

This can be of a missing required FEI_HOME environment variable, the fei5list utility, or the inability to create the configuration file.

3 - FEI failure

The availability of the FEI <file type> could not be confirmed.

4 - Pipeline failure

The <pipeline> tables could not be initialized.

5 - Watchdog failure

The FEI_Watchdog could not be started.

Author

Bradford Castalia, UA/PIRL

Copyright

Copyright (C) 2005-2020 Arizona Board of Regents on behalf of the Lunar and Planetary Laboratory at the University of Arizona.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Version

1.10 2020/04/28 17:36:11