kdump+crash

参考:http://www.360doc.com/content/19/0205/08/36367108_813163495.shtml

           https://blog.csdn.net/u014361034/article/details/54916002

1.安装centos7虚拟机;

2. 执行:

   echo 1 > /proc/sys/kernel/sysrq

   echo c > /proc/sysrq-trigger

3.执行以上命令后, 重启进入系统/var/crash/目录

[root@localhost crash]# cd 127.0.0.1-2019-04-11-10\:11\:27/
[root@localhost 127.0.0.1-2019-04-11-10:11:27]# ls
vmcore vmcore-dmesg.txt

4.查看日志dmesg

[root@localhost 127.0.0.1-2019-04-11-10:11:27]# cat vmcore-dmesg.txt | tail -n 30
[ 246.681359] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 246.681367] IP: [<ffffffffa7261bf6>] sysrq_handle_crash+0x16/0x20
[ 246.681382] PGD 800000006b4a3067 PUD 75b38067 PMD 0
[ 246.681391] Oops: 0002 [#1] SMP
[ 246.681398] Modules linked in: tcp_lp rfcomm fuse xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 tun ip6t_rpfilter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_conntrack devlink ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter vmw_vsock_vmci_transport vsock bnep sunrpc ppdev coretemp iosf_mbi crc32_pclmul snd_seq_midi snd_seq_midi_event ghash_clmulni_intel vmw_balloon aesni_intel lrw gf128mul glue_helper ablk_helper cryptd joydev pcspkr btusb btrtl btbcm btintel bluetooth snd_ens1371 snd_rawmidi
[ 246.681491] snd_ac97_codec ac97_bus snd_seq snd_seq_device rfkill snd_pcm snd_timer snd soundcore sg parport_pc parport vmw_vmci i2c_piix4 ip_tables xfs libcrc32c sr_mod cdrom sd_mod crc_t10dif crct10dif_generic crct10dif_pclmul crct10dif_common crc32c_intel serio_raw ata_generic pata_acpi vmwgfx drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm ata_piix e1000 mptspi libata scsi_transport_spi mptscsih mptbase drm_panel_orientation_quirks floppy dm_mirror dm_region_hash dm_log dm_mod
[ 246.681603] CPU: 1 PID: 10034 Comm: bash Kdump: loaded Not tainted 3.10.0-957.el7.x86_64 #1
[ 246.681609] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/31/2013
[ 246.681615] task: ffff97487ebce180 ti: ffff97487ebac000 task.ti: ffff97487ebac000
[ 246.681620] RIP: 0010:[<ffffffffa7261bf6>] [<ffffffffa7261bf6>] sysrq_handle_crash+0x16/0x20
[ 246.681631] RSP: 0018:ffff97487ebafe58 EFLAGS: 00010246
[ 246.681636] RAX: ffffffffa7261be0 RBX: ffffffffa7ae4c60 RCX: 0000000000000000
[ 246.681641] RDX: 0000000000000000 RSI: ffff974900653898 RDI: 0000000000000063
[ 246.681645] RBP: ffff97487ebafe58 R08: ffffffffa7de38bc R09: 6873617263206120
[ 246.681650] R10: 0000000000000685 R11: 0000000000000684 R12: 0000000000000063
[ 246.681654] R13: 0000000000000000 R14: 0000000000000004 R15: 0000000000000000
[ 246.681661] FS: 00007f244d0f0740(0000) GS:ffff974900640000(0000) knlGS:0000000000000000
[ 246.681666] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 246.681670] CR2: 0000000000000000 CR3: 00000000889e8000 CR4: 00000000001607e0
[ 246.681760] Call Trace:
[ 246.681773] [<ffffffffa726241d>] __handle_sysrq+0x10d/0x170
[ 246.681782] [<ffffffffa7262888>] write_sysrq_trigger+0x28/0x40
[ 246.681792] [<ffffffffa70b7f30>] proc_reg_write+0x40/0x80
[ 246.681800] [<ffffffffa70410a0>] vfs_write+0xc0/0x1f0
[ 246.681807] [<ffffffffa7041ebf>] SyS_write+0x7f/0xf0
[ 246.681817] [<ffffffffa7574ddb>] system_call_fastpath+0x22/0x27
[ 246.681822] Code: eb 9b 45 01 f4 45 39 65 34 75 e5 4c 89 ef e8 e2 f7 ff ff eb db 0f 1f 44 00 00 55 48 89 e5 c7 05 21 57 7e 00 01 00 00 00 0f ae f8 <c6> 04 25 00 00 00 00 01 5d c3 0f 1f 44 00 00 55 31 c0 c7 05 9e
[ 246.681901] RIP [<ffffffffa7261bf6>] sysrq_handle_crash+0x16/0x20
[ 246.681908] RSP <ffff97487ebafe58>
[ 246.681912] CR2: 0000000000000000
[root@localhost 127.0.0.1-2019-04-11-10:11:27]#

猜你喜欢

转载自www.cnblogs.com/newjiang/p/10693172.html