请问LINUX下,怎么检查硬件损坏的情况?

查看/var/log/message 
dmesg |egrep "sd|eth/memory/disk" 
cat /var/log/messages |grep -i fail 
dmesg |grep -i err 


检查硬盘是否正常

smartctl简单用法  

smartctl -A   /dev/sda  查看硬盘的详细信息 
smartctl -a <device> 检查该设备是否已经打开SMART技术。  
smartctl -s on <device> 如果没有打开SMART技术,使用该命令打开SMART技术。  
smartctl -t short <device> 后台检测硬盘,消耗时间短;  
smartctl -t long <device> 后台检测硬盘,消耗时间长;  
smartctl -C -t short <device> 前台检测硬盘,消耗时间短;  
smartctl -C -t long <device> 前台检测硬盘,消耗时间长。其实就是利用硬盘SMART的自检程序。  
smartctl -X <device> 中断后台检测硬盘。  
smartctl -l selftest <device> 显示硬盘检测日志。  

smartctl -l error <device> 显示硬盘错误汇总。

内存可以看这个日志

/var/log下的mcelog

如果内存有问题就会出现下面的日志信息

Corrected error
MCi_MISC register valid
MCi_ADDR register valid
MCA: MEMORY CONTROLLER RD_CHANNELunspecified_ERR
Transaction: Memory read error
Memory read ECC erro

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值