how to get all kernel crash info from last_kmsg

how to get all kernel crash info from last_kmsg?

when i analysis the kernel crash log, i found the last_kmsg (adb shell cat proc/last_kmsg) is incomplete, like this:

Code:
:/ $ cat proc/last_kmsg ram console header, hw_status: 2, fiq step 41. 955e1c d7955e00 c06b8d84 c042be34 c06b8e78 d6590d88 d6590c00 [ 1247.123224]5e0c c1ff0c40 d7955e3c d7955e20 c06b8e00 c06b8d50 c02ab2b4 c02aa9ac d6590d88 [ 1247.123279]5e2c dcc00c80 d7955e4c d7955e40 c06b8e8c c06b8df0 d7955f1c d7955e50 c0040f80 [ 1247.123336]<0>-(0)[1377:kworker/0:2] [ 1247.123336]<0>R7: 0xd6590b80: [ 1247.123349]0b80 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1247.123401]0ba0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1247.123454]0bc0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1247.123506]0be0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1247.123558]0c00 00000000 746b746d 746d7773 00000000 00000000 00000000 00000000 ddcbaa00 [ 1247.123612]0c20 dcc1e4c0 c4af8224 d6590424 df347280 df8ff340 c0d484b8 dcc1e580 00000002 [ 1247.123666]0c40 00000007 00000000 00000000 00000001 00000000 d6590c54 d6590c54 00000000 [ 1247.123719]0c60 00000000 00000000 00000000 00000000 00000000 00000020 00000000 c4af827c [ 1247.123775]<0>-(0)[1377:kworker/0:2] [ 1247.123775]<0>R8: 0xc0db6970: [ 1247.123788]6970 00000000 00000000 c0c97cb4 00000000 00000000 00000000 00000000 c0c97cc8 [ 1247.123841]6990 00000000 00000000 00000000 00000000 c0c97ce0 00000000 00000000 00000000 [ 1247.123894]69b0 00000000 c0c97cf0 00000000 00000000 00000000 00000000 c0c97d60 00000000 [ 1247.123947]69d0 00000000 00000000 00000000 c0c97d50 00000000 00000000 00000000 00000000 [ 1247.124000]69f0 c0c97da0 00000000 00000000 00000000 00000000 c0c97db8 00000000 00000000 [ 1247.124054]6a10 00000000 00000000 c0c97d88 00000000 00000000 00000000 00000000 c0c97d70 [ 1247.124106]6a30 00000000 00000000 00000000 00000000 c0c97dd0 00000000 00000000 00000000 [ 1247.124159]6a50 00000000 c0c980c8 00000001 00000000 00000000 df975548 c0c98090 00000000 [ 1247.124216]<0>-(0)[1377:kworker/0:2] [ 1247.124216]<0>R9: 0xc1ff2780: [ 1247.124228]2780 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1247.124280]27a0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1247.124333]27c0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1247.124385]27e0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1247.124438]2800 c1ff0c40 df812cc0 00000000 ffffffff 00000002 00000001 00000000 00000000 [ 1247.124491]2820 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1247.124543]2840 00000000 00000000 00000000 00000000 00000001 00000100 c1ff2858 c1ff2858 [ 1247.124597]2860 df812cc0 c1ffa860 c1ff2868 c1ff2868 ffffffe0 c1ff2874 c1ff2874 c00408fc [ 1247.124657]<0>-(0)[1377:kworker/0:2]Process kworker/0:2 (pid: 1377, stack limit = 0xd7954248) [ 1247.124672]<0>-(0)[1377:kworker/0:2]Stack: (0xd7955d80 to 0xd7956000) [ 1247.124692]<0>-(0)[1377:kworker/0:2]5d80: 00000000 d6590c00 d7955db4 d7955d98 c0431d00 c04e538c d6590c00 d6590c00 [ 1247.124711]<0>-(0)[1377:kworker/0:2]5da0: d7955e24 d7954010 d7955dfc d7955db8 c042be64 c0431cec d7955e4c c0b33cbe [ 1247.124729]<0>-(0)[1377:kworker/0:2]5dc0: d7955e24 d7955dd0 c02aab20 00000000 00000000 d6590c00 d6590d68 d7955e24 [ 1247.124748]<0>-(0)[1377:kworker/0:2]5de0: d7954010 c0db69f0 c1ff2800 00000000 d7955e1c d7955e00 c06b8d84 c042be34 [ 1247.124767]<0>-(0)[1377:kworker/0:2]5e00: c06b8e78 d6590d88 d6590c00 c1ff0c40 d7955e3c d7955e20 c06b8e00 c06b8d50 [ 1247.124785]<0>-(0)[1377:kworker/0:2]5e20: c02ab2b4 c02aa9ac d6590d88 dcc00c80 d7955e4c d7955e40 c06b8e8c c06b8df0 [ 1247.124804]<0>-(0)[1377:kworker/0:2]5e40: d7955f1c d7955e50 c0040f80 c06b8e84 c00c22f8 c02b297c 183606ab c1ff2800 [ 1247.124822]<0>-(0)[1377:kworker/0:2]5e60: 1cc7c67f 00000121 00000000 00000000 72656874 5f6c616d 656e6f7a 7665645f [ 1247.124841]<0>-(0)[1377:kworker/0:2]5e80: 5f656369 63656863 c0d0006b c0d27100 c0d27134 c0d04040 c00414f4 c092d5dc [ 1247.124860]<0>-(0)[1377:kworker/0:2]5ea0: 60000013 f0222000 d7955ec4 d7955eb8 c00081d0 c000faac d7955f1c d7955ec8 [ 1247.124878]<0>-(0)[1377:kworker/0:2]5ec0: c000ecf8 c00081cc c1ff0c40 00000001 dd9e5000 00002181 dcc00c80 c1ff0c54 [ 1247.124897]<0>-(0)[1377:kworker/0:2]5ee0: dcc00c98 dcc00c80 c1ff0c54 dcc00c98 d7954000 dcc00c80 c1ff0c54 dcc00c98 [ 1247.124916]<0>-(0)[1377:kworker/0:2]5f00: d7954000 d7954020 d7954000 c1ff0c40 d7955f5c d7955f20 c0041438 c0040e1c [ 1247.124934]<0>-(0)[1377:kworker/0:2]5f20: c092d5b0 df853e58 00000000 c0db6661 c00412fc df853e58 00000000 dcc00c80 [ 1247.124953]<0>-(0)[1377:kworker/0:2]5f40: c00412fc 00000000 00000000 00000000 d7955fac d7955f60 c0047b44 c0041308 [ 1247.124971]<0>-(0)[1377:kworker/0:2]5f60: c092d5e4 00000000 d7955f94 dcc00c80 00000000 00000000 d7955f78 d7955f78 [ 1247.124990]<0>-(0)[1377:kworker/0:2]5f80: 00000000 00000000 d7955f88 d7955f88 df853e58 c0047a88 00000000 00000000 [ 1247.125008]<0>-(0)[1377:kworker/0:2]5fa0: 00000000 d7955fb0 c000f2d8 c0047a94 00000000 00000000 00000000 00000000 [ 1247.125026]<0>-(0)[1377:kworker/0:2]5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 1247.125044]<0>-(0)[1377:kworker/0:2]5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 ff000000 ff000000 [ 1247.125054]Backtrace: ... ... [ 1247.125406]<0>-(0)[1377:kworker/0:2][<c00412fc>] (worker_thread+0x0/0x3f0) from [<c0047b44>] (kthread+0xbc/0xc0) [ 1247.125434]<0>-(0)[1377:kworker/0:2][<c0047a88>] (kthread+0x0/0xc0) from [<c000f2d8>] (ret_from_fork+0x14/0x3c) [ 1247.125445] r7:00000000 r6:00000000 r5:c0047a88 r4:df853e58 [ 1247.125486]<0>-(0)[1377:kworker/0:2]Code: bad PC value [ 1247.125504]<0>-(0)[1377:kworker/0:2]---[ end trace 912237b3a2fb65fb ]--- [ 1247.125519]<0>-(0)[1377:kworker/0:2]Kernel panic - not syncing: Fatal exception [ 1247.125572]<0>-(0)[1377:kworker/0:2]mrdump: cpu[0] tsk:dd9e5000 ti:d7954000 [ 1254.517417]<0>-(0)[1377:kworker/0:2] [ 1254.517417]<0> No log for WDT [ 1254.533700]<0>-(0)[1377:kworker/0:2]ipanic_data_to_sd: dump SYS_WQ_LOG failed[-3] [ 1254.533717]<0>-(0)[1377:kworker/0:2]ipanic_data_to_sd: dump SYS_MMPROFILE failed[-3] [ 1254.572077]Rebooting in 1 seconds..machine_shutdown: start, Proess(kworker/0:2:1377). father kthreadd:2. grandfather swapper/0:0. [ 1255.572166]<0>-(0)[1377:kworker/0:2]arch_reset: cmd = NULL [ 1255.572194]<0>-(0)[1377:kworker/0:2]wdt_arch_reset mode = [ 1255.572237]<0>-(0)[1377:kworker/0:2]wdt_arch_reset called MTK_WDT_MODE =5d [ 1255.572250]<0>-(0)[1377:kworker/0:2]wdt_arch_reset called end MTK_WDT_MODE =22000014 [ 1255.572363]<0>-(0)[1377:kworker/0:2]wdt_arch_reset: SW_reset happen [ 1255.572375]<0>-(0)[1377:kworker/0:2]****************dump wdt reg start************* [ 1255.572387]<0>-(0)[1377:kworker/0:2]MTK_WDT_MODE:0x14 [ 1255.572400]<0>-(0)[1377:kworker/0:2]MTK_WDT_LENGTH:0xf000 [ 1255.572412]<0>-(0)[1377:kworker/0:2]MTK_WDT_RESTART:0x0 [ 1255.572424]<0>-(0)[1377:kworker/0:2]MTK_WDT_STATUS:0x40000000

it lost most regs info, r0, r1... crash pc, lr ...
it's appear in arm32 except nexus

i find out some info, the phone manufacturers set the log file to 4kb, if the crash log is too long, it will overwrite old log.

Where can I get more information about last_kmsg file size?

how to change the crash log size and get all crash info from last_kmsg?

Show Accepted Answer

Guest Quick Reply (No URL, BBcode or HTML)

Last post by troy.lowe
1 hour ago
Last post by kuhn.michael
2 hours ago
Last post by zelma.gutmann
3 hours ago
Last post by bartoletti.abigayle
1 hour ago
Last post by roger05
2 hours ago
Last post by brionna26
1 hour ago
Last post by mnienow
1 hour ago
Last post by coralie49
45 minutes ago
Last post by streich.chris
3 hours ago
Last post by alice.larson
1 hour ago
Last post by ernser.bernard
2 hours ago