You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

314 lines
7.0 KiB
Groff

.\" Man page generated from reStructuredText.
.
.TH "SCQUERYQC" "1" "Jan 10, 2023" "5.3.0" "SeisComP"
.SH NAME
scqueryqc \- SeisComP Documentation
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.sp
\fBQuery waveform quality control (QC) parameters from database.\fP
.SH DESCRIPTION
.sp
scqueryqc queries a database for waveform quality control (QC) parameters. The
QC parameters must be provided, e.g. by scqc\&.
.sp
\fBWARNING:\fP
.INDENT 0.0
.INDENT 3.5
Writing QC parameters to the database by scqc will result in a rapidly
growing database and is therefore not recommended in permanent application!
.UNINDENT
.UNINDENT
.sp
The database query is done for
.INDENT 0.0
.IP \(bu 2
One or multiple streams,
.IP \(bu 2
One or multiple QC parameters. All QC parameters can be requested. Defaults
apply. For reading the defaults use
.INDENT 2.0
.INDENT 3.5
.sp
.nf
.ft C
scqueryqc \-h
.ft P
.fi
.UNINDENT
.UNINDENT
.IP \(bu 2
A single time window where the begin time must be provided. Current time is
considered if the end is not give.
.UNINDENT
.SS Workflow
.sp
You should minimize the impact of stored waveform QC parameters on the size of the
database.
.INDENT 0.0
.IP 1. 3
Compute the QC parameters in real time using scqc and save them in the
\fISeisComP\fP database. Saving the QC parameters in the database requires to
adjust the scqc module configuration parameters
\fBplugins.*.archive.interval\fP for each plugin.
.IP 2. 3
Regularly use scqueryqc for some time span to read the QC parameters from the
database. Save them in a XML files.
.sp
Example for all QC parameters found for all streams in the inventory before
end time:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
scqueryqc \-d [host] \-e \(aq[end time]\(aq \-\-streams\-from\-inventory \-o [XML file]
.ft P
.fi
.UNINDENT
.UNINDENT
.IP 3. 3
Clean the database from QC parameters.
.INDENT 3.0
.IP \(bu 2
Either use scdispatch with the parameters saved in XML. You may need
to set the routing table for sending the QualityControl parameters to the
right message group, e.g., QC:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
scdispatch \-H [host] \-O remove \-\-routingtable QualityControl:QC \-i [XML file]
.ft P
.fi
.UNINDENT
.UNINDENT
.IP \(bu 2
Alternatively, use scdbstrip with the command\-line option \fB\-Q\fP and
remove \fBall\fP QC parameters in the time span. Use the same period for
which the QC parameters were retrieved:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
scdbstrip \-d [database] \-Q \-\-date\-time \(aq[end time]\(aq
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
\fBNOTE:\fP
.INDENT 3.0
.INDENT 3.5
Considering an end time by \fB\-\-date\-time\fP has the advantage that no QC
parameters are removed which were measured after scqueryqc was applied.
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.SS Examples
.INDENT 0.0
.IP \(bu 2
Query rms and delay values for the stream AU.AS18..SHZ,AU.AS19..SHZ before
\(aq2021\-11\-20 00:00:00\(aq. Write the XML to stdout
.INDENT 2.0
.INDENT 3.5
.sp
.nf
.ft C
scqueryqc \-d localhost \-e \(aq2021\-11\-20 00:00:00\(aq \-p rms,delay \-i AU.AS18..SHZ,AU.AS19..SHZ
.ft P
.fi
.UNINDENT
.UNINDENT
.IP \(bu 2
Query all default QC parameter values for all streams found in the inventory
from \(aq2021\-11\-20 00:00:00\(aq until current. Write the formatted XML output to
\fB/tmp/query.xml\fP
.INDENT 2.0
.INDENT 3.5
.sp
.nf
.ft C
scqueryqc \-d localhost \-b \(aq2021\-11\-20 00:00:00\(aq \-\-streams\-from\-inventory \-f \-o /tmp/query.xml
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.SH MODULE CONFIGURATION
.nf
\fBetc/defaults/global.cfg\fP
\fBetc/defaults/scqueryqc.cfg\fP
\fBetc/global.cfg\fP
\fBetc/scqueryqc.cfg\fP
\fB~/.seiscomp/global.cfg\fP
\fB~/.seiscomp/scqueryqc.cfg\fP
.fi
.sp
.sp
scqueryqc inherits global options\&.
.SH COMMAND-LINE OPTIONS
.sp
\fBscqueryqc [options]\fP
.SS Generic
.INDENT 0.0
.TP
.B \-h, \-\-help
Show help message.
.UNINDENT
.INDENT 0.0
.TP
.B \-V, \-\-version
Show version information.
.UNINDENT
.SS Verbosity
.INDENT 0.0
.TP
.B \-\-verbosity arg
Verbosity level [0..4]. 0:quiet, 1:error, 2:warning, 3:info,
4:debug.
.UNINDENT
.INDENT 0.0
.TP
.B \-v, \-\-v
Increase verbosity level (may be repeated, eg. \-vv).
.UNINDENT
.INDENT 0.0
.TP
.B \-q, \-\-quiet
Quiet mode: no logging output.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-component arg
Limit the logging to a certain component. This option can
be given more than once.
.UNINDENT
.INDENT 0.0
.TP
.B \-s, \-\-syslog
Use syslog logging backend. The output usually goes to
/var/lib/messages.
.UNINDENT
.INDENT 0.0
.TP
.B \-l, \-\-lockfile arg
Path to lock file.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-console arg
Send log output to stdout.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-debug
Execute in debug mode.
Equivalent to \-\-verbosity=4 \-\-console=1 .
.UNINDENT
.INDENT 0.0
.TP
.B \-\-log\-file arg
Use alternative log file.
.UNINDENT
.SS Database
.INDENT 0.0
.TP
.B \-\-db\-driver\-list
List all supported database drivers.
.UNINDENT
.INDENT 0.0
.TP
.B \-d, \-\-database arg
The database connection string, format:
\fI\%service://user:pwd@host/database\fP\&.
"service" is the name of the database driver which
can be queried with "\-\-db\-driver\-list".
.UNINDENT
.INDENT 0.0
.TP
.B \-\-inventory\-db arg
Load the inventory from the given database or file, format:
[\fI\%service://]location\fP .
.UNINDENT
.SS Output
.INDENT 0.0
.TP
.B \-o, \-\-output filename
Name of output XML file. Objects are sent to stderr if none
is given.
.UNINDENT
.INDENT 0.0
.TP
.B \-f, \-\-formatted
Write formatted XML.
.UNINDENT
.SS Query
.INDENT 0.0
.TP
.B \-b, \-\-begin time
Begin time of query. Format: \(aqYYYY\-MM\-DD hh:mm:ss\(aq.
\(aq1900\-01\-01T00:00:00Z\(aq is considered if undefined.
.UNINDENT
.INDENT 0.0
.TP
.B \-e, \-\-end time
End time of query. Format: \(aqYYYY\-MM\-DD hh:mm:ss\(aq.
Current time is considered if undefined.
.UNINDENT
.INDENT 0.0
.TP
.B \-i, \-\-stream\-id string
Waveform stream ID to search for QC parameters: net.sta.loc.cha \-
[networkCode].[stationCode].[sensorLocationCode].[channelCode].
Provide a single ID or a comma\-separated list. Overrides
\(aq\-\-streams\-from\-inventory\(aq.
.UNINDENT
.INDENT 0.0
.TP
.B \-p, \-\-parameter string
QC parameter to output: (e.g. delay,rms,\(aqgaps count\(aq ...).
Use quotes if QC parameter has more than 1 word.
Provide a single parameter or a comma\-separated list.
Defaults are used if parameter is undefined.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-streams\-from\-inventory
Read streams from inventory. Superseded by \(aq\-\-stream\-id\(aq.
.UNINDENT
.SH AUTHOR
gempa GmbH, GFZ Potsdam
.SH COPYRIGHT
gempa GmbH, GFZ Potsdam
.\" Generated by docutils manpage writer.
.