printk messages using logcat

3,085 views
Skip to first unread message

Machiry Aravind Kumar

unread,
Jun 21, 2012, 10:10:20 AM6/21/12
to android...@googlegroups.com
hi,

is there any way by which we can make logcat read from kernel buffers?

though there is link in the android site:


its defunct.

any details on this would be really helpful.

Thanks,
Machiry

Pavan Savoy

unread,
Jun 27, 2012, 1:15:19 PM6/27/12
to android...@googlegroups.com
May be you can Introduce a new option in logcat - to call dmesg_main ?
> --
> unsubscribe: android-kerne...@googlegroups.com
> website: http://groups.google.com/group/android-kernel



--
--Pavan Savoy

Alexander Ray

unread,
Jun 27, 2012, 4:25:16 PM6/27/12
to android...@googlegroups.com
Do you just need the kernel buffers, or do you need it interleaved with logcat?  There are other ways to access the kernel buffers (simplest being through the shell)


--

Seok-gi Hong

unread,
Jun 28, 2012, 2:35:00 AM6/28/12
to android...@googlegroups.com
you means the shell is 'adb shell' ?

let me know the other way to access the kernel buffers through the shell

As I know, To access kernel buffer on log_system like below must used to T32
 DEFINE_LOGGER_DEVICE(log_main, LOGGER_LOG_MAIN, 256*1024)                             
 DEFINE_LOGGER_DEVICE(log_events, LOGGER_LOG_EVENTS, 256*1024)
 DEFINE_LOGGER_DEVICE(log_radio, LOGGER_LOG_RADIO, 256*1024)
 DEFINE_LOGGER_DEVICE(log_system, LOGGER_LOG_SYSTEM, 256*1024)

kernel/drivers/staging/android/logger.c file included above all.

thanks.


On Thursday, June 28, 2012 5:25:16 AM UTC+9, Alexander Ray wrote:
Do you just need the kernel buffers, or do you need it interleaved with logcat?  There are other ways to access the kernel buffers (simplest being through the shell)
On Thu, Jun 21, 2012 at 7:10 AM, Machiry Aravind Kumar <mak...@gmail.com> wrote:
hi,

is there any way by which we can make logcat read from kernel buffers?

though there is link in the android site:


its defunct.

any details on this would be really helpful.

Thanks,
Machiry

On Thursday, June 28, 2012 5:25:16 AM UTC+9, Alexander Ray wrote:
Do you just need the kernel buffers, or do you need it interleaved with logcat?  There are other ways to access the kernel buffers (simplest being through the shell)
On Thu, Jun 21, 2012 at 7:10 AM, Machiry Aravind Kumar <mak...@gmail.com> wrote:
hi,

is there any way by which we can make logcat read from kernel buffers?

though there is link in the android site:


its defunct.

any details on this would be really helpful.

Thanks,
Machiry

On Thursday, June 28, 2012 5:25:16 AM UTC+9, Alexander Ray wrote:
Do you just need the kernel buffers, or do you need it interleaved with logcat?  There are other ways to access the kernel buffers (simplest being through the shell)
On Thu, Jun 21, 2012 at 7:10 AM, Machiry Aravind Kumar <mak...@gmail.com> wrote:
hi,

is there any way by which we can make logcat read from kernel buffers?

though there is link in the android site:


its defunct.

any details on this would be really helpful.

Thanks,
Machiry

On Thursday, June 28, 2012 5:25:16 AM UTC+9, Alexander Ray wrote:
Do you just need the kernel buffers, or do you need it interleaved with logcat?  There are other ways to access the kernel buffers (simplest being through the shell)
On Thu, Jun 21, 2012 at 7:10 AM, Machiry Aravind Kumar <mak...@gmail.com> wrote:
hi,

is there any way by which we can make logcat read from kernel buffers?

though there is link in the android site:


its defunct.

any details on this would be really helpful.

Thanks,
Machiry

Tim Bird

unread,
Jun 28, 2012, 1:56:07 PM6/28/12
to android...@googlegroups.com
On 06/27/2012 11:35 PM, Seok-gi Hong wrote:
> you means the shell is 'adb shell' ?
>
> let me know the other way to access the kernel buffers through the shell

I think some clarification is in order. When one says they want to
access the kernel log buffer, they usually mean the one that the kernel
prints it's debug and status messages into, which is not the same as
the 4 buffers that are used to hold Android log messages (although the
buffers for these Android messages are also in the kernel.)

If this is not clear, take a look at: http://elinux.org/Android_Logging_System

So, yes, to access the kernel log messages (NOT the Android messages), use
'adb shell', then type 'dmesg' at the command prompt.

To access the Android log messages (which are stored in the kernel, but do
not hold kernel messages), use 'adb logcat'.

There is currently no way to reliably interleave these messages, as they
use a different clock for their timestamps (one of which changes mid-boot).

