[skill][gdb][coredump][abrt] 使用abrt管理程序coredump

abrt:Automatic bug detection and reporting tool

https://github.com/abrt/abrt

常用的命令:

abrt-auto-reporting

abrt-cli

配置文件:

/etc/abrt/abrt.conf

/etc/abrt/abrt-action-save-package-data.conf

一般来讲,abrt直接就能用,直接就能查看coredump信息。

但是,当处理我们自己写的程序时,仍然不能用。

关系到下面的两个配置

abrt.conf: MaxCrashReportsSize = 1000

关系到crash信息文件的大小,最大的就是coredump,coredump太大可能就不会存,或者存的少? 

反正,把它设成0,就相当与 ulimit -c unlimited

abrt-action-save-package-data.conf: ProcessUnpackaged = yes

我们自己写的可执行程序,一般就是拷过去的,不从属于任何的package(rpm?),所有abrt不生效,可以见到如下log信息:

Dec 12 09:26:19 T185 abrt-server: Executable '/anthropoid/bin/msg_unpack.py' doesn't belong to any package and ProcessUnpackaged is set to 'no'

可以将这个选项设置成 yes。

这样的话,就可以在程序coredump的时候,使用abrt找到coredump文件了。而并不用修改ulimit参数

[root@T185 ~]# abrt-cli ls
id 821a267b8fe28bdbb8b8aa546838f630ff42270a
reason:         chimpanzee killed by SIGSEGV
time:           Fri 15 Dec 2017 11:44:53 AM CST
cmdline:        chimpanzee
uid:            0 (root)
count:          1
Directory:      /var/spool/abrt/ccpp-2017-12-15-11:44:53-11380

The Autoreporting feature is disabled. Please consider enabling it by issuing
'abrt-auto-reporting enabled' as a user with root privileges
[root@T185 ~]# 
原文地址:https://www.cnblogs.com/hugetong/p/8042653.html