.. highlight:: rst .. _rs2caps: ####### rs2caps ####### **Recordstream data acquisition plugin** Description =========== *rs2caps* uses the `recordstream `_ to feed data into :ref:`CAPS`. Examples ======== Read the :ref:`examples section` to learn how to use *rs2caps* to input data into the CAPS server. Module Configuration ==================== | :file:`etc/defaults/global.cfg` | :file:`etc/defaults/rs2caps.cfg` | :file:`etc/global.cfg` | :file:`etc/rs2caps.cfg` | :file:`~/.seiscomp/global.cfg` | :file:`~/.seiscomp/rs2caps.cfg` rs2caps inherits :ref:`global options`. .. note:: Modules/plugins may require a license file. The default path to license files is :file:`@DATADIR@/licenses/` which can be overridden by global configuration of the parameter :confval:`gempa.licensePath`. Example: :: gempa.licensePath = @CONFIGDIR@/licenses .. confval:: output.address Type: *string* Data output URL [[caps\|capss]:\/\/][user:pass\@]host[:port]. This parameter superseds the host and port parameter of previous versions and takes precedence. Default is ``localhost:18003``. .. confval:: output.host Type: *string* Data output host. Deprecated: Use output.address instead. Default is ``localhost``. .. confval:: output.port Type: *int* Data output port. Deprecated: Use output.address instead. Default is ``18003``. .. confval:: output.timeout Type: *int* Unit: *s* Timeout when sending a packet. If the timeout expires the connection will be closed and re\-established. Default is ``60``. .. confval:: output.bufferSize Type: *uint* Unit: *bytes* Size \(bytes\) of the packet buffer Default is ``1048576``. .. confval:: output.backFillingBufferSize Type: *int* Unit: *s* Length of backfilling buffer. Whenever a gap is detected, records will be held in a buffer and not sent out. Records are flushed from front to back if the buffer size is exceeded. Default is ``0``. .. confval:: output.mseed.enable Type: *boolean* Enable on\-the\-fly MiniSeed encoding. If the encoder does not support the input type of a packet it will be forwarded. Re encoding of MiniSEED packets is not supported. Default is ``false``. .. confval:: output.mseed.encoding Type: *string* MiniSEED encoding to use. \(Uncompressed, Steim1 or Steim2\) Default is ``Steim2``. .. confval:: streams.begin Type: *string* Start time of data time window, default 'GMT' .. confval:: streams.end Type: *string* End time of data time window .. confval:: journal.file Type: *string* File to store stream states Default is ``@ROOTDIR@/var/run/rs2caps/journal``. .. confval:: journal.flush Type: *uint* Unit: *s* Flush stream states to disk every n seconds Default is ``10``. .. confval:: journal.waitForAck Type: *uint* Unit: *s* Wait when a sync has been forced, up to n seconds Default is ``60``. .. confval:: journal.waitForLastAck Type: *uint* Unit: *s* Wait on shutdown to receive acknownledgement messages, up to n seconds Default is ``5``. .. confval:: journal.syncWithBindings Type: *boolean* Whether to synchronize the journal file with bindings. If enabled then each time update\-config is called, the bound stations will be synchronized with the current journal file. Unbound stations will be removed from the journal. Synchronizing with bindings will disable reading the inventory. Default is ``false``. .. confval:: statusLog.enable Type: *boolean* Log information status information e.g. max bytes buffered Default is ``false``. .. confval:: statusLog.flush Type: *uint* Flush status every n seconds to disk Default is ``10``. Bindings Parameters =================== .. confval:: selectors Type: *list:string* List of stream selectors in format LOC.CHA. If left empty all available streams will be requested. Command-Line Options ==================== Generic ------- .. option:: -h, --help show help message. .. option:: -V, --version show version information .. option:: -D, --daemon Run as daemon. This means the application will fork itself and doesn't need to be started with \&. Verbosity --------- .. option:: --verbosity arg Verbosity level [0..4]. 0:quiet, 1:error, 2:warning, 3:info, 4:debug .. option:: -v, --v Increase verbosity level \(may be repeated, eg. \-vv\) .. option:: -q, --quiet Quiet mode: no logging output .. option:: -s, --syslog Use syslog logging back end. The output usually goes to \/var\/lib\/messages. .. option:: -l, --lockfile arg Path to lock file. .. option:: --console arg Send log output to stdout. .. option:: --debug Debug mode: \-\-verbosity\=4 \-\-console\=1 .. option:: --trace Trace mode: \-\-verbosity\=4 \-\-console\=1 \-\-print\-component\=1 \-\-print\-context\=1 .. option:: --log-file arg Use alternative log file. Records ------- .. option:: --record-driver-list List all supported record stream drivers .. option:: -I, --record-url arg The recordstream source URL, format: [service:\/\/]location[#type]. \"service\" is the name of the recordstream driver which can be queried with \"\-\-record\-driver\-list\". If \"service\" is not given, \"file:\/\/\" is used. .. option:: --record-file arg Specify a file as record source. .. option:: --record-type arg Specify a type for the records being read. Output ------ .. option:: -a, --addr arg Data output host in format host:port. .. option:: -b, --buffer-size arg Size \(bytes\) of the journal buffer, if exceeded a sync of the journal is forced. .. option:: --backfilling arg Buffer size in seconds for backfilling gaps. Journal ------- .. option:: -j, --journal arg File to store stream states. Use an empty string to log to standard out. .. option:: -f, --flush arg Flush stream states to disk every n seconds .. option:: --waitForAck arg Wait when a sync has been forced, up to n seconds .. option:: -w, --waitForLastAck arg Wait on shutdown to receive acknownledgement messages, up to n seconds