Expand description
This computer’s CPU and memory for a paired device’s Sysinfo, read-only (agentmux-mobile’s PLAN_CHANNEL_AS_ONE_LIST_2026_10_13 §3a):
GET /agentmux/viewer/sysinfo: the latest sample, aTimeSeriesData({ts, values, uptime_secs}, the metric names the desktop’s Sysinfo reads:cpu,cpu:N,mem:*,net:*,disk:*). 204 before the first sample.GET /agentmux/viewer/sysinfo/feed?since=<ms>: the same as SSE, onesampleevent per sample, itsiditsts: first the kept history aftersince(or afterLast-Event-ID; all of it with neither), then each new sample, with a heartbeat on a quiet stream.
Both read the samples the sysinfo loop already keeps
(Broker::read_event_history), so a phone watching costs no extra
sampling. Built on REPORT_SYSINFO_REWRITE_AND_MODERN_MONITOR_2026_10_13’s
data layer as agreed with its author: when that layer’s shared scheduler
and since seq N read exist, the feed holds a lease while open and
resumes by sequence, and since=<ms> keeps working.
Structs§
- Sysinfo
Feed 🔒Query - Sysinfo
Timing 🔒 - A Sysinfo feed’s clocks.
Constants§
- GLOBAL_
SCOPE 🔒 - The samples kept for the whole computer (the sysinfo loop also files them under its connection’s scope; the unscoped ring holds them all).
- HISTORY_
READ 🔒 - The most samples kept, and so the most a feed sends first.
- POLL_
READ 🔒 - The most samples one poll reads back. More than a poll can miss even when the loop runs at its fastest (0.2 s) through a long stall.
- SAMPLE_
POLL 🔒 - How often the feed looks for new samples: the sysinfo loop’s own cadence.
Functions§
- handle_
viewer_ 🔒sysinfo - handle_
viewer_ 🔒sysinfo_ feed - history_
after 🔒 - The kept samples a resume asks for: those after
since, by their time. All of them with nosince, or when every kept sample is older than it (the computer’s clock went back since the device’s last one). - sample_
event 🔒 - samples 🔒
- One kept sample, as
(ts, the TimeSeriesData as sent). - samples_
after 🔒 - The samples kept after
cursor(the last one sent), by their place in the ring, not their time: a clock that goes back doesn’t hide new ones. The newestPOLL_READusually hold it; when they don’t (a stalled stream), the whole ring is read, so nothing kept is skipped. A cursor no longer kept means everything kept is newer. - sysinfo_
stream 🔒 - The kept samples after
since(all of them with none), then each new one; a heartbeat when nothing new came fortiming.heartbeat. Ends when the device is revoked or goes away.