内存故障分析之MCElog

作为一个企业服务器管理员,面对服务器莫名宕机或者主动重启,历经折磨后判断为内存问题引起,可当看到内存多达几十条时,难道要单条测试?要真这样,估计领导也要废了你吧。有没方便有效的方法去速度定位那个DIMM槽内存或者在日常监测内存正常与否呢?下面介绍下linux系统下的监控方法--MCElog。    

What are Machine Check Exceptions (or MCE)?


A machine check exception is an error dedected by your system's processor. There are 2 major types of MCE errors, a notice or warning error, and a fatal execption. The warning will be logged by a "Machine Check Event logged" notice in your system logs, and can be later viewed via some Linux utilities. A fatal MCE will cause the machine to stop responding and the details of the MCE will be printed out to the system's console.



What causes MCE errors?


There most common reason for MCE events to occur are:



1.Memory errors or Error Correction Code (ECC) problems


2.Inadequate cooling / processor over-heating


3.System bus errors


4.Cache errors in the processor or hardware


##一般来说当有错误提示时,需要优先注意内存问题,但由于现在内存控制器是集成在cpu里,所以有个别情况是由CPU问题引起的##


Install mcelog-1.0_pre3_p20120918.tar.gz


Download from http://download.chinaunix.net/download/0007000/6605.shtml

Mcelog安装

#tar -zxvf mcelog-1.0_pre3_p20120918.tar.gz    解压出来

#cd  andikleen-mcelog-0f5d023                  进入解压出来的文件夹

#make

#make install                                  编译和安装


或者直接yum install mcelog

Mcelog相关文件

/dev/mcelog 设备文件

/var/log/mcelog    messages日志文件

/etc/mcelog/mcelog.conf配置文件

/var/run/mcelog.pid

默认故障日志只记录在/var/log/mcelog,并不记录到系统日志中。

如果需要在系统日志中也体现,需修改/etc/mcelog/mcelog.conf文件,将前面#去掉,并保存。

141948954.jpg

Mcelog相关设置

1.mcelog的随系统启动,查看boot下的config文件,可以看到mce模块随机启动

142251453.jpg

2.配置mcelog后台运行

#mcelog --daemon

3.查看mcelog日志文件

142742490.png

由于各厂家服务器内存槽位设计可能不同,这边关于错误中的cpu0 bank5内存槽位定位不做讨论。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值