How Does ADB Logcat Timestamping Work
Asked Answered
J

2

21

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?

Jameson answered 21/10, 2011 at 4:39 Comment(3)
The timestamps are when the event occurred.Piker
In this 10-20 19:32:28.428, what does the "428" stand for? Time in milliseconds?Brewton
Indeed, after the last dot, milliseconds are shown.Pournaras
P
1

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.

Pius answered 27/2, 2016 at 15:51 Comment(0)
P
0

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.

Poult answered 15/6, 2012 at 20:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.