scproclat

Log the processing latencies of picks, amplitudes, origins, magnitudes and events.

Description

scproclat listens to the messaging and logs the time when picks, amplitudes, origins, magnitudes and events are received. For picks, amplitudes and origins it also logs the latency, the difference between the reception time and the time of the object, e.g. the pick time. The latencies show the delay of the entire processing chain from the data acquisition to the messaging, e.g. to monitor the performance of scmaster or to find stations whose picks arrive late.

The latencies are written to stdout and to log files in the storage directory configured by directory or the command-line option -o. scproclat does not connect to the database.

Log files

The log files are stored in sub-directories named by year, month and day, e.g. 2026/10/19/. Each entry is written to two files:

  • *.rcv: The entry is stored in the directory of the day of the reception. The time of the entry is the reception time.

  • *.trg: The entry is stored in the directory of the day of the object time, e.g. the pick time. The time of the entry is the object time. Magnitudes, origin references and events do not have an object time and are not written to these files.

Picks and amplitudes are written per stream to NET.STA.LOC.CHA.rcv and NET.STA.LOC.CHA.trg. Origins, magnitudes, origin references and events are written to objects.rcv and objects.trg.

The times are given as time of the day, e.g. 12:41:43.282679. The date is given by the directory. Latencies are given as [-]DD:HH:MM:SS.ffffff (days, hours, minutes, seconds and microseconds).

Output format

Each entry is a line with fields separated by semicolons. Entries of picks and amplitudes start with:

time;latency;messageLatency;mode;...

Entries of origins, magnitudes, origin references and events start with:

time;latency;mode;...

with

  • time: The reception time, or the object time in *.trg files.

  • latency: The reception time minus the object time. Empty for magnitudes, origin references and events.

  • messageLatency: The reception time minus the creation time of the object. Only set if logMsgLatency is active.

  • mode: A for a new object, U for an updated object.

The following fields depend on the object type:

Object

Fields

Object time

Pick

publicID;P;phaseHint

Pick time

Amplitude

publicID;A;type;value

Reference time of the time window

Origin

publicID;O;evaluationStatus;latitude;longitude;depth, depth in km

Origin time

Magnitude

publicID;M;type;value;stationCount

Origin reference

eventID;OR;originID

Event

publicID;E;preferredOriginID;preferredMagnitudeID

On stdout, the entries of picks and amplitudes additionally end with the stream ID, NET.STA.LOC.CHA. In the log files the stream ID is given by the file name.

Examples

Show the latencies of all objects while they arrive and store the log files in /tmp/latencies:

scproclat -H localhost -o /tmp/latencies

Example output of a pick which arrived two hours after the pick time:

12:41:43.441033;00:02:00:00.500239;;A;Pick/20261019124143.440859.1;P;P;AU.ARMA.00.BHZ

Find the picks and amplitudes which were received more than one hour after their object time on a day, together with the file name containing the stream ID:

cd /tmp/latencies
awk -F';' '$2 >= "00:01:00:00" {print FILENAME ": " $0}' 2026/10/19/*.*.*.*.rcv

Module Configuration

etc/defaults/global.cfg
etc/defaults/scproclat.cfg
etc/global.cfg
etc/scproclat.cfg
~/.seiscomp/global.cfg
~/.seiscomp/scproclat.cfg

scproclat inherits global options.

directory

Type: string

The storage directory of the latency log files. Within this directory the files are stored in sub-directories named by year, month and day. If not set, the current working directory is used.

logMsgLatency

Default: false

Type: boolean

Additionally log the latency of picks and amplitudes with respect to their creation time, e.g. to measure the delay caused by the messaging.

Command-Line Options

scproclat [options]

Generic

-h, --help

Show help message.

-V, --version

Show version information.

--config-file file

The alternative module configuration file. When this option is used, the module configuration is only read from the given file and no other configuration stage is considered. Therefore, all configuration including the definition of plugins must be contained in that file or given along with other command-line options such as --plugins.

--plugins arg

Load given plugins.

-D, --daemon

Run as daemon. This means the application will fork itself and doesn’t need to be started with &.

--auto-shutdown arg

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).

--shutdown-master-module arg

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.

--shutdown-master-username arg

Set the name of the master-username of the messaging used for auto-shutdown. If "shutdown-master-module" is given as well, this parameter is ignored.

Verbosity

--verbosity arg

Verbosity level [0..4]. 0:quiet, 1:error, 2:warning, 3:info, 4:debug.

-v, --v

Increase verbosity level (may be repeated, e.g., -vv).

-q, --quiet

Quiet mode: no logging output.

--component arg

Limit the logging to a certain component. This option can be given more than once.

-s, --syslog

Use syslog logging backend. The output usually goes to /var/lib/messages.

-l, --lockfile arg

Path to lock file.

--console arg

Send log output to stdout.

--debug

Execute in debug mode. Equivalent to --verbosity=4 --console=1 .

--log-file arg

Use alternative log file.

Messaging

-u, --user arg

Overrides configuration parameter connection.username.

-H, --host arg

Overrides configuration parameter connection.server.

-t, --timeout arg

Overrides configuration parameter connection.timeout.

-g, --primary-group arg

Overrides configuration parameter connection.primaryGroup.

-S, --subscribe-group arg

A group to subscribe to. This option can be given more than once.

--content-type arg

Overrides configuration parameter connection.contentType.

Default: binary

--start-stop-msg arg

Default: 0

Set sending of a start and a stop message.

Storage

-o, --directory arg

Overrides configuration parameter directory.