linux的abrt目录满了,linux:abrt-cli list

在linux调试程序,最痛苦的就是程序异常宕掉,但是找不到core文件,很难定位问题。但是有了core文件就容易定位多了。

一般是可以通过在环境变量中设置ulimit -c unlimited。但是现场实施人员有时会忘记设置这条命令。那么怎么办呢,可以通过设置linux的abrt服务来实现。

修改abrt-action-save-package-data.conf文件

将其修改为:vi /etc/abrt/abrt-action-save-package-data.conf

# With this option set to "yes",

# only crashes in signed packages will be analyzed.

# the list of public keys used to check the signature is

# in the file gpg_keys

#

OpenGPGCheck = no

# Blacklisted packages

#

BlackList = nspluginwrapper, valgrind, strace, mono-core

# Process crashes in executables which do not belong to any package?

#

ProcessUnpackaged = yes

# Blacklisted executable paths (shell patterns)

#

BlackListedPaths = /usr/share/doc/, /example*, /usr/bin/nspluginviewer, /usr/lib/xulrunner-*/plugin-container

还可以调整core文件的大小:[root@xx-host2 abrt]# cat abrt.conf

# Enable this if you want abrtd to auto-unpack crashdump tarballs which appear

# in this directory (for example, uploaded via ftp, scp etc).

# Note: you must ensure that whatever directory you specify here exists

# and is writable for abrtd. abrtd will not create it automatically.

#

#WatchCrashdumpArchiveDir = /var/spool/abrt-upload

# Max size for crash storage [MiB] or 0 for unlimited

#

MaxCrashReportsSize = 1000

# Specify where you want to store coredumps and all files which are needed for

# reporting. (default:/var/spool/abrt)

#

# Changing dump location could cause problems with SELinux. See man abrt_selinux(8).

#

#DumpLocation = /var/spool/abrt

# If you want to automatically clean the upload directory you have to tweak the

# selinux policy.

#

DeleteUploaded = no

重启 abrtd 服务: service abrtd restart

有了core文件也需要及时删除,通过abrt-cli list查看文件的包,然后用abrt-cli rm 【文件包】就可以了。

abrt-cli rm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值