Running OWS

The ows command

All commands need sudo. sudo ows without a command is the same as sudo ows start.

Command

What it does

sudo ows start

Starts OWS and waits a few seconds to make sure it keeps running. On success, OWS restarts by itself after a crash or a reboot. If it doesn’t start (for example, no valid license), it prints the reason and stays stopped.

sudo ows stop

Stops OWS. It stays stopped, also after a reboot, until the next sudo ows.

sudo ows restart

Stops and starts OWS. Use it after changing the configuration or the license, and after an upgrade.

sudo ows status

Shows whether the OWS container is running. To check that OWS also serves data, see Check that it works.

sudo ows logs

Shows the last 100 lines of OWS’s output. sudo ows logs 500 shows the last 500.

sudo ows id

Prints this computer’s machine ID (License).

sudo ows check

Checks /opt/osop/license/ows.key and shows its details (License).

sudo ows uninstall

Stops OWS and removes it, but keeps everything in /opt/osop (Installation).

Check that it works

sudo ows status only says that OWS is running. To check that it answers clients, ask it for its channel list from the same computer with Earthworm’s getmenu, if you have Earthworm:

getmenu localhost:16032

or with ObsPy (Connecting clients):

python3 -c "from obspy.clients.earthworm import Client; print(len(Client('localhost', 16032).get_availability()), 'channels')"

Both should list your channels within a few seconds. If they hang or fail, see Troubleshooting.

Log files

File

Contents

/opt/osop/ows/log/ows.log

OWS’s own log (name set by logging.file). It grows over time; rotate or delete it as needed (for example with logrotate, using copytruncate).

/opt/osop/ows/log/run.log

One line per sudo ows start, and OWS’s output whenever a start fails.

sudo ows logs

OWS’s console output. Docker keeps up to 30 MB of it.

Capacity

The Winston protocol sends each answer in one piece, so OWS prepares a whole answer in memory before sending it. A Swarm helicorder asks for up to a day of data per channel. Many clients showing long helicorders at the same time therefore need a lot of memory. OWS suits an observatory’s own Swarm and Earthworm users; for public access by many users, put a dedicated data service in front of your archive instead. Contact OSOP if you are unsure how many clients your setup can serve.

OWS has no user accounts or passwords: anyone who can reach its port can read all the data it serves. Allow only the computers that need it through your firewall.