硬盘健康状态监测

简介: 硬盘健康状态监测脚本
#!/bin/bash  
# 需要安装smartmontools 软件

Ip=`ifconfig | grep "inet addr:.* Bcast" | awk -F : '{print $2}'|sed -e s/Bcast//g`  
Disk="/dev/sd"  
for disk in {a..l}  
do  
smartctl  -H $Disk"$disk" >>/dev/null  
  if [ "$?" -eq "0" ];then         
      echo "$Disk$disk Health Status: OK"      
  else          
      echo "$Ip---$Disk$disk Health Status: Fail"|mail -s "Disk not read" wgy.wuhan@qq.com  
  fi  done          
目录
相关文章
|
2月前
|
传感器 数据采集 机器学习/深度学习
LabVIEW开发电机故障监测系统
LabVIEW开发电机故障监测系统
30 0
|
4月前
LabVIEW通过状态监测延长设备工作寿命
LabVIEW通过状态监测延长设备工作寿命
22 2
|
监控
常用PC服务器阵列卡、硬盘健康监控
常用PC服务器阵列卡、硬盘健康监控
544 0
内燃机车列车运行监控记录装置优化
我国内燃机车均已经加装了LKJ-93型列车运行监控记录装置,LKJ-93型列车运行监控记录装置的拥有量占比67%,是我国钢铁企业铁路运输自动化设备的重要组成部分。
|
物联网
如何从5万设备中找出频繁掉线设备,长期不在线的设备?
通过规则引擎监听设备上下线状态变更,了解设备运行情况
2747 0
|
C#
c#监测电脑状态
原文:c#监测电脑状态 1 public class DeviceMonitor 2 { 3 4 static readonly PerformanceCounter cpuCounter = new PerformanceCounter("Proces...
1072 0
|
Web App开发 监控 索引
|
Web App开发 监控 索引