Changes between Initial Version and Version 1 of eqbuf

05/28/12 07:36:01 (10 years ago)



  • eqbuf

    v1 v1  
     3= [wiki:Earthworm Earthworm] Module: eqbuf = 
     4'''Contributed by: ''' 
     6== Function == 
     7Buffers events (part of mega-module) 
     9== Details == 
     10Eqbuf is a sub-module in Earthworm's event-processing mega-module. It is generally the second link in the mega-module and is started by the first link (either eqproc or eqprelim). Eqbuf in turn starts up the third link (generally eqcoda) and communicates to it via a one-directional pipe. Once the third link is started, eqbuf's job is simply to buffer all the messages output by the process that started it. This allows the "head" module to produce events as fast as it cares to while allowing the "tail" of the mega-module to take its time finishing the event-processing. Eqbuf never looks inside a message, it just passes them thru as they are. 
     12== Configuration File Commands == 
     13On startup, eqbuf reads the configuration file named on the command-line. In the control file, lines may begin with a valid eqbuf command (listed below) or with one of 2 special characters: 
     15#  marks the line as a comment (example: # This is a comment). 
     17@  allows control files to be nested; one control file can be 
     18   accessed from another with the command "@" followed by 
     19   a string representing the path name of the next control file 
     20   (example: @model.d). 
     22Command names must be typed in the control file exactly as shown in this document (upper/lower case matters!). 
     26 # 
     27#                 Eqbuf's Configuration File 
     30MyModuleId  MOD_EQPROC     # Module id used to label the logfile.  Eqbuf is a 
     31                           # descendent of the eqproc program.  All descendents 
     32                           # of eqproc need to use eqproc's module id. 
     34RingSize   10              # Buffer will hold RingSize items of size MAX_BYTES_PER_EQ 
     35LogFile     1              # 0=no log; 1=log errors 
     36PipeTo  "eqcoda eqcoda.d"  # The child program to be spawned by eqbuf 
     41Below are the commands recognized by eqbuf, grouped by the function they influence. ALL the commands are required; they must be specified in the control file in order for eqbuf to operate. 
     43        Earthworm system setup: 
     44                MyModuleId      required 
     45                PipeTo          required 
     47        Output Control: 
     48                LogFile         required 
     54In 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 the values used by Calnet are listed after each command description. 
     56The following list is organized by: 
     58command [argument here] 
     60'''!LogFile [switch]'''[[BR]] 
     61Processed by: eqbuf_config[[BR]] 
     62Function: output 
     64Sets 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, eqbuf will write daily log file(s) called eqbufxx.log_yymmdd where xx is eqbuf'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). 
     66Default:  none 
     69'''!MyModuleId [mod_id]'''[[BR]] 
     70Processed by: eqbuf_config[[BR]] 
     71Function: Earthworm setup 
     73Sets 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. 
     75NOTE: eqbuf is part of a mega-module which is ultimately started by the program eqproc. All sub-modules of this megamodule should be given the same module id. 
     77Default: none Calnet: MyModuleId MOD_EQPROC 
     80'''!PipeTo [cmdstring]'''[[BR]] 
     81Processed by: eqbuf_config[[BR]] 
     82Function: Earthworm setup 
     84Sets the command to which eqproc will pipe a "binder-finalized" event for the next step in earthquake processing. Blank spaces are allowed in cmdstring as long as the entire command is enclosed in double-quotes. 
     86Default:  none 
     87Calnet:   PipeTo "eqcoda eqcoda.d" 
     90== Helpful Hints ==