当前位置: 首页 > news >正文

高端网站开发怎么选手游推广去哪里找客源

高端网站开发怎么选,手游推广去哪里找客源,网站开发进度把握,响应式网站 英语Android Car WatchDog I/O监控服务 背景: 某基于Android 13的车载系统。 某天长时间测试一款3方(非SystemApp)时,该款应用偶发闪退现象。 通过日志分析,发现应用被系统的 Car WatchDog(喂狗服务&#xff…

Android Car WatchDog I/O监控服务

  • 背景:
    某基于Android 13的车载系统。

某天长时间测试一款3方(非SystemApp)时,该款应用偶发闪退现象。
通过日志分析,发现应用被系统的 Car WatchDog(喂狗服务)Disable掉了。
日志如下

Disabled package *** on user*** until used due to resource overuse

对应的代码部分。
/packages/services/Car/service/src/com/android/car/watchdog/WatchdogPerfHandler.java

/** Disables a package for specific user until used. */
public boolean disablePackageForUser(String packageName, @UserIdInt int userId) {try {int currentEnabledState =PackageManagerHelper.getApplicationEnabledSettingForUser(packageName, userId);switch (currentEnabledState) {case COMPONENT_ENABLED_STATE_DISABLED:case COMPONENT_ENABLED_STATE_DISABLED_USER:case COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED:Slogf.w(TAG, "Unable to disable application for user %d, package '%s' as the "+ "current enabled state is %s", userId, packageName,toEnabledStateString(currentEnabledState));return false;}PackageManagerHelper.setApplicationEnabledSettingForUser(packageName,COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED, /* flags= */ 0, userId,mContext.getPackageName());appendToDisabledPackagesSettingsString(packageName, userId);Slogf.i(TAG, "Disabled package '%s' on user %d until used due to resource overuse",packageName, userId);} catch (Exception e) {Slogf.e(TAG, e, "Failed to disable application for user %d, package '%s'", userId,packageName);return false;}return true;
}

问题分析

Car WatchDog中的IO Monitor,会监监控所有应用或服务的磁盘I/O用量。以保证系统的稳定。主要包括:

  • 应用的磁盘I/O写入量。
  • 应用的System-wide I/O写入量(宽带)

当应用或服务超过预定义的阈值时,Car WatchDog会对相应的应用或者服务执行相应操作(比如 kill掉):

  • 系统服务或应用,不受限制(可以通过配置文件指定,哪些系统服务或应用受到监控)
  • 三方应用,监控被进行限制。

设定的阈值统计范围时,一天内。
Car WatchDog中的IO Monitor,会统计一天内的I/O使用情况。

上述问题分析

回到上面说的问题。某一款三方应用,偶尔退出,并且系统中存在下述日志。

Disabled package *** on user*** until used due to resource overuse

该日志说明,这款应用因为I/O使用超过阈值,被系统Kill。
后续通过复现,抓取IO相应日志,发现出现问题时该应用,在一天内的写入量超过3GB,这个值已经超过系统的阈值配置。

阈值配置文件:
/packages/services/Car/cpp/watchdog/server/data/third_party_resource_overuse_configuration.xml

<?xml version='1.0' encoding='utf-8'?>
<!-- Copyright (C) 2021 The Android Open Source ProjectLicensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
--><resourceOveruseConfiguration version="1.0"><componentType> THIRD_PARTY </componentType><ioOveruseConfiguration><!-- Default thresholds in MiB for all third-party packages that don't have app categoryspecific thresholds. --><componentLevelThresholds><state id="foreground_mode"> 3072 </state><state id="background_mode"> 2048 </state><state id="garage_mode"> 4096 </state></componentLevelThresholds></ioOveruseConfiguration>
</resourceOveruseConfiguration>

修改: 去掉该三方引用的无用I/O操作。后续测试,无偶先问题。

关于Android源码部分的实现,可以感兴趣的可以阅读如下源文件。
packages/services/Car/cpp/watchdog/server/src/IoOveruseMonitor.cpp

http://www.mmbaike.com/news/42286.html

相关文章:

  • 重庆网站制作工作室宁波seo优化外包公司
  • 人防工程做资料的网站合肥网站排名
  • 找钟点工做的网站关键词查询工具免费
  • 做网站公司项目的流程app推广刷量
  • 有什么网站可以做设计赚钱吗惠州seo整站优化
  • 商洛做网站的公司seo零基础培训
  • 网站设计 北京 010经典软文广告
  • 自己做网站卖东西怎么样无锡今日头条新闻
  • 弄几个的网站广东seo推广
  • 高唐做创建网站的公司搜索推广平台
  • 摄影网站建设的论文开发网站建设
  • 深圳靠谱的网站建设重庆seo论
  • 高价词网站源码天津海外seo
  • 浙江鸿翔水利建设有限公司网站南京seo外包平台
  • 二手表网站广告联盟平台哪个好
  • 江西建站哪家专业seo怎么优化关键词排名
  • 做帮助手册的网站平面设计
  • 兰州市生态建设管理局网站域名ip地址在线查询
  • 做幼儿网站的目标外贸推广建站
  • 宝山网站建设中国去中心化搜索引擎
  • 动易企业网站网络营销方式与工具有哪些
  • 龙华网站建设设计宁波seo怎么做推广渠道
  • 外贸移动端网站模板西安企业网站seo
  • 做快三网站谷歌seo网站运营
  • com网站注册合肥网络营销公司
  • 网站开发下人员配置软件开发流程八个步骤
  • 手机app软件开发公司排名上海搜索引擎优化1
  • 学做ps的软件的网站有哪些内容百度网址大全电脑版旧版本
  • 电子工程师网站中国新闻
  • 哪些网站做的人比较少最近三天的新闻大事国内