A Clock drift page shows which nodes have wrong clocks

A new Watch tool, "Clock drift" (meshterm clocks): a histogram of the
clock offsets in log steps on two sides, then the managed nodes, then
each other node out of sync, largest offset first; Enter opens the node
page. Channel senders with no key are listed by name. When most clocks
disagree with ours the same way, a note says our own clock may be wrong.
The CLI lists every sender with offset_s, samples, and flags. A new
clock_report_days preference sets the window. The demo world gets four
wrong clocks.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
Jean-Pierre MartineauandClaude Haiku 5.5 committed 2026-11-03 00:25:07 -05:00
1 parent adb79d051a
commit bdcdadc50c
11 files changed
+795 -5

No files matched your search

+41
View File
@@ -1052,6 +1052,47 @@ correct.
The command returns `5` and `[]` when no records match.
#### `meshterm clocks`
How far the clock of each node is from the clock of this computer. The command reads the
database. It needs no device and never transmits. A node with a wrong clock puts wrong
times on its adverts and messages, and only its owner can set the clock. This listing
tells you which owners to tell.
Each advert, direct message, and channel message that MeshTerm heard is a clock sample:
the time that the sender wrote, minus the time when MeshTerm heard it. The offset of a node
is the median of its three newest samples. The listing has each sender with a sample in
the last `clock_report_days` (a preference, 7 by default), the largest offset first.
```console
$ meshterm --demo clocks
NAME TYPE HASH OFFSET SAMPLES LAST MANAGED
Île-Bizard repeater 3cc49c 2y 5w behind 16 3h no
Wio Tracker companion a09028 3d 7h behind 32 1d no
Steve K. companion 220c44 5h behind 38 24m no
Gabriel companion 7fc6ea 1h 24m ahead 40 21m no
Chloé L. companion c9d961 in sync 48 9h no
```
`OFFSET` is `in sync` when the offset is within the `clock_tolerance_s` preference (300 s
by default). `LAST` is the age of the newest sample. `MANAGED` is `yes` when MeshTerm
stores the admin password of the node. A channel sender whose name matches no single key
has only its name, with no `TYPE` and no `HASH`.
**`--json`** is an array of rows.
| Field | Type | Meaning |
| --- | --- | --- |
| `node` | object | The `node` shape. A sender with no key has only `name`. |
| `offset_s` | integer | The offset in seconds. A positive value is a clock ahead of this computer. |
| `samples` | integer | The number of samples in the window. |
| `last_sample_at` | timestamp | When MeshTerm heard the newest sample. |
| `out_of_sync` | boolean | **JSON only.** `true` when the offset is past `clock_tolerance_s`. It is the `in sync` of the plain face, inverted. |
| `managed` | boolean | `true` when MeshTerm stores the admin password of the node. |
| `keyed` | boolean | **JSON only.** `false` for a channel sender that has only a name. |
The command returns `5` and `[]` when the window has no sample.
---
### Messaging
+1
View File
@@ -28,6 +28,7 @@ This page lists each interactive screen with its scripted equivalent, where one
| **📊 Dashboard** | The live overview of the mesh. It has a two-hour chart of the activity of all packets with a pulse line, the traffic counts of the session for each packet class, and window RF health next to the live numbers of the radio. The screen updates each second. | none |
| **📰 Live feed** | Each packet as it arrives, newest first. A row shows the time, the type of the packet (its parsed payload class), and what the packet is about. For an advert, that is the node. For a channel text, it is the channel. For a direct message or a request, it is sender → recipient. For a trace, it is the tag. The row also shows the reception quality and, for a scoped flood, the region of the flood. Press Enter to open a row in the packet viewer, with its route graph. | none |
| **🚨 Watchtower** | A passive watcher of the nodes that you star. It gives a silence alarm when a watched node goes quiet. It warns you when the SNR of a node gets worse, and it tells you when the node returns. It also tells you when a node is heard for the first time. It runs in the background during the whole session. Alerts that you did not acknowledge show as a badge in the header. | none |
| **🕒 Clock drift** | How far the clock of each node is from yours. A node with a wrong clock puts wrong times on what it sends, and only its owner can set it. The page has a histogram of the offsets, from the clocks behind yours, through the clocks in sync, to the clocks ahead. Then it lists your managed nodes (the nodes whose admin password MeshTerm stores), and each other node whose clock is out of sync, the largest offset first. Press Enter to open the node page. In a chat, a message from a wrong clock shows the time when it arrived, with a `?` mark. | `meshterm clocks` |
| **⏳ Time machine** | Everything that the recorder ever heard, as braille charts: reception volume, the median-SNR band, the rhythm of the hours of the day, packets and nodes for each day, and first-ever arrivals. You can switch the time window between 24h, 7d, 30d, and all time. On the PicoCalc, the windows stop at 30d. You can look at one node or at the whole mesh. | none |
| **🎧 Monitor** | The app always records passively. On the command line, this command captures a window of a fixed length in the foreground. It shows each overheard packet as it arrives, and it gives a summary at the end. It transmits nothing. It only listens. | `meshterm monitor --seconds 60` |