diff --git a/kyreport/ky_report.py b/kyreport/ky_report.py index 917ca587c85e6488abc0c64559479f2c74bea6de..8029e2c51c8cb205e8cff4c3443201e9b6d0cb82 100644 --- a/kyreport/ky_report.py +++ b/kyreport/ky_report.py @@ -51,3 +51,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') # end base info + + # setting base cpu info + info['base_info']['cpu_model'] = Command.cmd_exec('export LANG="en_US.UTF-8" && lscpu | grep \'Model name:\' | cut -d \':\' -f 2 | sed -e \'s/^[ ]*//g\' | sed -e \'s/[ ]*$//g\'') + info['base_info']['cpu_arch'] = Command.cmd_exec('export LANG="en_US.UTF-8" && lscpu | grep \'Architecture:\' | cut -d \':\' -f 2 | sed -e \'s/^[ ]*//g\' | sed -e \'s/[ ]*$//g\'') + info['base_info']['cpu_cores'] = Command.cmd_exec('export LANG="en_US.UTF-8" && lscpu | grep \'CPU(s)\' | grep -v -E "NUMA|On-line" | cut -d \':\' -f 2 | sed -e \'s/^[ ]*//g\' | sed -e \'s/[ ]*$//g\'') + # end base cpu info