All modules via messaging
This recipe covers processing playbacks using the messaging and utilizing almost any processing module as scautopick, scautoloc, scmag and scevent. One can tweak several processing parameters and test interactions of the entire processing system without running realtime playbacks taking a lot of time. The drawback of this method is that manual interaction is not possible.
Requirements
- SeisComP3 version: Erice 2009.169
- Configured inventory database and configuration database
- Optional configuration database (created out of trunk/key/*)
- Sorted Miniseed volume (e.g. as created by scart -dsE)
- Running messaging components
Preparations
The easiest way is to setup a SeisComP3 realtime system including all keyfiles. Therefore it is necessary to disable database updates and to remove the standard processing modules when starting SeisComP3.
Deactive database updates
Disabling database updates is important to replay the same event more than once. Otherwise duplicate objects are going to be generated and produce erroneous result. A nice side effect is that the database does not grow and can be used without performance penalties over time.
To deactivate database updates during the processing disable the dbplugin in scmaster.cfg. To do that edit the local configuration file ~/.seiscomp3/scmaster.cfg and add or modify the parameter plugins.
plugins = ""
Deactive processing modules
The next step is to disable all trunk clients during seiscomp start. Change the Client list parameter and set it to _ or change it in ~/seiscomp3/trunk/key/global directly and change the line containing SC3_CLIENTS to
SC3_CLIENTS=''
Usage
After everything is configured correctly the messaging of package trunk has to be started:
seiscomp start trunk
The output should look like this:
sysop@host:~$ seiscomp start trunk SeisComP version 3.0 (2009.163) starting spread starting scmaster
Only spread and scmaster have to be started. To check whether database updates are disable or not scautopick can be utilized. In case the database plugin is loaded by scmaster scautopick will not complain about a missing database connection.
scautopick --console=1
The output should look like this:
sysop@host:~$ scautopick --console=1 log to stderr... 13:18:34 [notice] Starting 13:18:34 [notice] Connection to localhost:4803 established 13:18:39 [error] Timeout while waiting for database provide message 13:18:39 [notice] Shutdown
If scautopick run and does not print any further messages check the database plugin configuration again.
To start the playback the following playback script is used:
#!/bin/sh if [ "$#" -lt 2 ]; then echo "Usage: $0 [mseed-volume] [output-xml]" exit 0 fi DBFLAG="-d mysql://sysop:sysop@localhost/seiscomp3" STORAGE=$DBFLAG FLAGS="--console=1 --verbosity=1 $STORAGE" # Start EventParameters logging # Start autoloc echo "Starting autoloc..." scautoloc $FLAGS --playback --start-stop-msg=1 --auto-shutdown=1 --shutdown-master-module=scautopick & echo "Starting magtool..." scmag $FLAGS --start-stop-msg=1 --auto-shutdown=1 --shutdown-master-module=scautoloc & echo "Starting eventtool..." scevent $FLAGS --start-stop-msg=1 --auto-shutdown=1 --shutdown-master-module=scmag & echo "Starting sceplog..." sceplog $FLAGS --auto-shutdown=1 --shutdown-master-module=scevent > $2 & pid=$! # Start autopick echo "Starting autopick..." scautopick -I $1 $FLAGS --start-stop-msg=1 echo "Finished waveform processing" wait $pid echo "Finished event processing"
NOTE: To adjust the database connection modify the DBFLAG parameter.
To start a playback the Miniseed volume is passed as first parameter. The second parameter is the resulting output XML file.
sysop@host:~$ sh playback.sh event.mseed-sorted event.xml
Output
The output file can be analyzed using the SeisComP3 libraries (C++ or Python) or by hand using any XML parser available.
scbulletin can be used to convert it into the SeisComP3 bulletin format.
scbulletin -i event.xml -3 > event.bulletin
Attachments
-
playback.sh
(0.8 KB) - added by jabe
Playback script