Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1747313
  • 博文数量: 297
  • 博客积分: 285
  • 博客等级: 二等列兵
  • 技术积分: 3006
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-06 22:04
个人简介

Linuxer, ex IBMer. GNU https://hmchzb19.github.io/

文章分类

全部博文(297)

文章存档

2020年(11)

2019年(15)

2018年(43)

2017年(79)

2016年(79)

2015年(58)

2014年(1)

2013年(8)

2012年(3)

分类: LINUX

2015-09-29 12:18:48

abrt是个什么东西:
The Automatic Bug Reporting Tool, commonly abbreviated as ABRT, is a set of tools that is designed to help users detect and report application crashes.

installing the ABRT packages overwrites the /proc/sys/kernel/core_pattern 
例如我本机rhel 7上就是这样

点击(此处)折叠或打开

  1. cat /proc/sys/kernel/core_pattern
  2. |/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t e
其含义为:
abrt-ccpp service overwrites the core_pattern file to contain the following command
pipe the core dump to the abrt-hook-ccpp program, which stores it in ABRT's dump location and notifies the abrtd daemon of the new crash

所以其实这个ABRT 包含了很多语言的插件,下表来自于Rhel 7的官方文档。
Langauge/Project Package
C or C++ abrt-addon-ccpp
Python abrt-addon-python
Ruby rubygem-abrt
Java abrt-java-connector
X.Org abrt-addon-xorg
Linux (kernel oops) abrt-addon-kerneloops
Linux (kernel panic) abrt-addon-vmcore
Linux (persistent storage) abrt-addon-pstoreoops
那么如何来安装abrt呢?

点击(此处)折叠或打开

  1. yum install abrt-cli        #Installing ABRT for the Command Line
  2. yum install abrt-desktop    #Installing the ABRT GUI
  3. yum install libreport-plugin-mailx        #Installing Supplementary ABRT Tools
也可以为别的语言安装package

点击(此处)折叠或打开

  1. yum install abrt-java-connector
启动服务

点击(此处)折叠或打开

  1. systemctl is-active abrtd.service
  2. systemctl start abrtd
如果你看到了如下的notification.

点击(此处)折叠或打开

  1. ABRT has detected 1 problem(s). For more info run: abrt-cli list --since xxxxxxxx
就可以使用abrt-cli 来query 这些问题. 如下命令很简单,不再解释。更多的内容可以man 一下,abrt-cli 的manual 很短。

点击(此处)折叠或打开

  1. abrt-cli list
  2. abrt-cli info [-d] directory_or_id         
  3. abrt-cli report directory_or_id
  4. abrt-cli rm directory_or_id 
END:
中间看文档的时候发现一个问题:
kill -s SEGV $PID
kill 传递了SEGV这个信号,kill -l 可以找到这个信号,11) SIGSEGV,意思是process try to access illegal memory.

参考资料:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-abrt-handling-problems.html
(官方文档)







阅读(9942) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~