同时考虑logcat的和内核日志 [英] Taking logcat and kernel logs simultaneously

查看:1512
本文介绍了同时考虑logcat的和内核日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图通过采取以下命令日志(logcat的和kmsg)

I am trying to take logs (logcat and kmsg) via the following command

的logcat -v时间-f的/ dev / kmsg |执行cat / proc /

"logcat -v time -f /dev/kmsg | cat /proc/"

不过我不知道,这里的日志文件存储,什么将是它的名字。
如何识别它

However I am not sure, where the log file is stored, and what will be its name. How do I identify it

推荐答案

OK,这里有一个快速谷歌搜索的结果:

OK, here are the results of a quick Google search:

  • Android Logging System
  • How to get kernel messages from Android?

我从那些链接了什么是:

What I got from those links are:


  1. 您的命令的最后一部分,实际上应该是执行cat / proc / kmsg

  2. 的logcat -v时间-f的/ dev / kmsg 写的logcat输出到内核消息缓冲区

  1. The last part of your command should actually be cat /proc/kmsg
  2. logcat -v time -f /dev/kmsg writes logcat outputs to kernel message buffer

因此​​,

logcat -v time -f /dev/kmsg | cat /proc/kmsg

将输出都logcat的和内核日志标准输出(不管它是什么)。也许,你可以如下输出写入到文件中:

will output both logcat and kernel logs to stdout (whatever it is). Probably, you may write the output to a file as follows:

logcat -v time -f /dev/kmsg | cat /proc/kmsg > /sdcard/log.txt

以上摘自亚行外壳提示符下一个根深蒂固的Andr​​oid 4.4.2设备上。

The above worked from adb shell prompt on a rooted Android 4.4.2 device.

希望这有助于。

这篇关于同时考虑logcat的和内核日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