From 2852fef83501b280056caa7aec4036b3862d622d Mon Sep 17 00:00:00 2001 From: Ming Xie Date: Mon, 27 Nov 2023 15:25:42 +0800 Subject: [PATCH] Get cpu status from windows guests Signed-off-by: Ming Xie --- virttest/utils_v2v.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/virttest/utils_v2v.py b/virttest/utils_v2v.py index b6f84e1ddd..d70edd7f55 100644 --- a/virttest/utils_v2v.py +++ b/virttest/utils_v2v.py @@ -1200,6 +1200,16 @@ def get_driver_info(self, signed=True): LOG.debug("Command output:\n%s", output) return output + def get_cpu_status(self): + """ + Get windows cpu status. + """ + cmd = "wmic cpu get status" + output = self.session.cmd_output(cmd) + if not output: + LOG.error('Fail to get cpu status') + return output + def get_windows_event_info(self): """ Get windows event log info about WSH.