Files
Joachim Wiberg ffe5ed1e32 statd, show: fix several operational data reporting bugs
Three bugs found while testing modem support on hardware:

ietf_system.py: "interface": null written to DNS server entries when
  no interface is associated, causing LY_EVALID in the ietf-system
  schema validator.  Only include the key when the interface name is
  non-empty.

ietf_system.py: empty list inserts (user [], server [], options [],
  search []) overwrote configured data in the operational store instead
  of leaving it intact.  Guard each insert so operational data only
  shadows configured data when there is something to report.

show system: CPU temperature reported only the first sensor named
  exactly "cpu", "soc", or "core".  Platforms with multiple thermal
  zones (e.g. BPI-R4 exposes cpu and cpu1) always showed only one
  reading.  Collect all sensors whose name matches a CPU/SoC prefix
  and report the maximum.

statd.c: yanger parse errors logged without model name or libyang
  error string, making failures hard to diagnose.  Include both.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2026-06-07 20:50:29 +02:00

422 lines
10 KiB
JSON

{
"ietf-system:system": {
"hostname": "target",
"authentication": {
"user": [
{
"name": "admin",
"password": "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A",
"infix-system:shell": "infix-system:bash"
}
]
},
"clock": {
"timezone-utc-offset": 0
}
},
"ietf-system:system-state": {
"infix-system:software": {
"compatible": "infix-x86_64",
"variant": "",
"booted": "primary",
"boot-order": [
"primary",
"secondary",
"net"
],
"slot": [
{
"name": "rootfs.1",
"bootname": "secondary",
"class": "rootfs",
"state": "inactive",
"bundle": {
"compatible": "infix-x86_64",
"version": "94cd526"
},
"size": "126205952",
"sha256": "6cc0272f46b1a014f91693dc6218ce2f9a4b58bea727c492f6689c3ab102acca",
"installed": {
"datetime": "2025-01-15T10:00:56Z",
"count": 1
},
"activated": {
"datetime": "2025-01-15T10:00:56Z",
"count": 1
}
},
{
"name": "rootfs.0",
"bootname": "primary",
"class": "rootfs",
"state": "booted",
"bundle": {
"compatible": "infix-x86_64",
"version": "94cd526"
},
"size": "126205952",
"sha256": "6cc0272f46b1a014f91693dc6218ce2f9a4b58bea727c492f6689c3ab102acca",
"installed": {
"datetime": "2025-01-15T10:00:56Z",
"count": 1
},
"activated": {
"datetime": "2025-01-15T10:00:56Z",
"count": 1
}
},
{
"name": "net.0",
"bootname": "net",
"class": "net",
"state": "inactive",
"bundle": {},
"installed": {},
"activated": {}
}
],
"installer": {
"operation": "idle",
"progress": {
"percentage": 0
}
}
},
"infix-system:ntp": {
"sources": {
"source": [
{
"address": "192.168.1.1",
"mode": "server",
"state": "candidate",
"stratum": 1,
"poll": 6
},
{
"address": "192.168.2.1",
"mode": "server",
"state": "candidate",
"stratum": 1,
"poll": 6
},
{
"address": "192.168.3.1",
"mode": "server",
"state": "selected",
"stratum": 1,
"poll": 6
}
]
}
},
"infix-system:dns-resolver": {
"server": [
{
"address": "192.168.2.1",
"origin": "dhcp",
"interface": "e7"
}
]
},
"clock": {
"boot-datetime": "2026-01-02T20:42:11+00:00",
"current-datetime": "2026-01-02T20:43:23+00:00"
},
"platform": {
"os-name": "Infix",
"os-version": "v25.11.0-135-g44d2af57-dirty",
"os-release": "v25.11.0-135-g44d2af57-dirty",
"machine": "x86_64"
},
"infix-system:services": {
"service": [
{
"pid": 1185,
"name": "udevd",
"status": "running",
"description": "Device event daemon (udev)",
"statistics": {
"memory-usage": "0",
"uptime": "1390",
"restart-count": 0
}
},
{
"pid": 2248,
"name": "dbus",
"status": "running",
"description": "D-Bus message bus daemon",
"statistics": {
"memory-usage": "0",
"uptime": "1390",
"restart-count": 0
}
},
{
"pid": 3039,
"name": "confd",
"status": "running",
"description": "Configuration daemon",
"statistics": {
"memory-usage": "0",
"uptime": "1390",
"restart-count": 0
}
},
{
"pid": 3548,
"name": "netopeer",
"status": "running",
"description": "NETCONF server",
"statistics": {
"memory-usage": "0",
"uptime": "1388",
"restart-count": 0
}
},
{
"pid": 2249,
"name": "dnsmasq",
"status": "running",
"description": "DHCP/DNS proxy",
"statistics": {
"memory-usage": "0",
"uptime": "1390",
"restart-count": 0
}
},
{
"pid": 3559,
"name": "tty:hvc0",
"status": "running",
"description": "Getty on hvc0",
"statistics": {
"memory-usage": "0",
"uptime": "1388",
"restart-count": 0
}
},
{
"pid": 2340,
"name": "iitod",
"status": "running",
"description": "LED daemon",
"statistics": {
"memory-usage": "0",
"uptime": "1390",
"restart-count": 0
}
},
{
"pid": 3560,
"name": "klishd",
"status": "running",
"description": "CLI backend daemon",
"statistics": {
"memory-usage": "0",
"uptime": "1388",
"restart-count": 0
}
},
{
"pid": 3617,
"name": "mdns-alias",
"status": "running",
"description": "mDNS alias advertiser ",
"statistics": {
"memory-usage": "0",
"uptime": "1388",
"restart-count": 0
}
},
{
"pid": 0,
"name": "mstpd",
"status": "stopped",
"description": "Spanning Tree daemon",
"statistics": {
"memory-usage": "0",
"uptime": "0",
"restart-count": 0
}
},
{
"pid": 3564,
"name": "rauc",
"status": "running",
"description": "Software update service",
"statistics": {
"memory-usage": "0",
"uptime": "1388",
"restart-count": 0
}
},
{
"pid": 0,
"name": "resolvconf",
"status": "done",
"description": "Update DNS configuration",
"statistics": {
"memory-usage": "0",
"uptime": "0",
"restart-count": 2
}
},
{
"pid": 3472,
"name": "statd",
"status": "running",
"description": "Status daemon",
"statistics": {
"memory-usage": "0",
"uptime": "1389",
"restart-count": 0
}
},
{
"pid": 3653,
"name": "staticd",
"status": "running",
"description": "Static routing daemon",
"statistics": {
"memory-usage": "0",
"uptime": "1388",
"restart-count": 0
}
},
{
"pid": 2241,
"name": "syslogd",
"status": "running",
"description": "System log daemon",
"statistics": {
"memory-usage": "0",
"uptime": "1390",
"restart-count": 0
}
},
{
"pid": 2242,
"name": "watchdogd",
"status": "running",
"description": "System watchdog daemon",
"statistics": {
"memory-usage": "0",
"uptime": "1390",
"restart-count": 0
}
},
{
"pid": 3587,
"name": "zebra",
"status": "running",
"description": "Zebra routing daemon",
"statistics": {
"memory-usage": "0",
"uptime": "1388",
"restart-count": 0
}
},
{
"pid": 3616,
"name": "mdns",
"status": "running",
"description": "Avahi mDNS-SD daemon",
"statistics": {
"memory-usage": "0",
"uptime": "1388",
"restart-count": 0
}
},
{
"pid": 3618,
"name": "chronyd",
"status": "running",
"description": "Chrony NTP v3/v4 daemon",
"statistics": {
"memory-usage": "0",
"uptime": "1388",
"restart-count": 0
}
},
{
"pid": 3633,
"name": "lldpd",
"status": "running",
"description": "LLDP daemon (IEEE 802.1ab)",
"statistics": {
"memory-usage": "0",
"uptime": "1388",
"restart-count": 0
}
},
{
"pid": 3635,
"name": "nginx",
"status": "running",
"description": "Web server",
"statistics": {
"memory-usage": "0",
"uptime": "1388",
"restart-count": 0
}
},
{
"pid": 3636,
"name": "rousette",
"status": "running",
"description": "RESTCONF server",
"statistics": {
"memory-usage": "0",
"uptime": "1388",
"restart-count": 0
}
},
{
"pid": 3641,
"name": "sshd",
"status": "running",
"description": "OpenSSH daemon",
"statistics": {
"memory-usage": "0",
"uptime": "1388",
"restart-count": 0
}
}
]
},
"infix-system:resource-usage": {
"memory": {
"total": "355076",
"free": "134936",
"available": "225652"
},
"load-average": {
"load-1min": "0.12",
"load-5min": "0.05",
"load-15min": "0.02"
},
"filesystem": [
{
"mount-point": "/",
"size": "142720",
"used": "142720",
"available": "0"
},
{
"mount-point": "/var",
"size": "86427",
"used": "281",
"available": "79270"
},
{
"mount-point": "/cfg",
"size": "14073",
"used": "67",
"available": "12860"
}
]
}
}
}