August 2017 Archives

coredump的捕获

RHEL5系统

[cnangel@localhost ~]$sysctl kernel.core_pattern
kernel.core_pattern = core

此时文件在当前目录,文件名称以core.{pid}的形式存在

RHEL6系统

[cnangel@localhost ~]$sysctl kernel.core_pattern
kernel.core_pattern = |/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t e

此时文件在当前目录,文件名称也是以core.{pid}的形式存在

Fedora26系统

[cnangel@localhost ~]$sysctl kernel.core_pattern
kernel.core_pattern = |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %e

此时内核转储使用了systemd,需要coredumpctl命令查看

coredumpctl

列出所有的core信息

coredumpctl list {执行程序名称}

查看执行程序名称的所有core信息

coredumpctl -o core dump {PID}

直接下载该PID的core文件,名称为core,放入当前目录下。

Archives

Pages

Powered by Movable Type 7.0.4

April 2019

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        

Recent Entries

Creative Commons License
This blog is licensed under a Creative Commons License.

About this Archive

This page is an archive of entries from August 2017 listed from newest to oldest.

July 2017 is the previous archive.

November 2017 is the next archive.

Find recent content on the main index or look in the archives to find all content.