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,放入当前目录下。

Monthly Archives

Pages

Powered by Movable Type 7.7.2

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.