Skip to content

Commit 312b521

Browse files
committed
statd: populate service runtime statistic
Populate operational runtime statistics for services. Signed-off-by: Richard Alpe <[email protected]>
1 parent 67d9d2b commit 312b521

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/statd/python/yanger/ietf_system.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,12 @@ def add_services(out):
189189
"pid": d["pid"],
190190
"name": d["identity"],
191191
"status": d["status"],
192-
"description": d["description"]
192+
"description": d["description"],
193+
"statistics": {
194+
"memory-usage": str(d.get("memory", 0)),
195+
"uptime": str(d.get("uptime", 0)),
196+
"restart-count": int(d.get("restarts", 0))
197+
}
193198
}
194199
services.append(entry)
195200

0 commit comments

Comments
 (0)