statd: populate service runtime statistic

Populate operational runtime statistics for services.

Signed-off-by: Richard Alpe <richard@bit42.se>
This commit is contained in:
Richard Alpe
2025-12-17 15:34:07 +01:00
parent 97e89cfccc
commit f653cacd1a
+6 -1
View File
@@ -189,7 +189,12 @@ def add_services(out):
"pid": d["pid"],
"name": d["identity"],
"status": d["status"],
"description": d["description"]
"description": d["description"],
"statistics": {
"memory-usage": str(d.get("memory", 0)),
"uptime": str(d.get("uptime", 0)),
"restart-count": int(d.get("restarts", 0))
}
}
services.append(entry)