SeedLink client for data stream archiving
slarchive connects to a SeedLink server, requests data streams and writes received packets into directory/file structures. The precise layout of the directories and files is defined in a format string.
The implemented file layouts are:
To write more than one archive simply specify multiple format definitions (or presets).
The basic directory and file layout is defined as:
<SDSdir>/Year/NET/STA/CHAN.TYPE/NET.STA.LOC.CHAN.TYPE.YEAR.DAY.
Field | Description |
---|---|
SDSdir | Arbitrary base directory |
YEAR | 4 digit YEAR |
NET | Network code/identifier, 1-8 characters, no spaces |
STA | Station code/identifier, 1-8 characters, no spaces |
CHAN | Channel code/identifier, 1-8 characters, no spaces |
TYPE | 1 character, indicating the data type, provided types are: D Waveform data
E Detection data
L Log data
T Timing data
C Calibration data
R Response data
O Opaque data
|
LOC | Location identifier, 1-8 characters, no spaces |
DAY | 3 digit day of year, padded with zeros |
Note
slarchive is a standalone module and does not inherit global options.
Type: string
Host of the Seedlink server to connect to. If the acquisition is running on one system nothing needs to be changed. Default is 127.0.0.1.
Type: int
The port of the Seedlink server to connect to. If the acquisition is running on one system this port must match the configured local Seedlink port. Default is 18000.
Type: string
Path to waveform archive where all data is stored. Relative paths (as the default) are treated relative to the installation directory ($SEISCOMP_ROOT). Default is var/lib/archive.
Type: int
Number of records (512 byte units) to buffer before flushing to disk. Default is 1000.
Type: int
The network reconnect delay (in seconds) for the connection to the SeedLink server. If the connection breaks for any reason this will govern how soon a reconnection should be attempted. The default value is 30 seconds. Default is 30.
Type: int
The network timeout (in seconds) for the connection to the SeedLink server. If no data [or keep alive packets?] are received in this time range the connection is closed and re-established (after the reconnect delay has expired). The default value is 600 seconds. A value of 0 disables the timeout. Default is 900.
Type: int
Timeout for closing idle data stream files in seconds. The idle time of the data streams is only checked when some packets has arrived. If no packets arrived no idle stream files will be closed. There is no reason to change this parameter except for the unusual cases where the process is running against an open file number limit. Default is 300 seconds. Default is 300.
Type: int
Interval (in seconds) at which keepalive (heartbeat) packets are sent to the server. Keepalive packets are only sent if nothing is received within the interval. This requires a Seedlink version >= 3. Default is 0.
slarchive [OPTION]... [host][:][port]
Address ([host][:][port]) is a required argument. It specifies the address of the SeedLink server in host:port format. Either the host, port or both can be omitted. If host is omitted then localhost is assumed, i.e. ':18000' implies 'localhost:18000'. If the port is omitted then 18000 is assumed, i.e. 'localhost' implies 'localhost:18000'. If only ':' is specified 'localhost:18000' is assumed.
Print program version and exit.
Print program usage and exit.
Be more verbose. This flag can be used multiple times ("-v -v" or "-vv") for more verbosity. One flag: report basic handshaking (link configuration) details and briefly report each packet received. Two flags: report the details of the handshaking, each packet received and detailed connection diagnostics.
Print details of received Mini-SEED data records. This flag can be used multiple times ("-p -p" or "-pp") for more detail. One flag: a single summary line for each data packet received. Two flags: details of the Mini-SEED data records received, including information from fixed header and 100/1000/1001 blockettes.
The network reconnect delay (in seconds) for the connection to the SeedLink server. If the connection breaks for any reason this will govern how soon a reconnection should be attempted. The default value is 30 seconds.
The network timeout (in seconds) for the connection to the SeedLink server. If no data [or keep alive packets?] are received in this time range the connection is closed and re-established (after the reconnect delay has expired). The default value is 600 seconds. A value of 0 disables the timeout.
Interval (in seconds) at which keepalive (heartbeat) packets are sent to the server. Keepalive packets are only sent if nothing is received within the interval. Requires SeedLink version >= 3.
During client shutdown the last received sequence numbers and time stamps (start times) for each data stream will be saved in this file. If this file exists upon startup the information will be used to resume the data streams from the point at which they were stopped. In this way the client can be stopped and started without data loss, assuming the data are still available on the server. If an interval is specified the state will be saved every interval in that packets are received. Otherwise the state will be saved only on normal program termination.
Timeout for closing idle data stream files in seconds. The idle time of the data streams is only checked when some packets has arrived. If no packets arrived no idle stream files will be closed. There is no reason to change this parameter except for the unusual cases where the process is running against an open file number limit. Default is 300 seconds.
Configure the connection in "dial-up" mode. The remote server will close the connection when it has sent all of the data in its buffers for the selected data streams. This is opposed to the normal behavior of waiting indefinitely for data.
Configure the connection in "batch" mode.
Future check initially. Check the last Mini-SEED data record in an existing archive file and do not write new data to that file if it is older than a certain overlap. The default overlap limit is 2 seconds; the overlap can be specified by appending a colon and the desired overlap limit in seconds to the option. If the overlap is exceeded an error message will be logged once for each time the file is opened. This option makes sense only for archive formats where each unique data stream is written to a unique file (e.g. SDS format). If a data stream is closed due to timeout (see option -i) the initial future check will be preformed when the file is re-opened.
Future check continuously. Available only for archive Mini-SEED data records. Check if the first sample of the record is older than the last sample of the previous record for a given archive file, within a certain overlap. The default overlap limit is 2 seconds; the overlap can be specified by appending a colon and the desired overlap limit in seconds to the option. If the overlap is exceeded an error message will be logged once until either a non-overlapping packet is received or a new archive file is used. This option only makes sense for archive formats where each unique data stream is written to a unique file (e.g. SDS format).
If specified, all received packets (Mini-SEED records) will be appended to a directory/file structure defined by format. All directories implied in the format string will be created if necessary. The option may be used multiple times to write received packets to multiple archives. See the section "archiving data".
If specified, all received packets (Mini-SEED records) will be saved into a Simple Data Structure (SDS) dir/file structure starting at the specified directory. This directory and all subdirectories will be created if necessary. This option is a preset of the '-A' option. The SDS dir/file structure is:
<SDSdir>/<YEAR>/<NET>/<STA>/<CHAN.TYPE>/NET.STA.LOC.CHAN.TYPE.YEAR.DAY
Details are mentioned later on.
If specified, all received waveform data packets (Mini-SEED data records) will be saved into a Buffer of Uniform Data (BUD) dir/file structure starting at the specified directory. This directory and all subdirectories will be created if necessary. This option is a preset of the '-A' option. The BUD dir/file structure is:
<BUDdir>/<NET>/<STA>/STA.NET.LOC.CHAN.YEAR.DAY
If specified, all received packets (Mini-SEED data records) will be saved into an old style SeisComP/datalog dir/file structure starting at the specified directory. This directory and all subdirectories will be created if necessary. This option is a preset of the '-A' option. The DLOG dir/file structure is:
<DLOGdir>/<STA>/[LOC.]<CHAN>.<TYPE>/STA.NET.CHAN.TYPE.YEAR.DAY.HHMM
The given file contains a list of streams. This option implies multi-station mode. The format of the stream list file is given below in the section "stream list file".
Defining default selectors. If no multi-station data streams are configured these selectors will be used for uni-station mode. Otherwise these selectors will be used when no selectors are specified for a given stream with the '-S' or '-l' options.
The connection will be configured in multi-station mode with optional SeedLink selectors for each station, see examples below. Stream should be provided in NET_STA format. If no selectors are provided for a given stream, the default selectors will be used, if defined.
Requires SeedLink >= 2.5.
Specifying a time window for the data streams that is applied by the server. The format for both times is year,month,day,hour,min,sec; for example: "2002,08,05,14,00:2002,08,05,14,15,00". The end time is optional but the colon must be present. If no end time is specified the server will send data indefinitely. This option will override any saved state information.
Warning: time windowing might be disabled on the remote server.
Requires SeedLink >= 3.