49 lines
1.6 KiB
Diff
49 lines
1.6 KiB
Diff
From d1a690e104e95ea8f35f82d500abb3aff5c77097 Mon Sep 17 00:00:00 2001
|
|
From: Guvenc Gulce <guvenc@linux.ibm.com>
|
|
Date: Fri, 16 Jul 2021 14:44:02 +0200
|
|
Subject: [PATCH 3/3] smc-tools: stats: Use correct fallback counter values
|
|
after reset
|
|
|
|
Fallback counters are using the merged values for the cache
|
|
when reset is called. The cache file needs to be filled with
|
|
absolute values as a reference point for the reset as the
|
|
successive calls will deduct this reference point from the
|
|
new absolute value.
|
|
|
|
Signed-off-by: Guvenc Gulce <guvenc@linux.ibm.com>
|
|
---
|
|
README.md | 1 +
|
|
stats.c | 4 ++--
|
|
2 files changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/README.md b/README.md
|
|
index 175525d..aa80dbd 100644
|
|
--- a/README.md
|
|
+++ b/README.md
|
|
@@ -49,6 +49,7 @@ Release History:
|
|
Bug fixes:
|
|
- `smcd`/`smcr`: stats: Fix memory overread in is_data_consistent()
|
|
- `smcd`/`smcr`: stats: Fix memory and file handle leaks
|
|
+ - `smcd`/`smcr`: stats: Use correct fallback counter values after reset
|
|
- `smc_chk`: Remove 'EXPERIMENTAL' flag
|
|
- `smc_chk`: Improve cleanup
|
|
- `smc_chk`: Start server with intended port
|
|
diff --git a/stats.c b/stats.c
|
|
index 4495434..a74c4cf 100644
|
|
--- a/stats.c
|
|
+++ b/stats.c
|
|
@@ -1009,8 +1009,8 @@ static void fill_cache_file()
|
|
fprintf(cache_fp, "%-12d%-16d%-16d\n",i , val_err, val_cnt);
|
|
}
|
|
|
|
- fprintf(cache_fp, "%16llu\n", smc_rsn.srv_fback_cnt);
|
|
- fprintf(cache_fp, "%16llu\n", smc_rsn.clnt_fback_cnt);
|
|
+ fprintf(cache_fp, "%16llu\n", smc_rsn_org.srv_fback_cnt);
|
|
+ fprintf(cache_fp, "%16llu\n", smc_rsn_org.clnt_fback_cnt);
|
|
}
|
|
|
|
int invoke_stats(int argc, char **argv, int option_details)
|
|
--
|
|
2.25.1
|
|
|