36 lines
1.1 KiB
Diff
36 lines
1.1 KiB
Diff
From ec4fa9fe01d0735f9440ef69e1a5a1cca63bf78e Mon Sep 17 00:00:00 2001
|
|
From: Tony Luck <tony.luck@intel.com>
|
|
Date: Fri, 25 Jan 2019 15:15:34 -0800
|
|
Subject: [PATCH 24/25] numastat: Better diagnostic when find unknown string in
|
|
meminfo
|
|
|
|
From time to time the kernel adds new statistics to the meminfo
|
|
file. These currently result in messages like this:
|
|
|
|
Token Node not in hash table.
|
|
|
|
it would be more helpful to print the actual token that was found,
|
|
rather than the word "Node". E.g.
|
|
|
|
Token KReclaimable not in hash table.
|
|
---
|
|
numastat.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/numastat.c b/numastat.c
|
|
index 25874db..1ae11fb 100644
|
|
--- a/numastat.c
|
|
+++ b/numastat.c
|
|
@@ -824,7 +824,7 @@ void show_info_from_system_file(char *file, meminfo_p meminfo, int meminfo_rows,
|
|
// example line from meminfo file: "Node 3 Inactive: 210680 kB"
|
|
int index = hash_lookup(tok[0 + tok_offset]);
|
|
if (index < 0) {
|
|
- printf("Token %s not in hash table.\n", tok[0]);
|
|
+ printf("Token %s not in hash table.\n", tok[0 + tok_offset]);
|
|
} else {
|
|
double value = (double)atol(tok[1 + tok_offset]);
|
|
if (!compatibility_mode) {
|
|
--
|
|
1.8.3.1
|
|
|