nq2gif Configuration File Commands

(last revised 28 December 2008)
Page Index:
1. Example configuration file
2. Functional command listing
3. Alphabetic command listing & description
4. Descriptor file example

On startup, nq2gif reads the configuration file named on the command line. As always, the configuraton file contains comments:

#  marks the line as a comment (example: # This is a comment).
Command names must be typed in the control file exactly as shown in this document (upper/lower case matters!). nq2gif supports one diagnostic command line option, -v is for verbose mode so that you can see packets coming in.

1. EXAMPLE CONFIGURATION FILE

#
# nq2gif configuration file
#
# This code receives MiniSEED records as files, reads them and
# plots them as GIF images suitable for quick review.
#
#
ModuleId       MOD_NQ2GIF        # module id for this import,
InRingName     HYPO_RING         # shared memory ring for input

HeartBeatInt   10      # Heartbeat interval in seconds
                       # this should match the nq2ring.desc heartbeat!

LogFile         1      # If 0, don't write logfile;; if 1, do
                       # if 2, log to module log but not stderr/stdout

# Directory where we should look for the NetQuakes miniSEED files
NQFilesInDir    /home/luetgert/getfiles/netquakes/nq2gif

# Directory where the successfully processed files are put
NQFilesOutDir /home/luetgert/getfiles/netquakes/nq2gif/save

# Directory where the problem files are put
NQFilesErrorDir /home/luetgert/getfiles/netquakes/nq2gif/trouble

GifDir       /home/luetgert/gifs/netquakes/         # Directory for temporary .gif files.
LocalTarget  /home/luetgert/sendfiles/netquakes/    # Directory for .gif files for output

StationList /home/earthworm/run/params/netquake.db1 # The file with all the station metadata.

# Plot Display Parameters - 
		# The following is designed such that each SCN creates it's own
		# helicorder display; one per panel of data.
		
# 01 SecsPerPlot     Total number of seconds per gif image
# 02 XSize           Overall size of plot in inches Setting these > 100 will imply pixels
# 03 YSize           Ysize/channel.
#                                      
#         01    02   03   04  05 06 07 

 Display  30  1200  200 

# Filter Parameters - [[[ NOT YET IMPLEMENTED ]]]
#
# 01 fLow     Lower filter corner (Hz)
# 02 fHigh    Upper filter corner (Hz)
# 03 fType    Filter type 0 - No Filter
#                         1 - Low Pass ( Uses fHigh)
#                         2 - High Pass ( Uses fLow)
#                         3 - Band Pass ( Uses fLow & fHigh)
#                                      
#         01    02   03   04  05 06 07 

Filter    0.01  20    3 

Logo    smusgs.gif   # Name of logo in GifDir to be plotted on each image
UseDST

# Debug switch: the token "Debug" (without the quotes) can be stated.
# If it is, lots of weird debug messages will be produced 
  Debug

2. FUNCTIONAL COMMAND LISTING

Below are the configure commands recognized by nq2gif, grouped by the function they influence. Most of the commands are required.

         Earthworm system setup:
        MyModuleId           required
        RingName             required
        RingName            required
        HeartbeatInt       required
    
    Output Control:
        LogFile                required

3. ALPHABETIC COMMAND LISTING & DESCRIPTION

In the following section, all configuration file commands are listed in alphabetical order. Listed along with the command (bold-type) are its arguments (in red), the name of the subroutine that processes the command, and the function within the module that the command influences. A detailed description of the command and is also given. Default values and example commands are listed after each command description.


command arg1                processed by        function


HeartbeatInt beat            HeartBeat        Earthworm setup        
Beat the nq2gif heart every beat seconds.


Default:  0 - do not use logit() for LOG channels

LogFile switch                GetConfig        Earthworm Setup        
Sets the on-off switch for writing a log file to disk. If switch is 0, no log file will be written. If switch is 1, nq2gif will write a daily log file(s) called q2ewxx.log_yymmdd where xx is nq2gif's module id (set with "MyModuleId" command) and yymmdd is the current UTC date (ex: 960123) on the system clock. The file(s) will be written in the EW_LOG directory (environment variable).

Default:  none

MyModuleId mod_id            GetConfig        Earthworm setup        
Sets the module id for labeling all outgoing messages. mod_id is a character string (valid strings are listed in earthworm.d) that relates (in earthworm.d) to a unique single-byte number.

Default:  none                
Calnet:   MyModuleId MOD_nq2gif

RingName ring                GetConfig        Earthworm setup        
This is the ring into which the waveforms and messages are sent.
Default:  none, required option                
ATWC:   RingName WAVE_RING


4. DESCRIPTOR FILE EXAMPLE

Here is a copy of the nq2gif.desc file as implemented. Note that all causes of death for nq2gif feed through the function q2ew_die() which logs all causes of death using logit() and sends a message to the statmgr utility.


modName  nq2gif
modId    MOD_nq2gif
instId   INST_MENLO

restartMe    # restart this sucker as it is critical to data collection
#
#
#    Heartbeat Specification.  If the status manager does not receive
#    a heartbeat message every  seconds from this module, an
#    error will be reported (client module dead).   is the maximum
#    number of pager messages that will be reported and  is the
#    maximum number of email messages that will be reported.  If the
#    page or mail limit is exceeded, no further errors will be reported
#    until the status manager is restarted.
#
tsec: 20  page: 0  mail: 99

# these are the statmgr messages that nq2gif will send before dieing
#
#
err: 0  nerr: 1  tsec: 0  page: 5  mail: 20
text: "COMSERV has a problem and died"
#
err: 1  nerr: 1  tsec: 0  page: 5  mail: 20
text: "COMSERV Recv NO DATA TIMEOUT and died"
#
err: 2  nerr: 1  tsec: 0  page: 5  mail: 20
text: "SIGNAL caused nq2gif to die"
#
err: 3  nerr: 1  tsec: 0  page: 5  mail: 20
text: "EW tport_putmsg() failed, nq2gif dead"
#
err: 4  nerr: 1  tsec: 0  page: 5  mail: 20
text: "EW TERMINATE recv'd, nq2gif dead"
#
err: 5  nerr: 1  tsec: 0  page: 5  mail: 20
text: "EW config problems on startup, nq2gif dead"
#
# BELOW: WARNINGS, NOT FATAL YET 
err: 6  nerr: 1  tsec: 0  page: 5  mail: 20
text: "qlib2 decompression errors"
#
Module Index | nq2gif Overview