Skip to content
CAI
Software that uses CAICheck a score

hauleth/erlang-systemd

70.4

Strong · 2 October 2026

1.9k

lines of production code

Erlang

with Elixir

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an Erlang library that provides native integration with systemd features for OTP applications. It enables socket activation, structured journal logging, health monitoring via watchdogs, and status notifications. The project also includes example applications demonstrating these capabilities with both raw TCP/UDP servers and Plug-based web servers.

Features

Add echo example application with systemd socket activation support

Introduces a new OTP-based echo server example that listens on TCP and UDP ports. The application is designed to support systemd socket activation, automatically detecting and using file descriptors passed by systemd for both TCP and UDP protocols, while falling back to port 7777 if systemd is not involved. It includes a supervisor structure to manage the TCP and UDP listener processes and integrates with the Erlang logger for operational visibility.

examples/echo · high confidence

Add example applications for Echo and Plug with systemd integration

New example applications have been added to demonstrate integration with systemd features. The Echo example provides a simple TCP/UDP echo service using Erlang, configured with socket activation on port 7 and systemd socket units. The Plug example demonstrates a Plug+Cowboy application with socket activation on port 80, journal logging, watchdog integration, and status notifications. Both examples include systemd unit files (services and sockets), configuration files, and Makefiles for building and installing the applications.

examples · high confidence

Add systemd.hrl header with syslog priority macros

A new include file, systemd.hrl, has been added to the project, providing Erlang macros for standard syslog priority levels (EMERG through DEBUG) to facilitate integration with systemd logging facilities.

include · high confidence

Initial release of systemd integration library

This change introduces the \systemd\ OTP library, providing Erlang applications with native integration for systemd features. It adds a logger handler (\systemd\_journal\_h\) for sending structured messages to the systemd journal, a kmsg formatter (\systemd\_kmsg\_formatter\) for standard I/O streams, and a watchdog module (\systemd\_watchdog\) for health checks and keep-alive notifications. The library also includes utilities for managing environment variables, handling signals (like SIGHUP for reloads), and sending readiness and status updates via the systemd notify socket.

src · high confidence

New systemd-integrated Plug example application

Added a new example application in \examples/plug\ that demonstrates how to integrate a Plug-based web server with systemd features. The application supports socket activation, allowing it to listen on file descriptors passed by systemd or fall back to a configurable port. It includes handlers for systemd logging, readiness notification, and watchdog triggers. The example also exposes endpoints to simulate application reloads, set custom systemd status messages, and exit with specific status codes, and supports both Cowboy and Bandit as the underlying HTTP server.

examples/plug · high confidence

Behavioural changes

Add CHANGELOG.md and update build configuration

The project now includes a CHANGELOG.md file documenting changes from version 0.1.0 through the unreleased state, including bug fixes for the journal handler and watchdog, and new features like custom status setting and FD support. The build configuration (rebar.config) has been updated to include the 'enough' dependency, add linting and documentation plugins, and enforce warnings as errors. Additionally, the shell.nix file was removed, and .gitignore was updated to exclude doc and checkout directories.

(repo-wide) · high confidence

Test coverage

Added comprehensive test suite for systemd integration components

Added Common Test suites and supporting test utilities to verify systemd integration features, including the systemd protocol encoding, the journal logger handler configuration and output, the kmsg formatter (including auto-installation logic), and the watchdog state management. The tests also cover systemd notification messages (ready, stopping, status, extend\_timeout), file descriptor passing, and environment variable handling.

test · high confidence

Dependencies

Add Plug example application with Bandit server support

A new example application (\examples/plug\) has been added to demonstrate usage of the library with Plug. The project configuration includes dependencies for \plug\, \plug\_cowboy\, and \dialyxir\, and introduces \bandit\ as an alternative HTTP server option alongside the existing Cowboy support.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 70 → 70 (+0.5)
  • Rubric changed (rubric-2026.09.12 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 100 → 100 (+0.0)
  • Maturity 54 → 55 (+1.0)
  • Readiness 76 → 76 (+0.0)
  • Security 86 → 86 (+0.0)

Resolved (3)

  • Coverage not measured — no coverage collector is wired up
  • Documentation: no architecture or design documentation (README.md)
  • Hotspot: src/systemd_journal_h.erl (src/systemd_journal_h.erl)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

hauleth/erlang-systemd was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 2 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 2d6f75278beaf2087959eea6b6980a6ce0a6b35c — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.