From cf61e3b91607f484f598066c43d25fe9655a89a5 Mon Sep 17 00:00:00 2001 From: Nils Date: Mon, 12 Apr 2021 20:39:07 +0200 Subject: [PATCH] added individual sensors for nvme drives --- stocheck.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stocheck.sh b/stocheck.sh index 60698f1..10c9ca6 100755 --- a/stocheck.sh +++ b/stocheck.sh @@ -119,8 +119,8 @@ while [ -z "$1" ]; do for x in {0..4};do scan=$(smartctl --scan) if [[ -n $(echo $scan | grep /dev/nvme$x) ]] && [[ -n $(ls /sys/block | grep nvme"$x") ]];then - argsl=$(smartctl -A /dev/nvme$x | grep -e "Reallocated_Sector_Ct" -e "Power_On_Hours" -e "Temperature_Celsius" -e "Media_Wearout_Indicator" -e "Power_Cycle_Count" -e "Reported_Uncorrect" -e "Temperature:" -e "Percentage Used:" -e "Data Units Read:" -e "Data Units Written:" -e "Power on Hours:" -e "Power Cycles:" -e "Media and Data Integrity Errors:" -e "Error Information Log Entries:" -e "Percent_Lifetime_Remain" -e "Write_Error_Rate" -e "Offline_Uncorrectable" -e "Reported_Uncorrect" -e "Error_Correction_Count" -e "Unexpect_Power_Loss_Ct" -e "Raw_Read_Error_Rate" -e "Warning Comp. Temperature Time" -e "Critical Comp. Temperature Time" -e "Power On Hours" -e "Controller Busy Time" -o --color=never) - argse=$(smartctl -A /dev/nvme$x | grep -e "=== START OF SMART DATA SECTION ===" -e "SMART overall-health self-assessment test result:" -e "Reallocated_Sector_Ct" -e "Power_On_Hours" -e "Temperature_Celsius" -e "Media_Wearout_Indicator" -e "Power_Cycle_Count" -e "Reported_Uncorrect" -e "Temperature:" -e "Percentage Used:" -e "Data Units Read:" -e "Data Units Written:" -e "Power on Hours:" -e "Power Cycles:" -e "Media and Data Integrity Errors:" -e "Error Information Log Entries:" -e "FAILING_NOW" -e "Percent_Lifetime_Remain" -e "Write_Error_Rate" -e "Offline_Uncorrectable" -e "Reported_Uncorrect" -e "Error_Correction_Count" -e "Unexpect_Power_Loss_Ct" -e "Raw_Read_Error_Rate" -e "Warning Comp. Temperature Time" -e "Critical Comp. Temperature Time" -e "Power On Hours" -e "Controller Busy Time" --color=never) + argsl=$(smartctl -A /dev/nvme$x | grep -e "Reallocated_Sector_Ct" -e "Power_On_Hours" -e "Temperature_Celsius" -e "Media_Wearout_Indicator" -e "Power_Cycle_Count" -e "Reported_Uncorrect" -e "Temperature:" -e "Percentage Used:" -e "Data Units Read:" -e "Data Units Written:" -e "Power on Hours:" -e "Power Cycles:" -e "Media and Data Integrity Errors:" -e "Error Information Log Entries:" -e "Percent_Lifetime_Remain" -e "Write_Error_Rate" -e "Offline_Uncorrectable" -e "Reported_Uncorrect" -e "Error_Correction_Count" -e "Unexpect_Power_Loss_Ct" -e "Raw_Read_Error_Rate" -e "Warning Comp. Temperature Time" -e "Critical Comp. Temperature Time" -e "Power On Hours" -e "Controller Busy Time" -e "Temperature Sensor 1" -e "Temperature Sensor 2" -o --color=never) + argse=$(smartctl -A /dev/nvme$x | grep -e "=== START OF SMART DATA SECTION ===" -e "SMART overall-health self-assessment test result:" -e "Reallocated_Sector_Ct" -e "Power_On_Hours" -e "Temperature_Celsius" -e "Media_Wearout_Indicator" -e "Power_Cycle_Count" -e "Reported_Uncorrect" -e "Temperature:" -e "Percentage Used:" -e "Data Units Read:" -e "Data Units Written:" -e "Power on Hours:" -e "Power Cycles:" -e "Media and Data Integrity Errors:" -e "Error Information Log Entries:" -e "FAILING_NOW" -e "Percent_Lifetime_Remain" -e "Write_Error_Rate" -e "Offline_Uncorrectable" -e "Reported_Uncorrect" -e "Error_Correction_Count" -e "Unexpect_Power_Loss_Ct" -e "Raw_Read_Error_Rate" -e "Warning Comp. Temperature Time" -e "Critical Comp. Temperature Time" -e "Power On Hours" -e "Controller Busy Time" -e "Temperature Sensor 1" -e "Temperature Sensor 2" --color=never) if [[ "$argse" =~ "FAILING_NOW" ]];then argsl=" "$argsl"