ND-0034 / LINUX OPERATIONS
Two Servers Disagree on When the Incident Started
The application says it timed out at 14:02:01. The gateway logs the matching request at 14:02:04. Did the timeout happen before the request arrived? Maybe neither clock is reliable enough to answer. Start by checking what each timestamp measures. Use both journal clocks On a systemd host, substitute the relevant unit for myapp.service: If the […]
The application says it timed out at 14:02:01. The gateway logs the matching request at 14:02:04. Did the timeout happen before the request arrived? Maybe neither clock is reliable enough to answer. Start by checking what each timestamp measures.
Use both journal clocks
On a systemd host, substitute the relevant unit for myapp.service:
journalctl --list-boots --no-pager
journalctl -b 0 -u myapp.service --utc -o short-iso-precise -n 100 --no-pager
journalctl -b 0 -u myapp.service -o short-monotonic -n 100 --no-pager
If the incident occurred before a reboot, use the relevant boot ID rather than -b 0. UTC gives responders a common display format; it doesn’t correct a bad clock. And a timestamp with microseconds can still be wrong by seconds. Use monotonic readings to compare journal events within one boot on one host. They don’t put different machines or boots on a shared clock. journalctl manual · Journal timestamp and boot fields
Correlate the event before claiming the order
Find a stable request ID, deployment ID, or transaction ID in both records. Identify whether each timestamp marks the event itself, when the journal received it, or when a collector ingested it. Those can differ. The last 100 entries are a quick look, not a complete export. Expand the collection to cover the incident and note which logs you couldn’t access.
A useful handoff says: “Both records match request R-482. The gateway records receipt and the app records a timeout. The wall-clock times differ by three seconds; cross-host order is unverified.” That is enough for the next shift to continue without inheriting a guess as fact.
Before the next incident
Monitor clock offset, include correlation IDs at service boundaries, and keep original timestamps in retained evidence. Record the time sync status you observed and when you observed it. A healthy clock now doesn’t tell you its offset during the incident.
Evidence: The commands and timestamp semantics are documented. The incident and request ID are fictional; no cross-host skew was measured for this article.
Related: The First 15 Minutes of a Linux Incident.