Once the Linux system is installed the SeisComP modules need to be configured including the initial configuration and the connection to the database. The central tool to configure and control the system is seiscomp which is explained more deeply in the next chapter. A user-friendly graphical frontend to seiscomp is scconfig.
To configure SeisComP with the database initially execute the steps listed in the section Getting started. You will need to consider differences in the database:
MariaDB / MySQL¶
The initial configuration allows to create and configure the MariaDB/MySQL database for SeisComP. Continue with the general setup.
With Ubuntu 16.04 MariaDB has become the standard flavor of MySQL in Ubuntu and either MariaDB or MySQL can be installed. The implementation of MariaDB in Ubuntu requires additional steps. They must be taken before the initial configuration in order to allow SeisComP to make use of MariaDB.
The full procedure including database optimization is:
user@host:~$ sudo systemctl enable mariadb user@host:~$ sudo mysql_secure_installation provide new root password answer all questions with yes [Enter] user@host:~$ sudo vim /etc/mysql/mariadb.conf.d/50-server.cnf [mysqld] innodb_buffer_pool_size = <your value> innodb_flush_log_at_trx_commit = 2 user@host:~$ sudo systemctl restart mysql user@host:~$ sudo mysql -u root -p CREATE DATABASE seiscomp CHARACTER SET utf8 COLLATE utf8_bin; grant usage on seiscomp.* to sysop@localhost identified by 'sysop'; grant all privileges on seiscomp.* to sysop@localhost; grant usage on seiscomp.* to sysop@'%' identified by 'sysop'; grant all privileges on seiscomp.* to sysop@'%'; flush privileges; quit user@host:~$ mysql -u sysop -p seiscomp < ~/seiscomp/share/db/mysql.sql
Currently, the scconfig wizard and seiscomp setup cannot be used to set up the MariaDB database. The option “Create database” must therefore be unchecked or answered with “no”.
The initial configuration allows configuring the PostgreSQL database parameters for SeisComP. It does not allow to create the database and the database tables. First setup the database server, then create the user, the database and the tables.
Create the user and the database
sudo@host:~$ sudo su root@host:~$ sudo -i -u postgres postgres=# create database seiscomp; postgres=# create user sysop with encrypted password 'sysop'; postgres=# grant all privileges on database seiscomp to sysop; postgres=# exit root@host:~$ exit
Create the database tables
user@host:~$ psql -f seiscomp/share/db/postgres.sql -d seiscomp -U sysop
Continue with the general setup considering the created database but do not create the database again.
General SeisComP setup¶
Use seiscomp setup or the wizard from within scconfig (Ctrl+N) for the initial configuration including the database parameters. seiscomp setup is the successor of the former ./setup script.
In seiscomp setup default values are given in brackets :
user@host:~$ seiscomp/bin/seiscomp setup ==================================================================== seiscomp setup ==================================================================== This initializes the configuration of your installation. If you already made adjustments to the configuration files be warned that this setup will overwrite existing parameters with default values. This is not a configurator for all options of your setup but helps to setup initial standard values. -------------------------------------------------------------------- Hint: Entered values starting with a dot (.) are handled as commands. Available commands are: quit: Quit setup without modification to your configuration. back: Go back to the previous parameter. help: Show help about the current parameter (if available). If you need to enter a value with a leading dot, escape it with backslash, e.g. "\.value". --------------------------------------------------------------------
This will ask for initial settings as database (if package trunk is installed) parameters and the logging backend.
Organization name :
Sets the organisation name printed e.g. when you say hello to Seedlink or Arclink.
Enable database storage [yes]:
Enables or disables the database for the system. This option should be left enabled unless all modules should connect to remote processing machine which is already available. The database is required to store inventory information as well as processing results. The database is the central storage for all trunk modules and the default request handler of Arclink.
0) mysql MySQL server. 1) postgresql PostgreSQL server. There is currently no support in setup to create the database for you. You have to setup the database and user accounts on your own. The database schema is installed under share/db/postgresql.sql. Database backend :
If the database is enable the database backend can be selected. SeisComP
supports two main backends: MySQL and PostgreSQL. Select the backend to be used
here but be prepared that only for the MySQL backend the setup can help to
create the database and tables for you. If you are using PostgreSQL you have
to provide a working database with the correct schema. The schema files are
part of the distribution and can be found in
As of PostgreSQL version 9 the default output encoding has changed to hex. In order to fix issues with seiscomp log in to your database and run the following command.
ALTER DATABASE seiscomp SET bytea_output TO 'escape';
Create database [yes]:
If MySQL is selected it is possible to let seiscomp setup to create the database and all tables for you. If the database has been created already, say ‘no’ here.
MYSQL root password (input not echoed) :
Give the MySQL root password for your database server to create the database tables. This is only required if the last question has been answered with ‘yes’.
Drop existing database [no]:
If a database with the same name (to be selected later) exists already and the database should be created for you, an error is raised. To delete an existing database with the same name, say ‘yes’ here.
Database name [seiscomp]: Database hostname [localhost]: Database read-write user [sysop]: Database read-write password [sysop]: Database public hostname [localhost]: Database read-only user [sysop]: Database read-only password [sysop]:
Setup the various database options valid for all database backends. Give .help for more information.
If all question have been answered the final choice needs to be made to either create the initial configuration, go back to the last question or to quit without doing anything.
Finished setup -------------- P) Proceed to apply configuration B) Back to last parameter Q) Quit without changes Command? [P]:
After the installation all module are disabled for auto start. If seiscomp start is called, nothing will happen until modules are enabled. To enable a set of modules, seiscomp enable needs to be called with a list of modules. For example, for a processing system with Seedlink for data acquisition, you may use:
user@host:~$ seiscomp/bin/seiscomp enable seedlink slarchive scautopick scautoloc scamp scmag scevent enabled seedlink enabled slarchive enabled scautopick enabled scautoloc enabled scamp enabled scmag enabled scevent
A successive call of seiscomp start will then start all enabled modules. This is also required to restart enabled modules with seiscomp check.
Alternatively, scconfig can be used to enable/disable and to start/stop/restart modules.
However, before starting seiscomp, station information (metadata) need to be provided and the configuration needs to be updated.
Supply Station Metadata¶
SeisComP requires the metadata from seismic network and stations including full responses for data acquisition and processing. The metadata can be obtained from network operators or various other sources in different formats. The metadata include, e.g.:
Sensor and data logger specifications with full response information
Data stream specifications
SeisComP comes with various importers to add metadata for networks and stations including full response information.
import_inv is the tool to import inventory data into SeisComP. Alternatively can be used.
user@host:~$ seiscomp/bin/seiscomp exec import_inv dlsv inventory.dataless
This will import a dataless SEED volume into etc/inventory/inventory.dataless.xml.
Repeat this step for all inventory data you want to import.
Configure Station Bindings¶
user@host:~$ seiscomp/bin/seiscomp exec scconfig
Typical binding profiles or station bindings involve bindings configurations for data acquisition and processing modules:
seedlink: Configure the plugin for the real-time data acquisition.
slarchive: Configure the data archiving.
scautopick: Configure the automatic phase detection. You may overwrite global binding parameters.
Update Configuration, Start Everything¶
To update the configuration when new stations have been added or modified, seiscomp update-config needs to be run. This creates configuration files of modules that do not use the configuration directly, writes the trunk bindings to the database and synchronizes the inventory with the database.
user@host:~$ seiscomp/bin/seiscomp update-config [output]
After the configuration has been updated and the inventory has been synchronized, call seiscomp start to start all enabled modules:
user@host:~$ seiscomp/bin/seiscomp start starting seedlink starting slarchive starting scautopick starting scautoloc starting scamp starting scmag starting scevent
Now the system should run. To check everything again, seiscomp check can be run which should print is running for all started modules. If everything is working, the analysis tools can be started, e.g. MapView.
user@host:~$ seiscomp/bin/seiscomp exec scmv