From 104a5d733f15f44dd0fd93f187fef62f41cf1d45 Mon Sep 17 00:00:00 2001 From: xuhe Date: Tue, 26 Nov 2024 10:44:59 +0800 Subject: [PATCH] Add glibc version and jdk version to html report --- kyreport/ky_data_collection.py | 6 +++--- kyreport/ky_report.py | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/kyreport/ky_data_collection.py b/kyreport/ky_data_collection.py index c13b348..37ee0f3 100644 --- a/kyreport/ky_data_collection.py +++ b/kyreport/ky_data_collection.py @@ -54,9 +54,9 @@ class DATACOLLECTION: if sub_s == "cat /proc/cpuinfo": continue - + grp_obj['group'] = sub_g - grp_obj['sub'].append(sub_obj) + grp_obj['sub'].append(sub_obj) if 0 < len(grp_obj['group']) and 0 < len(grp_obj['sub']): @@ -76,7 +76,7 @@ class DATACOLLECTION: ret_arr.append(grp_obj) self.__arr_cpu_info = ret_arr - + except Exception as err: Logger().error('Failed parse file "{}": {}'.format(fname, err)) diff --git a/kyreport/ky_report.py b/kyreport/ky_report.py index 53ca97a..8614621 100644 --- a/kyreport/ky_report.py +++ b/kyreport/ky_report.py @@ -59,6 +59,9 @@ class KyReport: info['base_info']['system_version'] = Command.cmd_exec(r'cat /etc/.productinfo | grep release') info['base_info']['kernel_version'] = Command.cmd_exec(r'uname -r') info['base_info']['gcc_version'] = Command.cmd_exec(r'gcc --version | head -n 1') + info['base_info']['glibc_version'] = Command.cmd_exec(r'getconf GNU_LIBC_VERSION') # ldd --version | head -n 1 + info['base_info']['jdk_version'] = Command.cmd_exec(r'java -version 2>&1 | head -n 1') + # end base info # setting base cpu info -- Gitee