Manuals: slinktool


slinktoolSeedLink client for data stream inspection, data collection and server testing


slinktool [options] [host][:][port]


slinktool connects to a SeedLink server and queries the server for information or requests data using uni-station or multi-station mode and prints information about the packets received. All received packets can optionally be dumped to a single file or saved in custom directory and file layouts.


Option Description
-V Report program version and exit.
-h Print program usage and exit.
-v 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.
-P Ping the server: connect, print out the server ID and exit. If the server was successfully contacted the return code will be 0, if errors were encountered the return code will be 1.
-p 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.
-u Print data samples in data packets, implies at least one -p flag.
-nd delay 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.
-nt timeout The network timeout (in seconds) for the connection to the SeedLink server. If no data [or keep alive packets?] are received in this time 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.
-k keepalive Requires SeedLink >= 3
Keepalive packet 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.
-x statefile[:interval] 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 interval is specified the state will be saved every interval packets that are received. Otherwise the state will be saved only on normal program termination.
-d Configure the connection in dial-up mode. The remote server will close the connection when it has sent all of the data in it’s buffers for the selected data streams. This is opposed to the normal behavior of waiting indefinately for data.
-b Configure the connection in batch mode. Negotiation with the remote server is made faster by minimizing acknowledgement checks.
-o dumpfile If specified, all packets (Mini-SEED records) received will be appended to this file. The file is created if it does not exist. A special mode for this option is to send all received packets to standard output when the dumpfile is specified as -. In this case all output besides these records will be redirected to standard error.
-A format If specified, all packets (Mini-SEED records) received will be appended to a directory/file structure defined by format. All directories implied in the format string will be created if necessary. See the section Archiving data.
-SDS SDSdir If specified, all packets (Mini-SEED records) received 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 esentially a preset version of -A option. The SDS dir/file structure is:
-BUD BUDdir If specified, all waveform data packets (Mini-SEED data records) received 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 essentially a preset version of -A option. The BUD dir/file structure is:
-s selectors This defines 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 using the -S or -l options.
-l streamfile A list of streams will be read from the given file. This option implies multi-station mode. The format of the stream list file is given below in the section Stream list file.
-S stream[:selectors],... Requires SeedLink >= 2.5
A list of streams is given as an argument. This option implies multi-station mode. The stream list is composed of multiple streams (stations) and optional selectors. stream should be provided in NET_STA format and selectors are normal SeedLink selectors, see examples and notes below. If no selectors are provided for a given stream, the default selectors, if defined, will be used.
-tw start:[end] Requires SeedLink >= 3
Specifies a time window applied, by the server, to data streams. 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 indefinately. This option will override any saved state information.

Warning: time windowing might be disabled on the remote server.
-i level Requires SeedLink >= 3
Send an information request (INFO); the returned raw XML response is displayed. Possible levels are: ID, CAPABILITIES, STATIONS, STREAMS, GAPS, CONNECTIONS, ALL. Formatted INFO shortcuts (formats the XML for readability):
-I – print server id/version and exit
-L – print station list and exit
-Q – print stream list and exit
-G – print gap list and exit
-C – print connection list and exit

*Warning: informational (INFO) messages might be disabled on the server.
[host][:][port] A required argument, 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.


All-station/Uni-station mode example

The following would connect to a SeedLink server at port 18000 and configure the link in all-station/uni-station mode, exactly which data are received depends on the data being served by the SeedLink server on that particular port. Additionally, all of the received packets are appended to the file data.mseed and each packet received is reported on the standard output.

>slinktool -v -o data.mseed

The -s argument could be used to indicate selectors to limit the type of packets sent by the SeedLink server (without selectors all packet types are sent). The following would limit this connection to BHZ channel waveform data with a location code of 10 (see an explanation of SeedLink selectors below). Additionally another verbose flag is given, causing slinktool to report detailed header information from data records.

>slinktool -vv -s 10BHZ.D -o data.mseed

Multi-station mode example:

The following example would connect to a SeedLink server on localhost port 18010 and configure the link in multi-station mode. Each station specified with the -S argument will be requested, optionally specifying selectors for each station.

>slinktool -v -S GE_WLF,MN_AQU:00???,IU_KONO:BHZ.D :18010

This would request GEOFON station WLF (all data as no selectors were indicated), MedNet station AQU with location code 00 (all channels) and IU network station KONO (only waveform data) from channel BHZ.

Of course, a variety of different data selections can be made (only one -S option):


(horizontal BH channels, data only)


(vertical channels only)

Wildcarding network and station codes

Some SeedLink implementation support wildcarding of the network and station codes, when this is the case the only two wildcard characters recognized are * for one or more characters and ? for any single character. As an example, all US network data can be requested using the following syntax:

-B -S 'US_*

SeedLink selectors are used to request specific types of data within a given data stream, in effect limiting the default action of sending all data types. A data packet is sent to the client if it matches any positive selector (without leading !) and doesn’t match any negative selectors (with a leading !). The general format of selectors is LLSSS.T, where LL is location, SSS is channel and T is type (one of [DECOTL] for Data, Event, Calibration, Blockette, Timing, and Log records). LL, .T, and LLSSS. can be omitted, implying anything in that field. It is also possible to use ? in place of L and S as a single character wildcard. Multiple selectors are separated by space(s).

Some examples:

BH? BHZ, BHN, BHE (all record types)
00BH?.D BHZ, BHN, BHE with location code ‘00’ (data records)
BH? !E BHZ, BHN, BHE (excluding detection records)
BH? E BHZ, BHN, BHE & detection records of all channels
!LCQ !LEP exclude LCQ and LEP channels
!L !T exclude log and timing records

Archiving data

Using the -A format option received data can be saved in a custom directory and file structure. The archive format argument is expanded for each packet processed using the following flags:

n network code, white space removed
s station code, white space removed
l location code, white space removed
c channel code, white space removed
Y year, 4 digits
y year, 2 digits zero padded
j day of year, 3 digits zero padded
H hour, 2 digits zero padded
M minute, 2 digits zero padded
S second, 2 digits zero padded
F fractional seconds, 4 digits zero padded
% the percent (%) character
# the number (#) character
t single character type code:
D – waveform data packet
E – detection packet
C – calibration packet
T – timing packet
L – log packet
O – opaque data packet
U – unknown/general packet
IINFO packet
? – unidentifiable packet

The flags are prefaced with either the % or # modifier. The % modifier indicates a defining flag while the # indicates a non-defining flag. All received packets with the same set of defining flags will be saved to the same file. Non-defining flags will be expanded using the values in the first packet received for the resulting file name.

Time flags are based on the start time of the given packet.

For example, the format string:


would be expanded to day length files named something like:


Using non-defining flags the format string:


would be expanded to:


resulting in hour length files because the minute and second are specified with the non-defining modifier. The minute and second fields are from the first packet in the file.

Stream list file

The stream list file used with the -l option is expected to define a data stream on each line. The format of each line is:

<net> <station> [selectors]

The selectors are optional. If default selectors are also specified (with the -s option), they they will be used when no selectors are specified for a given stream. An example file follows:

----  Begin example file -----
# Comment lines begin with a '#' or '*'
# Example stream list file for use with the -l argument of slclient or
# with the sl_read_streamlist() libslink function.
----  End example file -----


All diagnostic output from slinktool is printed to standard error (stderr), exceptions are when printing Mini-SEED packet details (the -p flag), when printing unpacked samples (the -u flag) and when printing the raw or formatted responses to INFO requests.

SeedLink is currently distributed as part of the SeisComP package. For more information see,




Release date:     Modified date:

19:38:00 v.ad6b513c