Skip to content
Contents
GuidesOpenWrt

Why do remote OpenWrt logs always end in .000?

Three events in one second can appear simultaneous. Compare the router record, the raw message and the stored field. A traditional syslog header stops at seconds. Zero padding tells you nothing about the original precision.

Three events in one second can appear simultaneous. Compare the router record, the raw message and the stored field. A traditional syslog header stops at seconds. Zero padding tells you nothing about the original precision.

Write three identifiable records on the router

Use ubox logread with -t and -e. Check the implementation first if you installed syslog-ng. Run this over SSH and note the gm-ms identifier. It writes three test messages without changing settings.

id="gm-ms-$(date +%s)"
for n in 1 2 3; do logger -t gm-time "$id $n"; done
logread -e "$id"
logread -t -e "$id"
Reading the same records again reveals .107, .110 and .111. These are log timestamps. The underlying events may have happened earlier.
OpenWrt 25.12.6 · x86/64 · QEMU · Reading the same records again reveals .107, .110 and .111. These are log timestamps. The underlying events may have happened earlier.

Look for brackets in the raw message

In the lab two senders forwarded the same record over UDP loopback, one with the default format and one with -t. Below are the payloads without capture arrival times. Adding -t to a local reader leaves the running forwarder unchanged.

<13>Dec  3 18:13:31 gm-time: gm-ms-1796321609 1
<13>Dec  3 18:13:31 [1796321611.107] gm-time: gm-ms-1796321609 1
  • Find the identifier before parsing. If records are missing, check forwarding, filters and loss first. If local fractions are also zero, repeat a few seconds later and check support for extra timestamps.
  • Fractions locally but none on the wire. Check /etc/init.d/log, the actual sender arguments and any relay. Try the extra field on a separate input and check parser compatibility before changing production.
  • Fractions on the wire but .000 in storage. Check whether the parser reads only the header. Map the bracketed seconds and fraction to event time and keep arrival time separately. If storage retains fractions, fix the display.

Send a fresh set and compare identifiers, times and order. Lost precision cannot be reconstructed. Remove temporary collection, restore the old parser or retain the verified mapping, and confirm ordinary logs still arrive.

Where OpenWrt logs go: check the RAM buffer, local files and remote syslog

Explore hardware

Comments