From 51aa5b268fa59d3a4fb15ff117a6b56e7df6057d Mon Sep 17 00:00:00 2001 From: Kelly Brazil Date: Wed, 25 May 2022 10:46:58 -0700 Subject: [PATCH] fix for mem info in different units --- jc/parsers/top.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jc/parsers/top.py b/jc/parsers/top.py index e55b3eed..90d69a2b 100644 --- a/jc/parsers/top.py +++ b/jc/parsers/top.py @@ -319,6 +319,7 @@ def _safe_split(string: str, path: str, delim: str = ' ', quiet=False) -> List[s return split_string + def _process(proc_data: List[Dict], quiet=False) -> List[Dict]: """ Final processing to conform to the schema. @@ -565,7 +566,7 @@ def parse( ) continue - if line.startswith('KiB Mem :'): + if line[1:].startswith('iB Mem :'): # KiB Mem : 3861332 total, 3446476 free, 216940 used, 197916 buff/cache line_list = line.split() item_obj.update(