(2) As you mentionend you have the system time of the RESET event. I don't know what are the exact triggers within the Android system to reset the batterystats, probably when the battery is fully charged. You can manually reset the timestamp with then batterystats reset command. (1) The timestamps in the batterystats output start from the last reset of the batterystats tool. The batterystats tool collects the events based on a timestamp starting from 0 at the mentioned RESET event. So with the amount of time a hardware component resides in a certain state times the power value, the actual energy consumption is calculated.Įach time a state change is triggered, an event is recorded in the batterystats tool. For each hardware component, there is a power value for each state of the component provided by the manufacturer. The energy consumption by Android devices is estimated based on the amount of time certain hardware components are residing in different states (e.g., WIFI ON, WIFI OFF, etc.). In order to understand whats going on the full log or dump is crucially needed. However there is more going on since it reads line by line meaning one line is not the complete story. The time value starts at boot to current breaking the time down to.įirst the time since thw device was bopted and reads like: +21h44m19s484ms wake_lock=1000 screen screenwake=1000Ĥ: Number of allocations wake_lock=1000, screen screenwake=1000 The data unit is a number taken from the following list:ĭefault value for data of type int/long is 2 (bytes).ģ: Number of milliseconds. This is a partial answer that needs more details through the full dump to understand whats the and read the output of what the system is trying to convey. If there is any other way to do that besides batterystats, please leave a comment.) (My goal is to track when exactly the screen (and optionally WiFi) was on and when it was off. Is there a way to change it to "normal" timestamps?.How does one read those timestamps? They seem beyond broken.Why does dumpsys batterystats not use normal timestamps?.It is now (well, it was when this happened) -00-16-00. Here is the entry in the log for that: +21h44m19s484ms (4) 057 +wake_lock=1000:"PhoneWindowManager.mPowerKeyWakeLock" +screen screenwake=1000:"android.policy:POWER" Gives me (among other things of course) this: 0 (9) RESET:TIME: -01-37-39 Let me just show a real-life example: adb shell dumpsys batterystats "RESET" times mostly appear just once at the beginning, sometimes however they appear multiple times within the log, sometimes even skipping hours, seemingly at random.Īnd as if that isn't bad enough. Instead, it gives you a "RESET TIME" within the file, and the lines after that show how much time has passed since that time. Shows info from /proc/stat and /proc/(pid)/statįrom ProcessCpuTracker.java collectStats(.Why on earth does the adb shell dumpsys batterystats command not print regular timestamps? (Like usagestats does for example, or literally anything else on the planet.) CPU usage from 23770ms to 16630ms ago: what does this mean ? does it mean that these values are the average from last 23 to 16 seconds ?.are these percentage values averages of the respective processes such as as 58% for logd?.what does these percentage values represent because they don't add up to 100 ?.I'm looking at the out of the following command "adb shell dumpsys cpuinfo" where I want to know if these reported values are averages over previous time ? D:\Android_Dev\Android_sdk\platform-tools>adb shell dumpsys cpuinfoĥ8% 1844/logd: 58% user + 0% kernel / faults: 3 minorĥ0% 3895/.app:ui: 41% user + 9.3% kernel / faults: 1798 minorĢ6% 1864/adbd: 2.8% user + 23% kernel / faults: 1243 minorĩ.7% 7834/kworker/0:2: 0% user + 9.7% kernelĤ.9% 2198/system_server: 2.6% user + 2.2% kernel / faults: 76 minor
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |