Files
2025/share/doc/seiscomp/html/apps/scdispatch.html

612 lines
41 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>scdispatch &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=72bcf2f2" />
<link rel="stylesheet" type="text/css" href="../_static/seiscomp.css?v=c6da7ce6" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=823bb831"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="scdumpcfg" href="scdumpcfg.html" />
<link rel="prev" title="scdbstrip" href="scdbstrip.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">6.9.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="scdumpcfg.html" title="scdumpcfg"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="scdbstrip.html" title="scdbstrip"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../modules.html" >Modules</a>
</li>
<li class="nav-item nav-item-2">
<a href="../toc/utilities.html" accesskey="U">Utilities</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<section id="scdispatch">
<span id="id1"></span><h1>scdispatch<a class="headerlink" href="#scdispatch" title="Permalink to this heading"></a></h1>
<p><strong>Read objects (event, origin, etc) from a SCML file and sends the objects
to the messaging system.</strong></p>
<section id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this heading"></a></h2>
<p>scdispatch reads an <a class="reference internal" href="../base/glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a> file and creates notifier objects for them that
are sent to the <a class="reference internal" href="../base/concepts/messaging.html#concepts-messaging"><span class="std std-ref">messaging</span></a> and the corresponding
messaging groups (see <code class="xref std std-option docutils literal notranslate"><span class="pre">--routingtable</span></code>). In contrast to <a class="reference internal" href="scdb.html#scdb"><span class="std std-ref">scdb</span></a>
which writes SCML files directly into the <a class="reference internal" href="../base/concepts/database.html#concepts-database"><span class="std std-ref">database</span></a>
scdispatch uses the messaging bus. If <a class="reference internal" href="scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a> is configured with the
database plugin, messages will end up in the database as well.</p>
<section id="modes">
<h3>Modes<a class="headerlink" href="#modes" title="Permalink to this heading"></a></h3>
<p>scdispatch can work in two modes applying different
<a class="reference internal" href="#scdispatch-operations"><span class="std std-ref">operations</span></a>:</p>
<ul class="simple">
<li><p><em>Without database check:</em> One of the <a class="reference internal" href="#scdispatch-operations"><span class="std std-ref">operations</span></a>
<em>add</em>, <em>update</em> or <em>remove</em> is selected along with the option <code class="xref std std-option docutils literal notranslate"><span class="pre">-O</span></code>. In
that case all objects in the <a class="reference internal" href="../base/glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a> are encapsulated in a notifier with
that specific operation and sent to the messaging. No check is performed if
the object is already in the database or not.</p></li>
<li><p><em>With database check:</em> The option <code class="xref std std-option docutils literal notranslate"><span class="pre">-O</span></code> is not given or the
option is used along with one of the <a class="reference internal" href="#scdispatch-operations"><span class="std std-ref">operations</span></a>
<em>merge</em> or <em>merge-without-remove</em>. scdispatch first tries to load the corresponding
objects from the database and calculates differences. It will then create the
corresponding notifiers with operations <em>add</em>, <em>update</em> or <em>remove</em> and sends
them to the messaging. That mode is quite close to a sync operation with the
exception that top level objects (such as origin or event) that are not part
of the input SCML are left untouched in the database. It can be used to
synchronize event information from one system with another.</p></li>
</ul>
</section>
<section id="operations">
<span id="scdispatch-operations"></span><h3>Operations<a class="headerlink" href="#operations" title="Permalink to this heading"></a></h3>
<p>Different operations can be chosen along with the option <code class="xref std std-option docutils literal notranslate"><span class="pre">-O</span></code>.
If <code class="xref std std-option docutils literal notranslate"><span class="pre">-O</span></code> is not given, <em>merge</em> is assumed by default.</p>
<ul class="simple">
<li><p><em>Add</em>: All objects are sent trying to be added to the database. If they
already exist in the database, they will be rejected and not spread through
the messaging. Modules connected to the messaging will not receive rejected
objects.</p></li>
<li><p><em>Remove</em>: All sent objects with all their attributes and child objects are
removed from the database. Modules connected to the messaging will not receive
any sent object.</p></li>
<li><p><em>Update</em>: All objects are sent trying to be updated to the database along with
all of their child objects and attributes. Sent objects not existing in the
database will be ignored and not received by any module connected to the
messaging. Child objects and attributes existing in the database but not
included in the sent object will be removed as well.</p></li>
<li><p><em>Merge</em> (default): Applies <em>Add</em> and <em>Update</em> and requires a database
connection.</p></li>
<li><p><em>Merge-without-remove</em>: Applies <em>Add</em> and <em>Update</em> and requires a database
connection. However, no objects are removed from the database.</p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>All <cite>SeisComP</cite> objects along are listed and described along with their child
objects and attributes in the <a class="reference internal" href="../base/api-python.html#api-datamodel-python"><span class="std std-ref">API documentation</span></a>.</p>
</div>
</section>
<section id="examples">
<h3>Examples<a class="headerlink" href="#examples" title="Permalink to this heading"></a></h3>
<ol class="arabic">
<li><p>Send different objects from a <a class="reference internal" href="../base/glossary.html#term-SCML"><span class="xref std std-term">SCML</span></a> file for merging (adding or
updating). The option <code class="xref std std-option docutils literal notranslate"><span class="pre">-O</span></code> can be ommitted because the default
behavior is to merge:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scdispatch<span class="w"> </span>-i<span class="w"> </span>test.xml<span class="w"> </span>-O<span class="w"> </span>merge
scdispatch<span class="w"> </span>-i<span class="w"> </span>test.xml
</pre></div>
</div>
</li>
<li><p>Send all objects by ignoring events. When <a class="reference internal" href="scevent.html#scevent"><span class="std std-ref">scevent</span></a> receives origins it
will create new events or associate the origins to existing ones. The ignored
events may be already existing with different IDs. Hence, event duplication
is avoided by ignoring them.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scdispatch<span class="w"> </span>-i<span class="w"> </span>test.xml<span class="w"> </span>-e
</pre></div>
</div>
</li>
<li><p>Send new objects to be added:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scdispatch<span class="w"> </span>-i<span class="w"> </span>test.xml<span class="w"> </span>-O<span class="w"> </span>add
</pre></div>
</div>
</li>
<li><p>Send an update of objects:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scdispatch<span class="w"> </span>-i<span class="w"> </span>test.xml<span class="w"> </span>-O<span class="w"> </span>update
</pre></div>
</div>
</li>
<li><p>Send objects to be removed:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scdispatch<span class="w"> </span>-i<span class="w"> </span>test.xml<span class="w"> </span>-O<span class="w"> </span>remove
</pre></div>
</div>
</li>
<li><p>Compare new objects with the database content and send the difference (optionally without removing objects):</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scdispatch<span class="w"> </span>-i<span class="w"> </span>test.xml<span class="w"> </span>-O<span class="w"> </span>merge
scdispatch<span class="w"> </span>-i<span class="w"> </span>test.xml<span class="w"> </span>-O<span class="w"> </span>merge-without-remove
</pre></div>
</div>
</li>
<li><p>Offline mode: all operations can be performed without the messaging system using xml files:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scdispatch<span class="w"> </span>-i<span class="w"> </span>test.xml<span class="w"> </span>-O<span class="w"> </span>operation<span class="w"> </span>--create-notifier<span class="w"> </span>&gt;<span class="w"> </span>notifier.xml
</pre></div>
</div>
<p>then:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scdb<span class="w"> </span>-i<span class="w"> </span>notifier.xml
</pre></div>
</div>
</li>
<li><p>Subsets of SCML Objects</p>
<p>It can be useful to import a subset of QuakeML objects, e.g. Origins from other
agencies and then allow <a class="reference internal" href="scevent.html#scevent"><span class="std std-ref">scevent</span></a> to associate them to existing
events (and possibly prefer them based on the rules in scevent) or create new
events for the origins. If the event objects from a SCML file are not required
to be sent to the messaging then either they should be removed (e.g. using XSLT)
and all the remaining objects in the file added:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scdispatch<span class="w"> </span>-i<span class="w"> </span>test.xml<span class="w"> </span>-O<span class="w"> </span>add
</pre></div>
</div>
<p>or the <strong>event objects</strong> can be left out of the routing table, e.g.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scdispatch<span class="w"> </span>-i<span class="w"> </span>test.xml<span class="w"> </span>-O<span class="w"> </span>add<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>--routingtable<span class="w"> </span>Pick:PICK,<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>Amplitude:AMPLITUDE,<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>Origin:LOCATION,StationMagnitude:MAGNITUDE,<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>Magnitude:MAGNITUDE
</pre></div>
</div>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>The option <code class="xref std std-option docutils literal notranslate"><span class="pre">--no-event</span></code> is a wrapper for removing Event:EVENT from
the routing table. With this option no event objects will be sent which may
be useful if just the origins with magnitudes, amplitudes, arrivals, picks, etc.
shall be integrated, e.g. after XML-based playbacks.</p>
</div>
</li>
<li><p>Testing</p>
<p>For testing it is useful to watch the results of dispatch with <a class="reference internal" href="scolv.html#scolv"><span class="std std-ref">scolv</span></a> or
<a class="reference internal" href="scxmldump.html#scxmldump"><span class="std std-ref">scxmldump</span></a>. It is also useful to clean the database and logs to remove
objects from persistent storage to allow repeated reloading of a file.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The following will clear all events from the database and any other
other object persistence. Modify the mysql command to suit your db setup.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>mysql<span class="w"> </span>-u<span class="w"> </span>root<span class="w"> </span>--password<span class="o">=</span><span class="s1">&#39;my$q1&#39;</span><span class="w"> </span>-e<span class="w"> </span><span class="s2">&quot;DROP DATABASE IF EXISTS seiscomp; \</span>
<span class="s2"> CREATE DATABASE seiscomp CHARACTER SET utf8 COLLATE utf8_bin; \</span>
<span class="s2"> GRANT ALL ON seiscomp.* TO &#39;sysop&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;sysop&#39;; \</span>
<span class="s2"> USE seiscomp;source seiscomp/trunk/share/db/mysql.sql;&quot;</span>
seiscomp<span class="w"> </span>start
</pre></div>
</div>
</div>
</li>
</ol>
</section>
</section>
<section id="module-configuration">
<span id="scdispatch-configuration"></span><h2>Module Configuration<a class="headerlink" href="#module-configuration" title="Permalink to this heading"></a></h2>
<div class="line-block">
<div class="line"><code class="file docutils literal notranslate"><span class="pre">etc/defaults/global.cfg</span></code></div>
<div class="line"><code class="file docutils literal notranslate"><span class="pre">etc/defaults/scdispatch.cfg</span></code></div>
<div class="line"><code class="file docutils literal notranslate"><span class="pre">etc/global.cfg</span></code></div>
<div class="line"><code class="file docutils literal notranslate"><span class="pre">etc/scdispatch.cfg</span></code></div>
<div class="line"><code class="file docutils literal notranslate"><span class="pre">~/.seiscomp/global.cfg</span></code></div>
<div class="line"><code class="file docutils literal notranslate"><span class="pre">~/.seiscomp/scdispatch.cfg</span></code></div>
</div>
<p>scdispatch inherits <a class="reference internal" href="global.html#global-configuration"><span class="std std-ref">global options</span></a>.</p>
</section>
<section id="command-line-options">
<h2>Command-Line Options<a class="headerlink" href="#command-line-options" title="Permalink to this heading"></a></h2>
<p><strong class="program">scdispatch [options]</strong></p>
<section id="generic">
<h3>Generic<a class="headerlink" href="#generic" title="Permalink to this heading"></a></h3>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-h">
<span id="cmdoption-scdispatch-help"></span><span class="sig-name descname"><span class="pre">-h</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--help</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-scdispatch-h" title="Permalink to this definition"></a></dt>
<dd><p>Show help message.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-V">
<span id="cmdoption-scdispatch-version"></span><span class="sig-name descname"><span class="pre">-V</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--version</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-scdispatch-V" title="Permalink to this definition"></a></dt>
<dd><p>Show version information.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-config-file">
<span class="sig-name descname"><span class="pre">--config-file</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-config-file" title="Permalink to this definition"></a></dt>
<dd><p>Use alternative configuration file. When this option is
used the loading of all stages is disabled. Only the
given configuration file is parsed and used. To use
another name for the configuration create a symbolic
link of the application or copy it. Example:
scautopick -&gt; scautopick2.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-plugins">
<span class="sig-name descname"><span class="pre">--plugins</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-plugins" title="Permalink to this definition"></a></dt>
<dd><p>Load given plugins.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-D">
<span id="cmdoption-scdispatch-daemon"></span><span class="sig-name descname"><span class="pre">-D</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--daemon</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-scdispatch-D" title="Permalink to this definition"></a></dt>
<dd><p>Run as daemon. This means the application will fork itself
and doesnt need to be started with &amp;.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-auto-shutdown">
<span class="sig-name descname"><span class="pre">--auto-shutdown</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-auto-shutdown" title="Permalink to this definition"></a></dt>
<dd><p>Enable/disable self-shutdown because a master module shutdown.
This only works when messaging is enabled and the master
module sends a shutdown message (enabled with --start-stop-msg
for the master module).</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-shutdown-master-module">
<span class="sig-name descname"><span class="pre">--shutdown-master-module</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-shutdown-master-module" title="Permalink to this definition"></a></dt>
<dd><p>Set the name of the master-module used for auto-shutdown.
This is the application name of the module actually
started. If symlinks are used, then it is the name of
the symlinked application.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-shutdown-master-username">
<span class="sig-name descname"><span class="pre">--shutdown-master-username</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-shutdown-master-username" title="Permalink to this definition"></a></dt>
<dd><p>Set the name of the master-username of the messaging
used for auto-shutdown. If &quot;shutdown-master-module&quot; is
given as well, this parameter is ignored.</p>
</dd></dl>
</section>
<section id="verbosity">
<h3>Verbosity<a class="headerlink" href="#verbosity" title="Permalink to this heading"></a></h3>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-verbosity">
<span class="sig-name descname"><span class="pre">--verbosity</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-verbosity" title="Permalink to this definition"></a></dt>
<dd><p>Verbosity level [0..4]. 0:quiet, 1:error, 2:warning, 3:info,
4:debug.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-v">
<span id="cmdoption-scdispatch-v"></span><span class="sig-name descname"><span class="pre">-v</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--v</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-scdispatch-v" title="Permalink to this definition"></a></dt>
<dd><p>Increase verbosity level (may be repeated, eg. -vv).</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-q">
<span id="cmdoption-scdispatch-quiet"></span><span class="sig-name descname"><span class="pre">-q</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--quiet</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-scdispatch-q" title="Permalink to this definition"></a></dt>
<dd><p>Quiet mode: no logging output.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-component">
<span class="sig-name descname"><span class="pre">--component</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-component" title="Permalink to this definition"></a></dt>
<dd><p>Limit the logging to a certain component. This option can
be given more than once.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-s">
<span id="cmdoption-scdispatch-syslog"></span><span class="sig-name descname"><span class="pre">-s</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--syslog</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-scdispatch-s" title="Permalink to this definition"></a></dt>
<dd><p>Use syslog logging backend. The output usually goes to
/var/lib/messages.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-l">
<span id="cmdoption-scdispatch-lockfile"></span><span class="sig-name descname"><span class="pre">-l</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--lockfile</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-l" title="Permalink to this definition"></a></dt>
<dd><p>Path to lock file.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-console">
<span class="sig-name descname"><span class="pre">--console</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-console" title="Permalink to this definition"></a></dt>
<dd><p>Send log output to stdout.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-debug">
<span class="sig-name descname"><span class="pre">--debug</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-scdispatch-debug" title="Permalink to this definition"></a></dt>
<dd><p>Execute in debug mode.
Equivalent to --verbosity=4 --console=1 .</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-log-file">
<span class="sig-name descname"><span class="pre">--log-file</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-log-file" title="Permalink to this definition"></a></dt>
<dd><p>Use alternative log file.</p>
</dd></dl>
</section>
<section id="messaging">
<h3>Messaging<a class="headerlink" href="#messaging" title="Permalink to this heading"></a></h3>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-u">
<span id="cmdoption-scdispatch-user"></span><span class="sig-name descname"><span class="pre">-u</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--user</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-u" title="Permalink to this definition"></a></dt>
<dd><p>Overrides configuration parameter <a class="reference internal" href="global.html#confval-connection.username"><code class="xref std std-confval docutils literal notranslate"><span class="pre">connection.username</span></code></a>.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-H">
<span id="cmdoption-scdispatch-host"></span><span class="sig-name descname"><span class="pre">-H</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--host</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-H" title="Permalink to this definition"></a></dt>
<dd><p>Overrides configuration parameter <a class="reference internal" href="global.html#confval-connection.server"><code class="xref std std-confval docutils literal notranslate"><span class="pre">connection.server</span></code></a>.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-t">
<span id="cmdoption-scdispatch-timeout"></span><span class="sig-name descname"><span class="pre">-t</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--timeout</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-t" title="Permalink to this definition"></a></dt>
<dd><p>Overrides configuration parameter <a class="reference internal" href="global.html#confval-connection.timeout"><code class="xref std std-confval docutils literal notranslate"><span class="pre">connection.timeout</span></code></a>.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-g">
<span id="cmdoption-scdispatch-primary-group"></span><span class="sig-name descname"><span class="pre">-g</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--primary-group</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-g" title="Permalink to this definition"></a></dt>
<dd><p>Overrides configuration parameter <a class="reference internal" href="global.html#confval-connection.primaryGroup"><code class="xref std std-confval docutils literal notranslate"><span class="pre">connection.primaryGroup</span></code></a>.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-S">
<span id="cmdoption-scdispatch-subscribe-group"></span><span class="sig-name descname"><span class="pre">-S</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--subscribe-group</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-S" title="Permalink to this definition"></a></dt>
<dd><p>A group to subscribe to.
This option can be given more than once.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-content-type">
<span class="sig-name descname"><span class="pre">--content-type</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-content-type" title="Permalink to this definition"></a></dt>
<dd><p>Overrides configuration parameter <a class="reference internal" href="global.html#confval-connection.contentType"><code class="xref std std-confval docutils literal notranslate"><span class="pre">connection.contentType</span></code></a>.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-start-stop-msg">
<span class="sig-name descname"><span class="pre">--start-stop-msg</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-start-stop-msg" title="Permalink to this definition"></a></dt>
<dd><p>Set sending of a start and a stop message.</p>
</dd></dl>
</section>
<section id="database">
<h3>Database<a class="headerlink" href="#database" title="Permalink to this heading"></a></h3>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-db-driver-list">
<span class="sig-name descname"><span class="pre">--db-driver-list</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-scdispatch-db-driver-list" title="Permalink to this definition"></a></dt>
<dd><p>List all supported database drivers.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-d">
<span id="cmdoption-scdispatch-database"></span><span class="sig-name descname"><span class="pre">-d</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--database</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-d" title="Permalink to this definition"></a></dt>
<dd><p>The database connection string, format:
<a class="reference external" href="service://user:pwd&#64;host/database">service://user:pwd&#64;host/database</a>.
&quot;service&quot; is the name of the database driver which
can be queried with &quot;--db-driver-list&quot;.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-config-module">
<span class="sig-name descname"><span class="pre">--config-module</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-config-module" title="Permalink to this definition"></a></dt>
<dd><p>The config module to use.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-inventory-db">
<span class="sig-name descname"><span class="pre">--inventory-db</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-inventory-db" title="Permalink to this definition"></a></dt>
<dd><p>Load the inventory from the given database or file, format:
[<a class="reference external" href="service://]location">service://]location</a> .</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-db-disable">
<span class="sig-name descname"><span class="pre">--db-disable</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-scdispatch-db-disable" title="Permalink to this definition"></a></dt>
<dd><p>Do not use the database at all</p>
</dd></dl>
</section>
<section id="dispatch">
<h3>Dispatch<a class="headerlink" href="#dispatch" title="Permalink to this heading"></a></h3>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-e">
<span id="cmdoption-scdispatch-no-events"></span><span class="sig-name descname"><span class="pre">-e</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--no-events</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-scdispatch-e" title="Permalink to this definition"></a></dt>
<dd><p>Do not send any event object which are ignored when reading
event parameters.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-i">
<span id="cmdoption-scdispatch-input"></span><span class="sig-name descname"><span class="pre">-i</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--input</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-i" title="Permalink to this definition"></a></dt>
<dd><p>File from which the content is dispatched to the messaging.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-O">
<span id="cmdoption-scdispatch-operation"></span><span class="sig-name descname"><span class="pre">-O</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--operation</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-O" title="Permalink to this definition"></a></dt>
<dd><p>Merge and merge-without-remove require a database
connection. Both will read the object corresponding to the
sent object from the database and calculate the differences.
Merge-without-remove behaves like merge with the exception
that remove operations will be filtered out and no objects
in the database will be removed.</p>
<p>If add, update or remove is specified, then all objects in
XML are sent with the given operation regardless of their
existence in the database.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-print-objects">
<span class="sig-name descname"><span class="pre">--print-objects</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-scdispatch-print-objects" title="Permalink to this definition"></a></dt>
<dd><p>Print names of routable objects.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-print-routingtable">
<span class="sig-name descname"><span class="pre">--print-routingtable</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-scdispatch-print-routingtable" title="Permalink to this definition"></a></dt>
<dd><p>Print routing table.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-routingtable">
<span class="sig-name descname"><span class="pre">--routingtable</span></span><span class="sig-prename descclassname"> <span class="pre">arg</span></span><a class="headerlink" href="#cmdoption-scdispatch-routingtable" title="Permalink to this definition"></a></dt>
<dd><p>Specify routing table as comma separated list of object:group
pairs, e.g. &quot;Origin:LOCATION,Event:EVENT&quot;. When an
object should be routed to a group and no table entry for
that particular class type is available, all parent objects
are checked for valid routing entries and the first found is
used. E.g. if only &quot;Origin:LOCATION&quot; is specified
but the input file contains also Arrivals which are child
objects of Origin then the routing entry of Origin is used
because of the parent-child relationship between Origin and
Arrival.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-test">
<span class="sig-name descname"><span class="pre">--test</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-scdispatch-test" title="Permalink to this definition"></a></dt>
<dd><p>Test mode. Does not send any object.</p>
</dd></dl>
<dl class="std option">
<dt class="sig sig-object std" id="cmdoption-scdispatch-create-notifier">
<span class="sig-name descname"><span class="pre">--create-notifier</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-scdispatch-create-notifier" title="Permalink to this definition"></a></dt>
<dd><p>Do not send any object. All notifiers will be written to
standard output in XML format.</p>
</dd></dl>
</section>
</section>
</section>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">scdispatch</a><ul>
<li><a class="reference internal" href="#description">Description</a><ul>
<li><a class="reference internal" href="#modes">Modes</a></li>
<li><a class="reference internal" href="#operations">Operations</a></li>
<li><a class="reference internal" href="#examples">Examples</a></li>
</ul>
</li>
<li><a class="reference internal" href="#module-configuration">Module Configuration</a></li>
<li><a class="reference internal" href="#command-line-options">Command-Line Options</a><ul>
<li><a class="reference internal" href="#generic">Generic</a></li>
<li><a class="reference internal" href="#verbosity">Verbosity</a></li>
<li><a class="reference internal" href="#messaging">Messaging</a></li>
<li><a class="reference internal" href="#database">Database</a></li>
<li><a class="reference internal" href="#dispatch">Dispatch</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div>
<h4>Previous topic</h4>
<p class="topless"><a href="scdbstrip.html"
title="previous chapter">scdbstrip</a></p>
</div>
<div>
<h4>Next topic</h4>
<p class="topless"><a href="scdumpcfg.html"
title="next chapter">scdumpcfg</a></p>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/apps/scdispatch.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>6.9.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>