smartctl -A --device=sat+megaraid,4 /dev/sda
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-2.6.32-042stab088.4] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
9 Power_On_Hours 0x0032 099 099 000 Old_age Always - 1227
12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 17
177 Wear_Leveling_Count 0x0013 099 099 000 Pre-fail Always - 7
179 Used_Rsvd_Blk_Cnt_Tot 0x0013 100 100 010 Pre-fail Always - 0
181 Program_Fail_Cnt_Total 0x0032 100 100 010 Old_age Always - 0
182 Erase_Fail_Count_Total 0x0032 100 100 010 Old_age Always - 0
183 Runtime_Bad_Block 0x0013 100 100 010 Pre-fail Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0032 072 067 000 Old_age Always - 28
195 Hardware_ECC_Recovered 0x001a 200 200 000 Old_age Always - 0
199 UDMA_CRC_Error_Count 0x003e 100 100 000 Old_age Always - 0
235 Unknown_Attribute 0x0012 099 099 000 Old_age Always - 15
241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 22668737356
Самое сложное тут определить номер устройства! Они идут вовсе не подряд, а вот так:
/opt/MegaRAID/MegaCli/MegaCli64 -LdpdInfo -a0|grep 'Device Id:'
Device Id: 9
Device Id: 10
Device Id: 19
Device Id: 12
Device Id: 17
Device Id: 18
Device Id: 15
Device Id: 14
Device Id: 22
Device Id: 21
Device Id: 20
Device Id: 16
Поэтому универсальная команда выборки SMART имеет вид:
for i in `/opt/MegaRAID/MegaCli/MegaCli64 -LdpdInfo -a0|grep 'Device Id:'| awk '{print $3}'`; do smartctl -A -i -d sat+megaraid,$i /dev/sda;done
No comments :
Post a Comment
Note: only a member of this blog may post a comment.