statd: extend mount-points + advertised pmds per interface

- Include /run and /tmp in mount-points, likely more interesting than /.
- Include advertised link modes in operational to compare with supported

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2026-06-14 18:28:22 +02:00
parent ad28fd9db5
commit f8f73b89cb
6 changed files with 39 additions and 5 deletions
@@ -203,10 +203,11 @@ def link(ifname):
if supported:
eth["infix-ethernet-interface:supported-pmd-types"] = supported
# Suppress when advertised == supported — that's the default
# "advertise everything" state with no diagnostic value.
# Always emit when the PHY is advertising something — even when it equals
# the full supported set, displaying the list alongside supported is
# useful for "show interfaces detail" and the WebUI ethernet card.
advertised = _ethtool_modes_to_pmd_identities(data.get("advertised-link-modes"))
if advertised and set(advertised) != set(supported):
if advertised:
eth["auto-negotiation"]["infix-ethernet-interface:advertised-pmd-types"] = advertised
speed_bps = None
+7 -2
View File
@@ -422,9 +422,14 @@ def add_resource_usage(out):
except (FileNotFoundError, ValueError):
pass
# Filesystem usage
# Filesystem usage. /run and /tmp are tmpfs (RAM-backed) and easily the
# scarcest writable storage on small embedded boards — surface them so
# operators can tell when the box is about to start dropping logs or
# failing to spool config diffs. / is the read-only rootfs (squashfs);
# always 100 % used by design but kept in the list so a flag/limit
# consumer can recognise it.
filesystems = []
for mount in ["/", "/var", "/cfg"]:
for mount in ["/", "/var", "/cfg", "/run", "/tmp"]:
try:
result = HOST.run_multiline(["df", "-k", mount], [])
if len(result) > 1: