v2.0.2 — the clock, the victim, and the flag
Three fixes, all from @NotRetarded in #2, all found by reading his own crash alert back to me. If you have ever squinted at an exit 137 wondering whether it was memory, this release is for you.
Event times were printed in UTC
Docker stamps StartedAt with a trailing Z, and the alert sliced the time of day out and printed it unchanged. His crash at 23:29 local arrived as 03:29:20 — exactly his UTC-4 offset.
The worse half is that the same message carried two clocks in two zones: the event log's own timestamp comes from datetime.now() and was already local. Every time Docksentry prints is now the wall clock of the machine it runs on. Set TZ on the container and the two agree.
The container that died was missing from its own alert
The top-N list frequently does not contain it — a container releases everything on the way out. His Unifi normally sits at 1.5–1.7 GB and is the largest thing on that box, and it appeared nowhere in the list. Reading that, there is no way to tell whether it had grown or had already gone.
Its own line sits above the list now, and is absent rather than zero when the container was gone before docker stats ran — which is itself the answer.
Exit 137 did not say what killed it
With the kernel's OOM flag it was memory; without it, something else. That is the single most useful bit in the whole message, and it was in the snapshot all along without ever being printed.
Deliberately three-valued. A bare "no" that actually meant we never looked would send you hunting the wrong resource, so it is stated only when the event stream was there to see the death. inspect is not consulted for it: it reports the current run of a restarted container, and it was measured false on rootless Podman for a container the kernel really did kill.
Together with the host load line from v2.0.1, a crash now reads:
🔁 Unifi-OS-Server crashed (exit 137) … at 23:29:20 (restart #4).
Host memory (used/total): 4.4/7.6 GB · Swap 1.5/29.3 GB
Host load (1 min / cores): 11.82 / 4
Unifi-OS-Server itself at event time: 1.63GiB · 8%
Not an OOM kill — the exit code came from something else.
Top memory at event time: Dockge 253.2MiB · Jellyfin 227.9MiB · …
Upgrading is the usual docker pull ghcr.io/amayer1983/docksentry:latest, or nothing at all with auto-selfupdate on.