流浪喵喵 2023-06-01 14:34 采纳率: 0%
浏览 13

为什么logcat会出现报错

为什么logcat会出现报错


130|console:/ # logcat -c;logcat -G 100M;logcat >/data/1.txt &       
[1] 6787
console:/ # 
console:/ # logcat -g
main: ring buffer is 100 MiB (15 KiB consumed), max entry is 5120 B, max payload is 4068 B
system: ring buffer is 100 MiB (0 B consumed), max entry is 5120 B, max payload is 4068 B
crash: ring buffer is 100 MiB (0 B consumed), max entry is 5120 B, max payload is 4068 B
perf: ring buffer is 100 MiB (0 B consumed), max entry is 5120 B, max payload is 4068 B
kernel: ring buffer is 100 MiB (15 KiB consumed), max entry is 5120 B, max payload is 4068 B
console:/ # logcat: Unexpected EOF!

This means that either the device shut down, logd crashed, or this instance of logcat was unable to read log
messages as quickly as they were being produced.

If you have enabled significant logging, look into using the -G option to increase log buffer sizes.
^C
[1] + Done (1)             \logcat >/data/1.txt 
130|console:/ # ls -alt /data/1.txt                                            
-rw------- 1 root root 1052349 2023-05-29 04:26 /data/1.txt
console:/ # du -h /data/1.txt                                                  
1.0M    /data/1.txt
  • 写回答

3条回答 默认 最新

  • 希望代码都能跑 2023-06-01 14:44
    关注

    logcat报错的原因是无法读取日志消息的速度跟不上其生成的速度,有几个可能的原因:
    1、设备关闭或重启导致 logd 停止工作。
    2、logd 宕机。
    3、该 logcat 实例无法快速读取日志消息。
    如已经启用大量日志记录,尝试使用 -G 选项增加日志缓冲区大小。
    通过运行以下命令获取当前存储器概览:df -h。

    评论

报告相同问题?

问题事件

  • 创建了问题 6月1日