From 70447bd9e2e6049eb3c867d2ae520ea634c5317c Mon Sep 17 00:00:00 2001 From: lixiaoyong1 Date: Wed, 28 Feb 2024 17:20:43 +0800 Subject: [PATCH] Add vmstat output information --- category/get_memory_info.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/category/get_memory_info.py b/category/get_memory_info.py index 2ab477a..1d2abde 100644 --- a/category/get_memory_info.py +++ b/category/get_memory_info.py @@ -47,7 +47,13 @@ class MemInfo(): cmd_name = "free -m" cmd_result = Command.cmd_run(free_command) res_free = FileOperation.wrap_output_format(cmd_name, cmd_result,'-') - return Command.cmd_write_file(res_free, self.__default_file_name) + + vmstat_s_cmd="vmstat -s" + cmd_result = Command.cmd_run(vmstat_s_cmd) + res_vmstat_s = FileOperation.wrap_output_format(cmd_name, cmd_result,'-') + + res = res_free + res_vmstat_s + return Command.cmd_write_file(res, self.__default_file_name) def get_info(self): ''' -- Gitee