Guralp Systems Limited
MAN-SWA-0008 - Guralp Systems' Linux tools

Chapter 6. Configuration files

6.1 gcf-to-miniseed

The configuration file for the gcf-to-miniseed utility consists of three major components: general options, output options, and channel mapping. The format of the configuration file is an ASCII text file with one option per line. White-space and blank lines are ignored. Anything after a # symbol on a line is considered a comment.

Each line is either in the format

option value

or

[section-header]

Quotes are not used in the file.

6.1.1 General options

These appear at the top of the file, before any section header. The available options are:

6.1.2 Output options

These appear below a [miniseed] section header.

6.1.3 Channel mapping options

In manual mapping mode (and in auto mapping mode, if overrides are desired), each GCF block name must be mapped onto a SEED name. This is achieved with a section header consisting of the GCF name: [SYSID-STRID] followed by a single option called seedname which specifies the mapping. For example:

[SYSID-STRID]

seedname = STA.CHA.NET.LOC

[SYSID-STRID]

seedname = STA.CHA.NET

[SYSID-STRID]

seedname = STA.CHA

[SYSID-STRID]

seedname = STA.CHA..LOC

Following SEED 2.4 conventions, STA (the station code) must be 5 characters or less (upper-case A-Z and 0-9), CHA (the channel identifier) must be 3 characters or less (A-Z, 0-9), LOC (the location code) must be 2 characters or less (A-Z, 0-9), and NET (the network code) must be 2 characters or less (a-z, A-Z, 0-9). Either network code or location code may be omitted.

6.1.4 Output file-name options

Output files are created according to the scheme specified in the output_filename option of the [miniseed] section. This gives a template which is used to create the output filenames. If the template is static, all Mini-SEED records will be written to a single file. Otherwise, the following tokens within the file are replaced:

6.2 tcpserial

The configuration file for the tcpserial daemon specifies its operating mode and IP parameters. The format of the configuration file is an ASCII text file with one option per line. White-space and blank lines are ignored. Anything after a # symbol on a line is considered a comment.

Each line is either in the format

option value

or

[section-header]

Quotes are not used in the file.

Note: Note all IP addresses may be IPv4 or IPv6.

6.2.1 Simple server mode options

The simple server mode is specified by including

mode = simple_server

The available options are:

6.2.2 Simple client mode options

The simple client mode is specified by including

mode = simple_client

The only available option is:

6.3 cd11-test-recv

The configuration file for the CD11 test receiver specifies its operating mode and IP parameters. The format of the configuration file is an ASCII text file with one option per line. White-space and blank lines are ignored. Anything after a # symbol on a line is considered a comment.

Each line is either in the formatted

option value

or

[section-header]

Quotes are not used in the file.

6.3.1 Logging options

Unless overridden with the -s command-line switch, cd11-test-recv will, by default, log to the system log (syslog). By default, the application will use a syslog tag based on the name of its configuration file, e.g. ntp-to-nmea[test]. This can be overridden by changing the log_name variable.

The level of messages which can be logged is set by the log_level variable which may take values LOG_DEBUG (which includes debugging messages, of which there are many), LOG_INFO (information and above levels), LOG_NOTICE (important notices and above), LOG_WARNING (warnings and above). The default is LOG_DEBUG, which would be sensible to change for a production system.

It is also possible to log to a file by setting the option log_file with a value which is a valid file-name.

6.3.2 Network configuration options

CD1.1 only works over TCP with IPv4 addressing. There is no UDP or IPv6 support. Unlike some CD1.1 receivers, the Güralp CD1.1 receiving code only requires a single TCP port to listen on; all connections come through this one port.

The address to listen on must be specified - both the IP address (or host-name) and the port number (or service name from /etc/services). This is done by setting the option bind_host, which can be set to 0.0.0.0 to specify listening on all interfaces (the most common situation) and bind_service. Port 8000 is a common choice for the port number for this.

Due to the connection establishment mechanism of CD1.1, it is also necessary to provide the external IP address and port number of the receiver, as it would be viewed by the sender. This is done using the options connect_host and connect_service. It is not possible to use 0.0.0.0 for connect_host; the correct, externally-visible address must be used.

6.3.3 CD1.1 configuration options

receiver_name is the name passed in frame headers. It must be 8-characters or fewer and must consist solely of numbers and/or upper-case letters.

station_type must be set to NDC (National Data Centre), IDC (International Data Centre), or IMS (International Monitoring System) as appropriate. It is passed in frame headers. This setting is not used by Güralp code, except for logging.

senders is a list of sender names, separated by spaces. Connections from senders will only be accepted if they are identified with a name from this list.

6.3.4 File and directory options

clientdb_dir is a directory in which frameset files are stored. These are used for persistence in recording received frames across daemon restarts. This should point to an initially-empty directory. It will be populated with files named after senders.

cert_dir is a directory in which certificates may be loaded. It is optional and is only required if signatures are being verified. It should point to a directory containing files named AUTH_KEY_ID.pem where AUTH_KEY_ID is the base-10 representation of the authentication key ID.

frame_log_dir is the directory in which the frame/subframe log files (.csv files) are written. It will be populated with .csv files named after the senders.

6.3.5 Sample configuration file

The example contents below can be copied and edited to ease configuration of your own instance.

receiver_name = TEST

station_type = NDC

bind_host = 0.0.0.0

bind_service = 8010

connect_host = 81.187.130.163

connect_service = 8010

clientdb_dir = /home/cd11user/CD1.1-testing/framesets

senders = EKA1 EAK2 A3175 TANTALUM A2113

log_file = /home/cd11user/CD1.1-testing/logs/server.log

log_level = LOG_INFO

cert_dir = /home/cd11user/CD1.1-testing/certs

frame_log_dir = /home/cd11user/CD1.1-testing/logs