ADB Logcat 时间戳如何工作
我试图弄清楚我的 AirPad 上何时发生事件,因此我发出 logcat 命令:
adb logcat -v time -d -b radio -b events -b main -b system -b radio
然而,在查看时间戳时,每个缓冲区的第一个时间戳似乎是在其之前的缓冲区的最后一个时间戳之后立即开始的。
--------- beginning of /dev/log/radio
10-20 19:30:37.878 D/RILD ( 53): Do not switch user to radio
...
10-20 19:30:37.998 D/RIL ( 53): Wait device...
--------- beginning of /dev/log/events
10-20 19:30:39.608 I/boot_progress_start( 54): 9398
...
10-20 19:31:13.998 D/RIL ( 53): Wait device...
--------- beginning of /dev/log/system
10-20 19:31:15.008 D/ConnectivityService( 99): tearing down Mobile networks due to setting
...
10-20 19:32:28.418 V/ActivityManager( 99): Launching: HistoryRecord{408d6a00 com.amazon.kindle/com.amazon.kcp.reader.BookReaderActivity} icicle=null with results=null newIntents=null andResume=true
--------- beginning of /dev/log/main
10-20 19:32:28.428 D/VPU ( 55): VPU: vpu_power_on 01`
所以我的问题是,时间戳代表什么——它们代表事件发生的时间吗?如果是这样,他们为什么要这样锻炼?
I'm trying to figure out when events happen on my AirPad so I'm issuing the logcat command:
adb logcat -v time -d -b radio -b events -b main -b system -b radio
In looking at the timestamps, however, each buffer's first timestamp seems to start immediately after the last time stamp of the buffer before it.
--------- beginning of /dev/log/radio
10-20 19:30:37.878 D/RILD ( 53): Do not switch user to radio
...
10-20 19:30:37.998 D/RIL ( 53): Wait device...
--------- beginning of /dev/log/events
10-20 19:30:39.608 I/boot_progress_start( 54): 9398
...
10-20 19:31:13.998 D/RIL ( 53): Wait device...
--------- beginning of /dev/log/system
10-20 19:31:15.008 D/ConnectivityService( 99): tearing down Mobile networks due to setting
...
10-20 19:32:28.418 V/ActivityManager( 99): Launching: HistoryRecord{408d6a00 com.amazon.kindle/com.amazon.kcp.reader.BookReaderActivity} icicle=null with results=null newIntents=null andResume=true
--------- beginning of /dev/log/main
10-20 19:32:28.428 D/VPU ( 55): VPU: vpu_power_on 01`
So my question is, what do the timestamps represent - do they represent the time when the event occurred? If so, why are they working out this way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
时间戳是正确的。
当指定多个缓冲区时,logcat 将它们全部交织在一起,并按时间顺序打印所有内容。 “beginning of..”行仅指示每个缓冲区的第一条消息所在的位置;它们不是文件分隔符。
The timestamps are correct.
When specifying multiple buffers, logcat intertwines them all, and prints everything ordered by time. The "beginning of.." lines just indicate where each buffer's first message is; they're not file separators.
时间戳代表事件发生的时间。
logcat 并不真正支持指定多个缓冲区。看起来确实如此,但如果您省略“-d”,它将继续仅显示一个缓冲区。
时间戳看起来不寻常,因为 adb logcat 首先显示(环)缓冲条目。您可以通过“-g”查看缓冲区大小。在我的手机上是 256kb。
The timestamps represent the time of the event.
logcat does not really support specifying more than one buffer. It looks like it does but if you omit the "-d" it will continue to show only one buffer.
The timestamps seem unusual because adb logcat first shows the (ring) buffered entries. You can see the buffer size via "-g". On my phone its 256kb.