Skip to content

Systemd Timers

edit file

Some backend components like the API and Fastpath run as daemons. Many other run as Systemd timers at various intervals.

The latter approach ensures that a component will start again at the next time interval even if the previous run crashed out. This provides a moderate reliability benefit at the expense of having to perform initialization and shutdown at every run.

To show the existing timers and their next start time run:

Terminal window
systemctl list-timers

Summary of timers

Here is a summary of the most important timers used in the backend:

UNIT ACTIVATES
dehydrated.timer dehydrated.service
detector.timer detector.service
ooni-api-uploader.timer ooni-api-uploader.service
ooni-db-backup.timer ooni-db-backup.service
ooni-download-geoip.timer ooni-download-geoip.service
ooni-rotation.timer ooni-rotation.service
ooni-update-asn-metadata.timer ooni-update-asn-metadata.service
ooni-update-citizenlab.timer ooni-update-citizenlab.service
ooni-update-fingerprints.timer ooni-update-fingerprints.service

Ooni-developed timers have a matching unit file with .service extension.

To show the existing timers and their next start time run:

Terminal window
systemctl list-timers

This can be useful for debugging.

Dehydrated timer

Runs the Dehydrated ACME tool, see Dehydrated ⚙

is a simple script that provides ACME support for Letsencrypt. It’s integrated with Nginx or HaProxy with custom configuration or a small script as “glue”.

Source

Detector timer

Runs the social media blocking event detector ⚙. It is installed by the detector package 📦.

ooni-api-uploader timer

Runs the Measurement uploader ⚙. It is installed by the analysis package 📦. Runs /usr/bin/ooni_api_uploader.py

Source

ooni-db-backup timer

Runs the Database backup tool ⚙ as /usr/bin/ooni-db-backup Also installed by the analysis package 📦.

Source

ooni-download-geoip timer

Fetches GeoIP databases, installed by the ooni-api ⚙. Runs /usr/bin/ooni_download_geoip.py

Monitored with the GeoIP dashboard 📊

See GeoIP downloader ⚙

Source

ooni-rotation timer

Runs the test helper rotation script, installed by the analysis package 📦. Runs /usr/bin/rotation

Source

ooni-update-asn-metadata timer

Fetches ASN 💡 metadata, installed by the analysis package 📦. Runs /usr/bin/analysis --update-asnmeta

Source

ooni-update-citizenlab

Fetches CitizenLab data from GitHub, installed by the analysis package 📦. Runs /usr/bin/analysis --update-citizenlab

Source

ooni-update-fingerprints

Fetches fingerprints from GitHub, installed by the analysis package 📦. Runs /usr/bin/analysis --update-fingerprints

Source