![vmcore-dmesg: log_buf 기호 누락](https://linux55.com/image/202066/vmcore-dmesg%3A%20log_buf%20%EA%B8%B0%ED%98%B8%20%EB%88%84%EB%9D%BD.png)
kdump를 사용하여 vmcore 파일을 생성했으며 이제 이를 분석할 차례입니다.
첫 번째는 코어 덤프에서 dmesg 로그를 가져오는 것입니다. 이 작업은 다음을 수행해야 합니다.
vmcore-dmesg vmcore
그러나 오류가 발생하여 작동하지 않는 것 같습니다.
Missing the log_buf symbol
이 오류를 해결하는 방법을 아는 사람이 있나요?
어떤 도움이라도 대단히 감사하겠습니다.
답변1
dmesg 로그를 얻는 방법에는 두 가지가 있습니다.
- vmcore가 저장된 동일한 디렉터리에서 dmesg 로그를 찾을 수 있습니다.
- crash를 사용하여 vmcore에서 dmesg 로그를 덤프할 수 있습니다(충돌에는 커널의 디버그 기호가 필요함).
$ sudo crash /usr/lib/debug/boot/vmlinux-5.4.0-99-generic /var/crash/202202110944/dump.202202110944
crash 7.2.8
Copyright (C) 2002-2020 Red Hat, Inc.
Copyright (C) 2004, 2005, 2006, 2010 IBM Corporation
Copyright (C) 1999-2006 Hewlett-Packard Co
Copyright (C) 2005, 2006, 2011, 2012 Fujitsu Limited
Copyright (C) 2006, 2007 VA Linux Systems Japan K.K.
Copyright (C) 2005, 2011 NEC Corporation
Copyright (C) 1999, 2002, 2007 Silicon Graphics, Inc.
Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc.
This program is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions. Enter "help copying" to see the conditions.
This program has absolutely no warranty. Enter "help warranty" for details.
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu"...
WARNING: kernel relocated [688MB]: patching 115324 gdb minimal_symbol values
KERNEL: /usr/lib/debug/boot/vmlinux-5.4.0-99-generic
DUMPFILE: /var/crash/202202110944/dump.202202110944 [PARTIAL DUMP]
CPUS: 4
DATE: Fri Feb 11 09:43:56 2022
UPTIME: 00:05:50
LOAD AVERAGE: 0.08, 0.16, 0.10
TASKS: 566
NODENAME: user-virtual-machine
RELEASE: 5.4.0-99-generic
VERSION: #112-Ubuntu SMP Thu Feb 3 13:50:55 UTC 2022
MACHINE: x86_64 (2808 Mhz)
MEMORY: 8 GB
PANIC: "Kernel panic - not syncing: sysrq triggered crash"
PID: 0
COMMAND: "swapper/2"
TASK: ffff8f13f44a0000 (1 of 4) [THREAD_INFO: ffff8f13f44a0000]
CPU: 2
STATE: TASK_RUNNING (PANIC)
crash> dmesg
[ 0.000000] Linux version 5.4.0-99-generic (buildd@lgw01-amd64-007) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #112-Ubuntu SMP Thu Feb 3 13:50:55 UTC 2022 (Ubuntu 5.4.0-99.112-generic 5.4.162)
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-99-generic root=/dev/mapper/vgubuntu-root ro quiet splash crashkernel=4096M-:512M vt.handoff=7
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Hygon HygonGenuine
[ 0.000000] Centaur CentaurHauls
[ 0.000000] zhaoxin Shanghai
[ 0.000000] Disabled fast string operations
...