From 0d3a952be6996b7324246026e23e4708944670c4 Mon Sep 17 00:00:00 2001 From: lixiaoyong1 Date: Tue, 27 Feb 2024 17:37:56 +0800 Subject: [PATCH] Add __get_dmidecode_info to class MemInfo --- category/get_memory_info.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/category/get_memory_info.py b/category/get_memory_info.py index 5d49e09..5e14061 100644 --- a/category/get_memory_info.py +++ b/category/get_memory_info.py @@ -30,3 +30,12 @@ class MemInfo(): res_m = FileOperation.wrap_output_format(cmd_name_m, cmd_result, '-') return Command.cmd_write_file(res_m, self.__default_file_name) + def __get_dmidecode_info(self): + ''' + Memory slots info + ''' + dmidecode_command="dmidecode -t memory" + cmd_name = dmidecode_command + cmd_result = Command.cmd_run(dmidecode_command) + return Command.cmd_output(cmd_name, cmd_result, self.__default_file_name, '=') + -- Gitee