Android在某些特定情况下会在com.net.myspeechservice软件包中杀死我的服务,例如当手机上有通话时它会终止该服务。 logcat向我展示了这些统计数据。
因为CPU负载而导致它被杀死似乎非常明显。
我没有得到的是我的应用程序导致的CPU消耗百分比?它根本没有显示出来。
我没有得到以下方法?
Load: 3.13 / 2.78 / 2.26
如何从这些统计数据中评估我的应用程序导致的百分比。
请告知。
谢谢,
06-21 06:44:35.042: E/ActivityManager(88): ANR in com.net.myspeechservice
06-21 06:44:35.042: E/ActivityManager(88): Reason: Executing service com.net.myspeechservice/.services.ManagementService
06-21 06:44:35.042: E/ActivityManager(88): Load: 3.13 / 2.78 / 2.26
06-21 06:44:35.042: E/ActivityManager(88): CPU usage from 10340ms to 0ms ago:
06-21 06:44:35.042: E/ActivityManager(88): 44% 178/com.android.phone: 43% user + 1.8% kernel / faults: 179 minor
06-21 06:44:35.042: E/ActivityManager(88): 25% 36/surfaceflinger: 21% user + 3.6% kernel
06-21 06:44:35.042: E/ActivityManager(88): 10% 38/mediaserver: 8.1% user + 2.6% kernel
06-21 06:44:35.042: E/ActivityManager(88): 5.1% 1496/android.process.acore: 2.8% user + 2.3% kernel / faults: 3984 minor
06-21 06:44:35.042: E/ActivityManager(88): 3.3% 150/com.android.systemui: 3.3% user + 0% kernel / faults: 6 minor
06-21 06:44:35.042: E/ActivityManager(88): 1.9% 45/adbd: 0.2% user + 1.6% kernel / faults: 420 minor
06-21 06:44:35.042: E/ActivityManager(88): 0.6% 88/system_server: 0.3% user + 0.2% kernel / faults: 1 minor
06-21 06:44:35.042: E/ActivityManager(88): 0% 6391/ekawas.blogspot.com: 0% user + 0% kernel / faults: 40 minor
06-21 06:44:35.042: E/ActivityManager(88): 0.1% 35/rild: 0% user + 0% kernel
06-21 06:44:35.042: E/ActivityManager(88): 100% TOTAL: 82% user + 17% kernel + 0.1% softirq
06-21 06:44:35.042: E/ActivityManager(88): CPU usage from 1521ms to 2139ms later:
06-21 06:44:35.042: E/ActivityManager(88): 41% 178/com.android.phone: 40% user + 1.6% kernel / faults: 1 minor
06-21 06:44:35.042: E/ActivityManager(88): 50% 178/m.android.phone: 48% user + 1.6% kernel
06-21 06:44:35.042: E/ActivityManager(88): 1.6% 235/RILReceiver: 1.6% user + 0% kernel
06-21 06:44:35.042: E/ActivityManager(88): 29% 36/surfaceflinger: 22% user + 6.4% kernel
06-21 06:44:35.042: E/ActivityManager(88): 22% 61/SurfaceFlinger: 19% user + 3.2% kernel
06-21 06:44:35.042: E/ActivityManager(88): 1.6% 36/surfaceflinger: 1.6% user + 0% kernel
06-21 06:44:35.042: E/ActivityManager(88): 1.6% 63/Binder Thread #: 1.6% user + 0% kernel
06-21 06:44:35.042: E/ActivityManager(88): 1.6% 109/Binder Thread #: 0% user + 1.6% kernel
06-21 06:44:35.042: E/ActivityManager(88): 1.6% 1283/Binder Thread #: 0% user + 1.6% kernel
06-21 06:44:35.042: E/ActivityManager(88): 16% 38/mediaserver: 11% user + 4.9% kernel
06-21 06:44:35.042: E/ActivityManager(88): 6.5% 1551/gle.mp3.decoder: 4.9% user + 1.6% kernel
06-21 06:44:35.042: E/ActivityManager(88): 3.2% 1553/AudioTrackThrea: 1.6% user + 1.6% kernel
06-21 06:44:35.042: E/ActivityManager(88): 1.6% 72/AudioOut_1: 0% user + 1.6% kernel
06-21 06:44:35.042: E/ActivityManager(88): 1.6% 1552/OMXCallbackDisp: 0% user + 1.6% kernel
06-21 06:44:35.042: E/ActivityManager(88): 9.6% 88/system_server: 4.8% user + 4.8% kernel
06-21 06:44:35.042: E/ActivityManager(88): 8% 103/ActivityManager: 4.8% user + 3.2% kernel
06-21 06:44:35.042: E/ActivityManager(88): 1.6% 1496/android.process.acore: 0% user + 1.6% kernel / faults: 196 minor
06-21 06:44:35.042: E/ActivityManager(88): 3.3% 1542/ApplicationsPro: 0% user + 3.3% kernel
06-21 06:44:35.042: E/ActivityManager(88): 100% TOTAL: 82% user + 17% kernel
答案 0 :(得分:0)
负载线显示了实时操作所有线程所需的CPU核心数量。即负载为1意味着您在此期间充分利用单个核心。负载为5意味着您需要五个内核才能实时运行,或者如果您有两个内核,则会使它们超载150%。
Load: X / Y / Z
加载显示为三个数字,以便在不同的时间范围内提供负载。通常给出1分钟,5分钟和15分钟。
虽然我无法开始查看日志的其余部分,但却不知道应用程序的软件包名称。虽然猜测它是ekawas.blogspot.com
(第二个快照中缺少),这表明来自您的应用程序的CPU负载不是问题。但这可能是一个记忆问题。