From 1da460f8e40015b5153e84ca37c28c5b2b148e43 Mon Sep 17 00:00:00 2001 From: nils Date: Sun, 8 Aug 2021 14:48:57 +0200 Subject: [PATCH] fix typo --- stocheck.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stocheck.sh b/stocheck.sh index 511863c..4dd8f0e 100755 --- a/stocheck.sh +++ b/stocheck.sh @@ -112,8 +112,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" -e "Temperature Sensor 1" -e "Temperature Sensor 2" -e "Wear_Leveling_Count" -e "Available Spare" -e "Critical Warning:" -e "Available Spare Threshold" -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 "Wear_Leveling_Count" -e "Temperature Sensor 1" -e "Temperature Sensor 2" -e "Available Spare" -e "Critical Warning:" -e "Available Spare Threshold" --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" -e "Wear_Leveling_Count" -e "Available Spare:" -e "Critical Warning:" -e "Available Spare Threshold:" -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 "Wear_Leveling_Count" -e "Temperature Sensor 1" -e "Temperature Sensor 2" -e "Available Spare:" -e "Critical Warning:" -e "Available Spare Threshold:" --color=never) if [[ "$argse" =~ "FAILING_NOW" ]];then argsl=" "$argsl" @@ -122,7 +122,7 @@ while [ -z "$1" ]; do fi argsm=$(echo "$argsl" | wc -l) echo "------------------- /dev/nvme$x --------------------" - smartctl -i /dev/nvme$x | grep -e "=== START OF INFORMATION SECTION ===" -e "Device Model:" -e "Serial Number:" -e "Firmware Version:" -e "Multi_Zone_Error_Rate" -e "Model Number:" -e "Total NVM Capacity:" -e "NVMe Version" -e "Available Spare" -e "Available Spare Threshold" -e "Controller Busy Time" -e "Unsafe Shutdowns" -e "Namespace 1 Utilization" + smartctl -i /dev/nvme$x | grep -e "=== START OF INFORMATION SECTION ===" -e "Device Model:" -e "Serial Number:" -e "Firmware Version:" -e "Multi_Zone_Error_Rate" -e "Model Number:" -e "Total NVM Capacity:" -e "NVMe Version" -e "Available Spare:" -e "Available Spare Threshold:" -e "Controller Busy Time" -e "Unsafe Shutdowns" -e "Namespace 1 Utilization" echo "" echo "=== START OF SELF-ASSESSMENT TEST RESULT ===" smartctl -H /dev/nvme$x | grep -e "SMART overall-health self-assessment test result:"