> As I know, To access kernel buffer on log_system like below must used to T32
> DEFINE_LOGGER_DEVICE(log_main, LOGGER_LOG_MAIN, 256*1024)
> DEFINE_LOGGER_DEVICE(log_events, LOGGER_LOG_EVENTS, 256*1024)
> DEFINE_LOGGER_DEVICE(log_radio, LOGGER_LOG_RADIO, 256*1024)
> DEFINE_LOGGER_DEVICE(log_system, LOGGER_LOG_SYSTEM, 256*1024)
>
> kernel/drivers/staging/android/logger.c file included above all.
>
> thanks.
>
>
> On Thursday, June 28, 2012 5:25:16 AM UTC+9, Alexander Ray wrote:
>
> Do you just need the kernel buffers, or do you need it interleaved with logcat? There are other ways to access the kernel buffers (simplest being through the shell)
>
>
> On Thu, Jun 21, 2012 at 7:10 AM, Machiry Aravind Kumar <mak...@gmail.com <mailto:mak...@gmail.com>> wrote:
>
> hi,
>
> is there any way by which we can make logcat read from kernel buffers?
>
> though there is link in the android site:
>
> http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers <http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers>
>
> its defunct.
>
> any details on this would be really helpful.
>
> Thanks,
> Machiry
>
> --
> unsubscribe: android-kerne...@googlegroups.com <mailto:android-kernel%2Bunsu...@googlegroups.com>
> website: http://groups.google.com/group/android-kernel <http://groups.google.com/group/android-kernel>
>
>
>
> On Thursday, June 28, 2012 5:25:16 AM UTC+9, Alexander Ray wrote:
>
> Do you just need the kernel buffers, or do you need it interleaved with logcat? There are other ways to access the kernel buffers (simplest being through the shell)
>
>
> On Thu, Jun 21, 2012 at 7:10 AM, Machiry Aravind Kumar <mak...@gmail.com <mailto:mak...@gmail.com>> wrote:
>
> hi,
>
> is there any way by which we can make logcat read from kernel buffers?
>
> though there is link in the android site:
>
> http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers <http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers>
>
> its defunct.
>
> any details on this would be really helpful.
>
> Thanks,
> Machiry
>
> --
> unsubscribe: android-kerne...@googlegroups.com <mailto:android-kernel%2Bunsu...@googlegroups.com>
> website: http://groups.google.com/group/android-kernel <http://groups.google.com/group/android-kernel>
>
>
>
> On Thursday, June 28, 2012 5:25:16 AM UTC+9, Alexander Ray wrote:
>
> Do you just need the kernel buffers, or do you need it interleaved with logcat? There are other ways to access the kernel buffers (simplest being through the shell)
>
>
> On Thu, Jun 21, 2012 at 7:10 AM, Machiry Aravind Kumar <mak...@gmail.com <mailto:mak...@gmail.com>> wrote:
>
> hi,
>
> is there any way by which we can make logcat read from kernel buffers?
>
> though there is link in the android site:
>
> http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers <http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers>
>
> its defunct.
>
> any details on this would be really helpful.
>
> Thanks,
> Machiry
>
> --
> unsubscribe: android-kerne...@googlegroups.com <mailto:android-kernel%2Bunsu...@googlegroups.com>
> website: http://groups.google.com/group/android-kernel <http://groups.google.com/group/android-kernel>
>
>
>
> On Thursday, June 28, 2012 5:25:16 AM UTC+9, Alexander Ray wrote:
>
> Do you just need the kernel buffers, or do you need it interleaved with logcat? There are other ways to access the kernel buffers (simplest being through the shell)
>
>
> On Thu, Jun 21, 2012 at 7:10 AM, Machiry Aravind Kumar <mak...@gmail.com <mailto:mak...@gmail.com>> wrote:
>
> hi,
>
> is there any way by which we can make logcat read from kernel buffers?
>
> though there is link in the android site:
>
> http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers <http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers>
>
> its defunct.
>
> any details on this would be really helpful.
>
> Thanks,
> Machiry
>
> --
> unsubscribe: android-kerne...@googlegroups.com <mailto:android-kernel%2Bunsu...@googlegroups.com>
> website: http://groups.google.com/group/android-kernel <http://groups.google.com/group/android-kernel>
--
=============================
Tim Bird
Architecture Group Chair, CE Workgroup of the Linux Foundation
Senior Staff Engineer, Sony Network Entertainment
=============================



Seok-gi Hong

unread,
Jun 29, 2012, 12:43:58 AM6/29/12
to android...@googlegroups.com
I got it, thanks for your comment, it's vary helpful to me.

additional, As you know, `cat /proc/kmsg` command, it vary useful to continuously show kernel message.

