Parsing vmcores using the crash Tool
To parse vmcores using the crash tool provided by Euler linux, perform the following steps:
- Find the crash installation package vmcore_debug_tool.tar.gz from the Software\02.Tools\DebugTools\ directory of VMP installation package.
- Decompress vmcore_debug_tool.tar.gz to any directory on EulerOS 2.1. Copy the vmcores saved by kdump to that directory.
- In that directory, run the following command to parse vmcores:
./crash vmlinux-3.4.24.15-0.11-default vmlinux-3.4.24.15-0.11-default.debug vmcore
The parsed vmcores contains information about the kernel, CPU, memory, panic, and so on.
KERNEL: vmlinux-3.4.24.15-0.11-default DEBUGINFO: vmlinux-3.4.24.15-0.11-default.debug DUMPFILE: vmcore CPUS: 4 DATE: Mon Nov 24 15:35:44 2014 UPTIME: 854015929139 days, 18:47:25 LOAD AVERAGE: 5.99, 6.00, 6.04 TASKS: 108 NODENAME: Storage RELEASE: 3.4.24.15-0.11-default VERSION: #1 SMP Tue Nov 12 06:28:53 UTC 2013 (0c85715) MACHINE: x86_64 (1800 Mhz) MEMORY: 4 GB PANIC: "" PID: 60724 COMMAND: "exhaustmem" TASK: ffff8800593cc500 [THREAD_INFO: ffff880062046000] CPU: 1 STATE: TASK_RUNNING (PANIC) crash>
To list the commands supported by the crash tool, run the help command. The following is an example output of the help command:
crash> help * files mach repeat timer ascii fuser mount search vm bt gdb net set vtop btop help p sig waitq dev ipcs ps struct whatisdis irq pte swap wr eval kmem ptob sym q exit list ptov sys extend log rd task
The log command does not work if logs in the cyclic buffer are redirected to the nonvolatile random access memory (NVRAM). Information about memory segments allocated to NVRAM cannot be saved into vmcores.
The description of each command can be viewed by running the man xxx or help xxx command. For example,
crash> man bt NAME bt - backtrace SYNOPSIS bt [-a|-g|-r|-t|-T|-l|-e|-E|-f|-F|-o|-O] [-R ref] [-I ip] [-S sp] [pid | task] DESCRIPTION Display a kernel stack backtrace. If no arguments are given, the stack trace of the current context will be displayed. -a displays the stack traces of the active task on each CPU. (only applicable to crash dumps) -g displays the stack traces of all threads in the thread group of the target task; the thread group leader will be displayed first. -r display raw stack data, consisting of a memory dump of the two pages of memory containing the task_union structure. ……