From 97e89cfccc9f416ba0149878e5202d20a4f614c4 Mon Sep 17 00:00:00 2001 From: Richard Alpe Date: Tue, 2 Dec 2025 12:35:05 +0100 Subject: [PATCH] confd: extend infix-system with service runtime statistics Add statistics container to service model with memory usage, uptime, and restart count tracking. Updates YANG revision to 2025-12-02. Signed-off-by: Richard Alpe --- src/confd/yang/confd.inc | 2 +- src/confd/yang/confd/infix-system.yang | 27 +++++++++++++++++++ ...0-18.yang => infix-system@2025-12-02.yang} | 0 3 files changed, 28 insertions(+), 1 deletion(-) rename src/confd/yang/confd/{infix-system@2025-10-18.yang => infix-system@2025-12-02.yang} (100%) diff --git a/src/confd/yang/confd.inc b/src/confd/yang/confd.inc index 4841eb7a..936a2c15 100644 --- a/src/confd/yang/confd.inc +++ b/src/confd/yang/confd.inc @@ -38,7 +38,7 @@ MODULES=( "infix-firewall-services@2025-04-26.yang" "infix-firewall-icmp-types@2025-04-26.yang" "infix-meta@2025-12-10.yang" - "infix-system@2025-10-18.yang" + "infix-system@2025-12-02.yang" "infix-services@2025-12-10.yang" "ieee802-ethernet-interface@2019-06-21.yang" "infix-ethernet-interface@2024-02-27.yang" diff --git a/src/confd/yang/confd/infix-system.yang b/src/confd/yang/confd/infix-system.yang index 805495df..f9ecaa90 100644 --- a/src/confd/yang/confd/infix-system.yang +++ b/src/confd/yang/confd/infix-system.yang @@ -28,6 +28,11 @@ module infix-system { contact "kernelkit@googlegroups.com"; description "Infix augments and deviations to ietf-system."; + revision 2025-12-02 { + description "Extend services with runtime statistics: + - Add statistics container with memory-usage, uptime, restart-count"; + reference "internal"; + } revision 2025-10-18 { description "New system-state status: - Add system resource usage: memory, loadavg, filesystem usage @@ -508,6 +513,28 @@ module infix-system { description "Detailed current status of the process."; } + + container statistics { + description "Service resource usage and runtime statistics"; + config false; + + leaf memory-usage { + type uint64; + units "bytes"; + description "Current memory usage in bytes"; + } + + leaf uptime { + type uint64; + units "seconds"; + description "Time service has been running"; + } + + leaf restart-count { + type uint32; + description "Number of service restarts"; + } + } } } diff --git a/src/confd/yang/confd/infix-system@2025-10-18.yang b/src/confd/yang/confd/infix-system@2025-12-02.yang similarity index 100% rename from src/confd/yang/confd/infix-system@2025-10-18.yang rename to src/confd/yang/confd/infix-system@2025-12-02.yang