From 9f73340e80c8c5f822b227362085353cc625f740 Mon Sep 17 00:00:00 2001 From: Kenneth Giusti Date: Mon, 18 Nov 2024 14:47:33 -0500 Subject: [PATCH] Fixes #1669: restore router memory statistics --- tools/skstat.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/skstat.in b/tools/skstat.in index 777e7b5ff..182e12e12 100755 --- a/tools/skstat.in +++ b/tools/skstat.in @@ -367,13 +367,13 @@ class BusManager: pass try: - if router.memoryUsage is not None: + if router_metrics.memoryUsage is not None: rows.append(('VmSize', NumKMG(router_metrics.memoryUsage, base=1024))) except Exception: pass try: - if router.residentMemoryUsage is not None: + if router_metrics.residentMemoryUsage is not None: rows.append(('RSS', NumKMG(router_metrics.residentMemoryUsage, base=1024))) except Exception: @@ -744,13 +744,14 @@ class BusManager: # attempt to get the qdrouterd process memory usage # this may not be present on all platforms - router = self.query('io.skupper.router.router')[0] + router_metrics = self.query('io.skupper.router.routerMetrics')[0] + try: - vm_size = router.memoryUsage + vm_size = router_metrics.memoryUsage except AttributeError: vm_size = None try: - rss_size = router.residentMemoryUsage + rss_size = router_metrics.residentMemoryUsage except AttributeError: rss_size = None