Earthworm Modules:
nmxptool configuration file

(beta revision, last revised 10 December, 2007)
Page Index:
1. Functional command listing
2. Alphabetic command listing & description
3. Advanced Description
4. Sample Configuration File

On startup, nmxptool reads the configuration file named on the command line. Commands in this file set all the parameters used for configuring the Earthworm Nanometrics client module nmxptool (Nanometrics). In the control file, lines may begin with a valid nmxptool command (listed below) or with one of 2 special characters:

#  marks the line as a comment (example: # This is a comment).

@ allows control files to be nested; one control file can be
accessed from another with the command "@" followed by
a string representing the path name of the next control file
(example: @model.d).
Command names must be typed in the control file exactly as shown in this document (commands are case sensative).  Blank lines are also permitted in the control file.

1. FUNCTIONAL COMMAND LISTING

Below are the commands recognized by nmxptool, grouped by the function they influence. Most of the commands are required; they may be specified in any order in the control file.

        Earthworm system setup:
MyModuleId required
RingName required
HeartBeatInterval required
Verbosity optional

Nanometrics server and connection parameters:
NmxpHost required
NmxpPortPDS optional
NmxpPortDAP optional
ForceTraceBuf1 optional
MaxTolerableLatency optional
DefaultNetworkCode optional
Channel required

Output control:
LogFile required

2. 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 arg processed by in function

Channel streamkey                 ReadConfig              nmxptool parameters

Specifies one stream of data to be requested from the NmxpHost. The streamkey is composed of a network, station and channel code separated by period. network is optional and it is used only for output. Station code can be * that stands for all stations. Within channel code can appear character ? that stands for any characters.

Default: none
Example: Channel ES.BOB.HH?
Channel *.HHZ
Channel MN.TIR.HH?
Channel SALO.BH?

DefaultNetworkCode network_code                 ReadConfig              nmxptool parameters

Specifies default network code for channels where is omitted.

Default: none
Example: DefaultNetworkCode IV

ForceTraceBuf1 switch                        ReadConfig              Earthworm setup

Sets the on-off switch to force the creation of TRACEBUF messages on systems that support TRACEBUF2 messages. By default, the module will create TRACEBUF2 messages on systems that support them otherwise it will create the older TRACEBUF messages. This switch has no effect on systems that do no support TRACEBUF2 messages. This switch could be useful in environments where a transition is occuring between TRACEBUF and TRACEBUF2 messages, otherwise most people will never use this.

Default: 0 (disabled)
Example: ForceTraceBuf1 1

HeartBeatInterval interval                   ReadConfig              Earthworm setup

Defines the interval in seconds at which the module will issue TYPE_HEARTBEAT messages.

Default: none
Example: HeartBeatInterval 30

LogFile switch                               ReadConfig              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, nmxptool will write a daily log file(s) called nmxptool.log_yymmdd where xx is nmxptool'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).  If switch is 2 the log file is written but output to stdout and stderr is suppressed.

Default: none
Example: LogFile 1

MaxTolerableLatency seconds                                  ReadConfig              nmxptool parameters

Specifies the max tolerable latency for raw stream connection. Range is [60..600].

Default: 600
Example: MaxTolerableLatency 200

MyModuleId mod_id                            ReadConfig              Earthworm setup

Sets the module id for labeling all outgoing trigger, heartbeat, and error messages. mod_id is a character string (valid strings are listed in earthworm.d) that relates to a unique single-byte number.

Default: none
Example: MyModuleId MOD_NMXPTOOL

NmxpHost address                               ReadConfig              nmxptool parameters

Specify the address of the Nanometrics server. This can be either on IP address (four period-separated numbers) or the domain name of the server.

Default: none
Example: NmxpHost naqs1a.int.ingv.it

NmxpPortDAP port                                  ReadConfig              nmxptool parameters

Specifies the IP port number for the DataServer (NmxpHost). This is commonly 28002.

Default: 28002
Example: NmxpPortDAP 28002

NmxpPortPDS port                                  ReadConfig              nmxptool parameters

Specifies the IP port number for the NaqsServer (NmxpHost). This is commonly 28000.

Default: 28000
Example: NmxpPortPDS 28000

RingName ring                                ReadConfig              Earthworm setup

Indicates which shared memory region to use for waveform output.  ring is a character string (valid strings are listed in earthworm.d) that relates (in earthworm.d) to a unique number for the key to the shared memory region.

Default: none
Example: RingName WAVE_RING

Verbosity  level                             ReadConfig              Earthworm setup 

Specifies the level of logging verbosity. Verbosity is a bitmap:
1 Packet, 2 Channel, 4 Raw Stream, 8 CRC32, 16 Connection flow, 32 Packet Management, 64 Extra, 128 Date, 256 Gap, 512 DOD, 1023 All messages.

Default: 0
Example: Verbosity 16

3. Advanced Description

...
..... .
.....
.....

4. Sample Configuration File

#
#                     Configuration File for nmxptool
#
MyModuleId           MOD_NMXPTOOL
RingName             WAVE_RING             # Transport ring to write data to.

HeartBeatInterval    30                    # Heartbeat interval, in seconds.
LogFile              1                     # 1 -> Keep log, 0 -> no log file
                                           # 2 -> write to module log but not stderr/stdout
Verbosity            16                    # Set level of verbosity. Verbosity is a bitmap:
                                           # 1 Packet, 2 Channel, 4 Raw Stream,
                                           # 8 CRC32, 16 Connection flow,
                                           # 32 Packet Management, 64 Extra, 128 Date,
                                           # 256 Gap, 512 DOD, 1023 All messages.

NmxpHost             naqs1a.int.ingv.it    # Host address of the NaqsServer server
NmxpPortPDS          28000                 # Port number of the NaqsServer server (Default 28000)
NmxpPortDAP          28002                 # Port number of the DataServer server (Default 28002)

#ForceTraceBuf1      0                      # On systems that support TRACEBUF2
                                           # messages this flag will force the module
                                           # to create TRACEBUF messages instead.
                                           # Most people will never need this.

MaxTolerableLatency  120                   # Max tolerable latency for each channel. (Default 600 sec.)
                                           # In general, do not use with parameter TimeoutRecv.

DefaultNetworkCode   IV                    # Default network code where in Channel is not declared

                                           # Channel is like NET.STA.CHAN
                                           # NET  is optional and used only for output.
                                           # STA  can be '*', stands for all stations.
                                           # CHAN can contain '?', stands for any character.
                                           # Example:  *.HH?,N1.STA2.??Z,STA3.?H?
Channel              ES.BOB.HH?
Channel              MN.TIR.HH?
Channel              MDI.HH?
Channel              DOI.HH?
Channel              SALO.HH?
Channel              MONC.HH?
# Channel              *.BHZ               # Channel selection

Module Index | nmxptool Overview

Contact: quintiliani at ingv.it