thanks
>         website: http://groups.google.com/group/android-kernel <http://groups.google.com/group/android-kernel>
>
>
>
> On Thursday, June 28, 2012 5:25:16 AM UTC+9, Alexander Ray wrote:
>
>     Do you just need the kernel buffers, or do you need it interleaved with logcat?  There are other ways to access the kernel buffers (simplest being through the shell)
>
>
>     On Thu, Jun 21, 2012 at 7:10 AM, Machiry Aravind Kumar <mak...@gmail.com <mailto:mak...@gmail.com>> wrote:
>
>         hi,
>
>         is there any way by which we can make logcat read from kernel buffers?
>
>         though there is link in the android site:
>
>         http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers <http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers>
>
>         its defunct.
>
>         any details on this would be really helpful.
>
>         Thanks,
>         Machiry
>
>         --
>         website: http://groups.google.com/group/android-kernel <http://groups.google.com/group/android-kernel>
>
>
>
> On Thursday, June 28, 2012 5:25:16 AM UTC+9, Alexander Ray wrote:
>
>     Do you just need the kernel buffers, or do you need it interleaved with logcat?  There are other ways to access the kernel buffers (simplest being through the shell)
>
>
>     On Thu, Jun 21, 2012 at 7:10 AM, Machiry Aravind Kumar <mak...@gmail.com <mailto:mak...@gmail.com>> wrote:
>
>         hi,
>
>         is there any way by which we can make logcat read from kernel buffers?
>
>         though there is link in the android site:
>
>         http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers <http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers>
>
>         its defunct.
>
>         any details on this would be really helpful.
>
>         Thanks,
>         Machiry
>
>         --
>         website: http://groups.google.com/group/android-kernel <http://groups.google.com/group/android-kernel>
>
>
>
> On Thursday, June 28, 2012 5:25:16 AM UTC+9, Alexander Ray wrote:
>
>     Do you just need the kernel buffers, or do you need it interleaved with logcat?  There are other ways to access the kernel buffers (simplest being through the shell)
>
>
>     On Thu, Jun 21, 2012 at 7:10 AM, Machiry Aravind Kumar <mak...@gmail.com <mailto:mak...@gmail.com>> wrote:
>
>         hi,
>
>         is there any way by which we can make logcat read from kernel buffers?
>
>         though there is link in the android site:
>
>         http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers <http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers>
>
>         its defunct.
>
>         any details on this would be really helpful.
>
>         Thanks,
>         Machiry
>
>         --

Machiry

unread,
Jun 29, 2012, 2:27:58 AM6/29/12
to android...@googlegroups.com

i was looking for continuous stream of kernel log messages.
cat /proc/kmsg is one way of getting (source : Thomas Cannon)

>         website: http://groups.google.com/group/android-kernel <http://groups.google.com/group/android-kernel>
>
>
>
> On Thursday, June 28, 2012 5:25:16 AM UTC+9, Alexander Ray wrote:
>
>     Do you just need the kernel buffers, or do you need it interleaved with logcat?  There are other ways to access the kernel buffers (simplest being through the shell)
>
>
>     On Thu, Jun 21, 2012 at 7:10 AM, Machiry Aravind Kumar <mak...@gmail.com <mailto:mak...@gmail.com>> wrote:
>
>         hi,
>
>         is there any way by which we can make logcat read from kernel buffers?
>
>         though there is link in the android site:
>
>         http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers <http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers>
>
>         its defunct.
>
>         any details on this would be really helpful.
>
>         Thanks,
>         Machiry
>
>         --
>         website: http://groups.google.com/group/android-kernel <http://groups.google.com/group/android-kernel>
>
>
>
> On Thursday, June 28, 2012 5:25:16 AM UTC+9, Alexander Ray wrote:
>
>     Do you just need the kernel buffers, or do you need it interleaved with logcat?  There are other ways to access the kernel buffers (simplest being through the shell)
>
>
>     On Thu, Jun 21, 2012 at 7:10 AM, Machiry Aravind Kumar <mak...@gmail.com <mailto:mak...@gmail.com>> wrote:
>
>         hi,
>
>         is there any way by which we can make logcat read from kernel buffers?
>
>         though there is link in the android site:
>
>         http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers <http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers>
>
>         its defunct.
>
>         any details on this would be really helpful.
>
>         Thanks,
>         Machiry
>
>         --
>         website: http://groups.google.com/group/android-kernel <http://groups.google.com/group/android-kernel>
>
>
>
> On Thursday, June 28, 2012 5:25:16 AM UTC+9, Alexander Ray wrote:
>
>     Do you just need the kernel buffers, or do you need it interleaved with logcat?  There are other ways to access the kernel buffers (simplest being through the shell)
>
>
>     On Thu, Jun 21, 2012 at 7:10 AM, Machiry Aravind Kumar <mak...@gmail.com <mailto:mak...@gmail.com>> wrote:
>
>         hi,
>
>         is there any way by which we can make logcat read from kernel buffers?
>
>         though there is link in the android site:
>
>         http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers <http://developer.android.com/guide/developing/tools/logcat.html#alternativebuffers>
>
>         its defunct.
>
>         any details on this would be really helpful.
>
>         Thanks,
>         Machiry
>
>         --
Reply all
Reply to author
Forward
0 new messages