diff --git a/category/get_perf_info.py b/category/get_perf_info.py index 92afcc825b617bc006ad744c6317c4d8c6b386e8..63d976c0bc517ac4188977a6171ece7e9588cb8e 100644 --- a/category/get_perf_info.py +++ b/category/get_perf_info.py @@ -144,6 +144,16 @@ class OffCPU(): else: return True + def __check_offcpu_pid(self): + if not (self.__pid.isdigit() and int(self.__pid) > 0): + Logger().error("检查参数 Application.OffCPU.pid 设置是否正确") + return False + if not Command.check_pid_exist(self.__pid, True): + Logger().error("检查参数 Application.OffCPU.pid 设置是否正确") + return False + else: + return True + # hotspot main function class Hotspot(): def __init__(self):