-
Notifications
You must be signed in to change notification settings - Fork 17
A SeedLink server for Earthworm
This is a description of how to set up a SeedLink data server for waveform data read from an Earthworm ring using the ew2ringserver and ringserver programs.
The ew2ringserver program is included with Earthworm release 7.7 and later. Make sure you are using version 1.0 or later of ew2ringserver.
These instructions are written with the assumption that the ringserver and ew2ringserver programs will be managed (started & stopped) using the framework commonly used to managed other processes in an Earthworm startstop system.
- Build latest ringserver program, source code available here: https://github.com/iris-edu/ringserver/releases
The ringserver binary should be copied or moved to a location in your PATH, it is often convenient to simply move it to the location of the Earthworm binaries.
- Create a directory for the ringserver to store it's buffers (e.g. $EW_HOME/run/ring):
$ mkdir $EW_HOME/run/ring
-
Copy the example config file from the ringserver source code (ringserver/doc/ring.conf) to $EW_PARAMS/ringserver.d and edit to configure for your local needs. A minimal ringserver configuration file is illustrated below.
-
Create/copy and then edit ew2ringserver.d as needed to select data streams.
-
Add ringserver and ew2ringserver commands to startstop.d (e.g. startstop_unix.d):
Process "ringserver /FULL/PATH/TO/ringserver.d -STDERR"
Class/Priority OTHER 0
Stderr File
Process "ew2ringserver ew2ringserver.d"
Class/Priority OTHER 0
-
Provide the absolute path to the ringserver configuration file (ringserver does not recognize the EW_PARAMS environment variable).
-
Many options are available for ew2ringserver, see the comments in the default ew2ringserver.d for more details.
- (Re)start startstop system
The ringserver program can be configured using command line parameters or a configuration file. See Configuring the server. Many options are available for the ringserver, such as enabling shipment logging of all SeedLink connections, changing buffer sizes, limiting access by IP address, etc. See the manual for full details.
The most important options to set for running a SeedLink server:
- Set the RingDirectory parameter to full path of the directory created earlier.
- Uncomment the SeedLinkPort parameter line (default port is 18000).
- Uncomment and set the ServerID parameter to something descriptive of your data center.
Review the other options in the full ringserver configuration file included with the source code.
A minimal configuration file for a simple SeedLink server might be:
# The ring buffer directory must already exist, create if needed
RingDirectory /FULL/PATH/TO/ring
ListenPort 16000
ListenPort 18000
ServerID "XX Seismic Network"
# Uncomment these to write transfer logs for a record of data served
#TransferLogDirectory tlog
#TransferLogRX 0