From 6cfd808823406972a58fb3a5aef16ebff2b8ff4b Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Wed, 23 Nov 2022 17:38:28 -0800 Subject: [PATCH] utils: Dump statistics counters in mqnic-dump Signed-off-by: Alex Forencich --- utils/mqnic-dump.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/utils/mqnic-dump.c b/utils/mqnic-dump.c index d19d56a77..ba0eafcab 100644 --- a/utils/mqnic-dump.c +++ b/utils/mqnic-dump.c @@ -471,6 +471,15 @@ int main(int argc, char *argv[]) } } + if (dev->stats_rb) + { + printf("Statistics counters\n"); + for (int k = 0; k < dev->stats_count; k++) + { + printf("Index %d: %lu\n", k, mqnic_stats_read(dev, k)); + } + } + err: mqnic_close(dev);