gempa GmbH

Table Of Contents

Previous topic

win2caps

Next topic

caps_plugin

This Page

capstool

CAPS command-line interface (CLI) client.

Description

capstool is a CAPS client application for retrieving data and listing available streams.

Input File Format

The program has the ability to read requests either from file or from the standard input(when no request file is supplied). The input format is given below.

YYYY,MM,DD,HH,MM,SS YYYY,MM,DD,HH,MM,SS Network Station [Location] Channel

Each request line contains a start and an end time followed by a stream id. The fields Network, Station, Channel and Location support wild cards (*). The latter one is optional. For matching all locations please use the '*' symbol, if empty it assumes that only empty locations are being requested.

Note

The request lines can be generated for a particular event using scevtstreams as of the SeisComP3 release Jakarta-2018.xxx.

Example:

2010,02,18,12,00,00 2010,02,18,12,10,00 GE WLF BH*
2010,02,18,12,00,00 2010,02,18,12,10,00 GE VSU 00 BH*

The program has the ability to read requests either from file or from the standard input(when no reqeust file is supplied).

Examples

List available streams

> capstool -H localhost:18002 -Q

Connect via secure socket layer (SSL) and supply credentials for authentication.

> capstool -H localhost:18002 -s -c user:password -Q

Request file to load MiniSEED data for some GE stations:

2010,02,18,12,00,00 2010,02,18,12,10,00 GE WLF BH*
2010,02,18,12,00,00 2010,02,18,12,10,00 GE VSU BH*

Submit the request in req.txt to the CAPS server, and download miniSEED data to req.mseed.

> capstool -H localhost:18002 -o req.mseed req.txt

Request miniSEED data from a CAPS server. Provide input from standard input. Write the miniSEED data to standard output. Re-direct the output and append it to a file, e.g. data.mseed.

> echo "2015,11,08,10,47,00 2015,11,08,11,00,00 * * BH?" |\
seiscomp exec capstool -H localhost:18002 >> data.mseed

Request miniSEED data from a CAPS server for a particular event with ID <eventID>. Provide the request file using scevtstreams Write the miniSEED data to standard output. Re-direct the output to a file, e.g. <eventID>.mseed.

> scevtstreams -d mysql://sysop:sysop@localhost/seiscomp3 -E <eventID> --caps > req.txt
> seiscomp exec capstool -H localhost:18002 req.txt > <eventID>.mseed

Request file to load Video data for Station HILO:

2013,08,01,00,00,00 2013,08,01,00,30,00 VZ HILO WLS CAM
2013,08,01,00,00,00 2013,08,01,00,30,00 VZ HILO WLS CAM

Submit the request in req.txt to the CAPS server, and download the video data to files using the given pattern:

> capstool -H localhost:18002 -o "%H%M%S.%f" req.txt

Command Line

-h, --help

show a help message and exit

-H, --host

host to connect to (Default is localhost:18002)

-Q

print formatted stream list and exit

--rt

enable real time mode

-o, --output-file

output file for downloaded data. The filename may contain the following format controls: %Y - year, %j - day of year, %H - hour, %M - minute, %S - second, %F - format. Format control currently works for data in format 'ANY', not MSEED'.

--ping

ping host and exit