def __init__(self, device, config=None): """ Constructor. :type device: Device :param device: The DUT :type config: dictionary :param config: Configuration of the module. Unused for this module """ SysDebug.__init__(self, device) self._sys_debug_infos = {} self.__thermals = {} self.__thermal_cpu_path = "/sys/devices/platform/coretemp.0" self.__thermal_soc_file = "soc_temp_input" self.__thermal_core_file_temp = "temp[0-9]*_input" self.__thermal_core_file_label = "temp[0-9]*_label" self.__force_thermal_cooling = False self.__thermal_zones_path = "/sys/devices/virtual/thermal" self.__campaign_config = DeviceManager().get_global_config( ).campaignConfig self.__config = {} if config: self.__config = config if "waitForCoolDown" in self.__campaign_config: self.__force_thermal_cooling = self.__campaign_config.get( "waitForCoolDown").lower() == "true"
def __init__(self, device, _config=None): """ Constructor. :type device: Device :param device: The DUT :type config: dictionary :param config: Configuration of the module. Unused for this module """ SysDebug.__init__(self, device) self._retrieve_aplog_command = "grep -h WAKELOCK" # Trigger group : # Key is the name of the group # Value is a list of [group, prefix, pattern, suffix] where pattern # will be fetched in groups by re.search self._trigger_group = [[ "action", "WAKELOCK_", "(ACQUIRE)|(RELEASE)", ": " ], ["timestamp", "TIMESTAMP=", "[0-9]*", ", "], ["tag", "TAG=", "[^,]*", ", "], ["type", "TYPE=", "[A-Z_]*", " *, "], ["count", "COUNT=", "[0-9]*", ", "], ["pid", "PID=", "[0-9]*", ", "], ["uuid", "UID=", "[0-9]*", ".*$"]] self.__wakelocks_file = None self.__active_since_col = None self.__wakelocks_stats = {} self.__ts_origin = None self.__wl_current = None
def __init__(self, device, config): """ Constructor :type config: dictionary :param config: Configuration of the module. The configurable parameter is the interval of dumps. Example of parameter: {"interval : 30} """ SysDebug.__init__(self, device) self.__stats_interval = 180 self.__dump_nb = 0 self.__lss_table = {} self._retrieve_aplog_command = "sed -n '/----MID_PMU_STATS_LOG_BEGIN----/," \ "/----MID_PMU_STATS_LOG_END----/p'" self._regex_begin += "I\s+KERNEL\s*:\s*\[[\s\.\d,]*\]\s+" self.__seconds_before_next_dump = 0 self.__init_sync_ts = 0 self.__sysinfo = None if config and "interval" in config and config["interval"].isdigit(): self.__stats_interval = int(config["interval"]) self._logger.debug("Update pmu_stats_interval to %d" % self.__stats_interval) else: self._logger.debug("No change : config : %s" % str(config))
def __init__(self, device, _config=None): """ Constructor. :type device: DeviceBase :param device: The DUT """ SysDebug.__init__(self, device) self.__residencies_api = self._device.get_uecmd("Residencies") self._use_aplog = False
def __init__(self, device, _config=None): """ Constructor. :type config: dictionary :param config: Configuration of the module. Unused for this module """ SysDebug.__init__(self, device) self.__pytimechart_cmd = "pytimechart-record" self._use_aplog = False
def __init__(self, device, _config=None): """ Constructor. :type config: dictionary :param config: Configuration of the module. Unused for this module """ SysDebug.__init__(self, device) self._sleep_mode_apis = self._device.get_uecmd("SleepMode") self.__d_states_files = self._sleep_mode_apis.get_d_states_files() self._use_aplog = False self._print_debug = False
def __init__(self, device, _config=None): """ Constructor. :type config: dictionary :param config: Configuration of the module. Unused for this module """ SysDebug.__init__(self, device) self._retrieve_aplog_regexps.append("mdm_ctrl: CORE_DUMP") self._trigger_group = [[ "mpanic_errno", "KERNEL *: *\[[ \d\.]*\] mdm_ctrl: CORE_DUMP", ".*", "$" ]]
def __init__(self, device, _config=None): """ Constructor. :type config: dictionary :param config: Configuration of the module. Unused for this module """ SysDebug.__init__(self, device) self._retrieve_aplog_regexps.append("failed to suspend") # Trigger group : # Key is the name of the group # Value is a list of [group, prefix, pattern, suffix] where pattern # will be fetched in groups by re.search self._trigger_group = [["device", ".*PM\s:\sDevice ", ".*", " failed to suspend.*:"], ["reason", " ", ".*", "$"]]
def __init__(self, device, _config=None): """ Constructor. :type config: dictionary :param config: Configuration of the module. Unused for this module """ SysDebug.__init__(self, device) self.__interrupts_file = "/proc/interrupts" # May change for some devices self._use_aplog = False self._trigger_group = [["name", "\s*", "[0-9A-Za-z]*", ":"], ["numbers", "\s*", "([0-9]*\s*)*", "\s*"], ["information", "\s*", "[A-Za-z].*", "$"]] self._infos_before = [] self._print_debug = False
def __init__(self, device, _config=None): """ Constructor. :type config: dictionary :param config: Configuration of the module. Unused for this module """ SysDebug.__init__(self, device) self._retrieve_aplog_regexps.append("akeup from") # Trigger group : # Key is the name of the group # Value is a list of [group, prefix, pattern, suffix] where pattern # will be fetched in groups by re.search self._trigger_group = [["irq", ".*akeup\s*from\s*IRQ\s*", "[0-9]+", "\s*"], ["name", "\s*", ".*", "$"]]
def __init__(self, device, config=None): """ Constructor. :type config: dict :param config: Defines what this instance will return: Use 'frequencies' to have the safe frequencies range or 'channels' for the frequencies converted in channels. """ SysDebug.__init__(self, device) self._trigger_group = [[ "soft_ap_channel", ".*Wi-Fi Tethering running on channel ", "\d+", "$" ]] self._aplog_level = "I" self._retrieve_aplog_regexps.append( "CWS_CELLCOEX_.*Wi-Fi Tethering running on channel")
def __init__(self, device, _config=None): """ Constructor. :type config: dictionary :param config: Configuration of the module. Unused for this module """ SysDebug.__init__(self, device) self._print_debug = False self._use_aplog = True self._retrieve_aplog_regexps.append("lowmemorykiller: Killing") # Trigger group : # Key is the name of the group # Value is a list of [group, prefix, pattern, suffix] where pattern # will be fetched in groups by re.search self._trigger_group = [[ "process", ".*lowmemorykiller: Killing '", "[^']+", "'.*" ], ["eol", "\s*", ".*", "$"]]
def __init__(self, device, config=None): """ Constructor. :type config: dictionary :param config: Configuration of the module. Unused for this module """ SysDebug.__init__(self, device) self._use_aplog = False self._print_debug = False self.__timer_stats_file = "/proc/timer_stats" self._min_per_sec = 20 # only show timers seen at least 10 times per second self._trigger_group = [["number", "\s*", "\d+", ""], ["deferred", "", "[D]?", "\s*,\s*"], ["pid", "\s*", "[0-9]+", "\s*"], ["pname", "\s*", ".*", "\s*"], ["function", "\s+", "[A-Za-z0-9_]+", "\s+"], ["timer", "\s*\(", "[A-Za-z0-9_]+", "\).*$"]]
def __init__(self, device, config=None): """ Constructor. :type config: dictionary :param config: Configuration of the module. Unused for this module """ SysDebug.__init__(self, device) self._use_aplog = False self.__dyndebug_keywords = [] self.__dyndebug_file = "/d/dynamic_debug/control" self.__data_file = "/data/dyndbg_tmp" if config: for key in config: self.__dyndebug_keywords.append(key) else: self._logger.debug( "Warning ! No keywords provided, module will be disabled")
def __init__(self, device, _config=None): """ Constructor. :type config: dictionary :param config: Configuration of the module. Unused for this module """ SysDebug.__init__(self, device) self._retrieve_aplog_regexps.append("AlarmManager: triggered:") # Trigger group : # Key is the name of the group # Value is a list of [group, prefix, pattern, suffix] where pattern # will be fetched in groups by re.search self._trigger_group = [[ "intent", "AlarmManager\s*:\s*triggered\s*:\s*((act)|(cmp))=", "[*\\/@.\\$a-zA-Z0-9-:_]+", "\s*.*" ], ["pkg", "Pkg:\s*", ".*", "$"]] self._aplog_level = "V"
def __init__(self, device, _config=None): """ Constructor. :type config: dictionary :param config: Configuration of the module. Unused for this module """ SysDebug.__init__(self, device) self.__event_number = 0 self._use_aplog = False self._trigger_group = [["id", "^", "\d+", "\s*\|"], ["eventid", "\s*", "[0-9a-f]*", "\s*\|"], ["eventname", "\s*", "[A-Z]*", "\s*\|"], ["type", "\s*", "[A-Z_]*", "\s*\|"], ["data0", "\s*", "[^\|]*", "\s*\|"], ["data1", "\s*", "[^\|]*", "\s*\|"], ["data2", "\s*", "[^\|]*", "\s*\|"], ["evdate", "\s*", "[0-9-/:]*", "\s*\|"], ["crashdir", "\s*", ".*", "$"]] self._date_format = "%Y-%m-%d/%H:%M:%S"
def __init__(self, device, config=None): """ Constructor. :type config: dict :param config: Defines what this instance will return: Use 'frequencies' to have the safe frequencies range or 'channels' for the frequencies converted in channels. """ SysDebug.__init__(self, device) self._modem_api = self._device.get_uecmd("Modem") self._config = None if config is not None: if self.CONFIG_FREQUENCIES in config.keys(): self._config = self.CONFIG_FREQUENCIES elif self.CONFIG_CHANNELS in config.keys(): self._config = self.CONFIG_CHANNELS else: msg = "SafeRangeBase configuration is not good!" self._logger.error(msg) raise DeviceException(DeviceException.INVALID_PARAMETER, msg) else: self._config = self.CONFIG_CHANNELS self._coex_mgr_version = self._modem_api.get_lte_coex_manager_version() self._trigger_group = [] if self._coex_mgr_version == 1: self._aplog_level = "D" self._retrieve_aplog_regexps.append("COEX_SAFECHANNELS *:") elif self._coex_mgr_version == 2: self._aplog_level = "I" if self._domains == 'WIFI': # We'll compute the frequency from the channel list. self._retrieve_aplog_regexps.append( "CWS_CELLCOEX_.*mws.wifi.safeChannels: setValue(\[") else: # BT and BLE have same source for parsing self._retrieve_aplog_regexps.append( "CWS_CELLCOEX_.*BT Safe frequency range")
def __init__(self, device, config=None): """ Constructor. :type config: dictionary :param config: Configuration of the module. Unused for this module """ SysDebug.__init__(self, device) self.__socwatch_command = "" self.__socwatch_path = self._device.get_config("SocwatchPath", "", str) self._use_aplog = False self._os = platform.system() self.__socwatch_config = {} self.__socwatch_folder = "/data/socwatch" self.__socwatch_zip = "socwatch_output.tgz" if config: for key in config: self.__socwatch_config[key] = config[key] else: self._logger.debug( "Warning ! No socwatch command provided, module will be disabled" )