Router Monitor

Installed November 7, 2026. Workstation user service: sol-router-monitor.service. It runs a fixed read-only shell collector over one persistent SSH…

Executive Summary

Workstation user service: sol-router-monitor.service. It runs a fixed read-only shell collector over one persistent SSH connection to 10.0.1.1; it does not install software, change configuration, restart processes, or open a local HTTP listener. sol-router-monitor status sol-router-monitor top --limit 20 sol-router-monitor status --json systemctl --user status sol-router-monitor.service journalctl --user -u sol-router-monitor.service -n 20 --no-pager systemctl --user stop sol-router-monitor.service systemctl --user start sol-router-monitor.service

Router CPU and process monitor

Installed November 7, 2026. Workstation user service:
sol-router-monitor.service. It runs a fixed read-only shell collector over
one persistent SSH connection to 10.0.1.1; it does not install software,
change configuration, restart processes, or open a local HTTP listener.

Commands

bash
sol-router-monitor status
sol-router-monitor top --limit 20
sol-router-monitor status --json
systemctl --user status sol-router-monitor.service
journalctl --user -u sol-router-monitor.service -n 20 --no-pager
systemctl --user stop sol-router-monitor.service
systemctl --user start sol-router-monitor.service

The service is enabled for the user systemd startup target. It needs a running
user manager, the existing pseudo-secret-daemon.service, and the configured
external volume. It reconnects after network failure. Starting a second writer
or running once while the daemon runs is rejected by an advisory lock.

Code: /home/david/random/bin/sol_router_monitor.py.
Configuration: /home/david/.config/sol/router-monitor.json.
Service: /home/david/.config/systemd/user/sol-router-monitor.service.

Data and retention

Samples arrive every 30 seconds. CPU utilization, per-core CPU components,
load, memory/swap, process CPU/RSS/thread counts, process birth rate, and network
interface counter rates are saved. Process CPU is reported both as percent of
one core and as percent of total router capacity. A two-core process may exceed
100 percent of one core. Process names are kernel names, sometimes truncated;
the audited process named main was /usr/syno/sbin/synongfwd at the observed
PID/boot, not an unidentified application.

Live state is latest.json; compressed hourly JSONL history is in history/:
/media/david/media/sol-router-monitor. History retention is at most seven days,
bounded to 32 MiB by removal of this monitor's oldest archives. No unrelated
files are deleted. Below 256 MiB free, history pauses and latest state carries
an explicit notice. No fallback storage location is used.

The preferred /mnt/sol-data volume fell to about 86 MiB free during deployment.
The alternate volume has UUID 15bbe2fd-d824-4224-9eef-0d26e38fbe59 and had
about 10 GiB free at setup. The daemon checks both its mount and device identity
before writing. A tiny pre-migration status copy remains at the original state
path /mnt/sol-data/sol-stack/router-monitor; it is not the current monitor state.
An additional private pre-migration-latest.json copy is in the new directory.

Private permissions: directories 0700, data files 0600. No packet payloads,
process argv, environment, raw memory addresses, or password values are logged.

Authentication and status limits

Named credential SOL_ROUTER_MONITOR_AUTH is stored in the existing encrypted
workstation secret service. It is fetched over its owner-only Unix socket and
passed to Paramiko in memory. The daemon does not read conversation logs and
does not use sudo locally or remotely. It uses the existing router admin
identity; the fixed collector is read-only, but the account is not a separate
router-enforced least-privilege monitoring account.

The previously observed SSH key is copied to
/home/david/.config/sol/router-monitor-known-hosts. Unknown/changed keys are
rejected. Initial key identity was first-observed, not independently verified.
No router SSH keys or accounts were installed.

First collection, a detected reboot, and reconnection gaps are warming_up;
CPU deltas require two compatible samples. Failures produce degraded with
an error class and last-success timestamp; exception text is not persisted.
The status command reports stale when data is older than three intervals
(at least 90 seconds). Service-active alone is not proof of fresh collection.

New/reused PIDs have unknown interval CPU until the next compatible sample.
Processes that start and exit entirely between samples can be missed. Reaped
child CPU is included separately for persistent parents and overlaps child
observations; do not add it to process totals. RSS includes shared pages and
must not be summed as physical memory usage. Network hardware offload can
limit software-counter interpretation. The daemon does not automatically
disable router services, update firmware, or send notifications.

Verbose journal diagnostics (November 10, 2026)

Each journal entry is a structured router_sample event, with CPU breakdowns,
load, memory, per-interface byte/packet/error/drop rates, and the eight busiest
processes. Entries also report collection duration, SSH connection reuse,
consecutive collection failures, last success, and history acceptance. Failures
include the exception class and collection stage, never exception messages,
credentials, remote stderr, or process command lines. The compressed history
also records the new timing and failure fields and interface counters.

Use journalctl --user -u sol-router-monitor.service -n 5 -o cat to inspect
recent detailed entries. Sampling remains every 30 seconds with the same
read-only router collector. Archive retention remains seven days / 32 MiB;
the system journal uses its own retention policy. This does not add continuous
TV ping, mesh-signal, or application-playback monitoring. A daemon restart
resets the interval baseline; the first sample is expected to be warming_up.

Verification

/home/david/random/tests/test_router_monitor.py covers CPU
normalization, reboot/PID reuse handling, degraded/stale status, private error
handling, archive retention, and low-space history suppression. Live validation
requires advancing successful timestamps, populated interval CPU after warmup,
readable compressed history, and no service restart loop.