Ticket #84: sm.awk

File sm.awk, 821 bytes (added by frief, 9 years ago)

awk script

Line 
1# Frieder Ferlemann: this AWK script makes sense for SSD drives with Indilinx controller
2BEGIN { print "#Power_On_Hours Write_Sectors_Tot_Ct Write_Commands_Tot_Ct Error_Bits_Flash_Tot_Ct Corr_Read_Errors_Tot_Ct Min_Erase_Count Max_Erase_Count Average_Erase_Count Remaining_Lifetime_Perc" }
3/Power_On_Hours/        { POH  = $10; printf "%d", POH }
4/Write_Sectors_Tot_Ct/  { WSTC = $10; printf " %d", WSTC }
5/Write_Commands_Tot_Ct/ { WCTC = $10; printf " %d", WCTC }
6/Error_Bits_Flash_Tot_Ct/ {EBFTC = $10; printf " %d", EBFTC}
7/Corr_Read_Errors_Tot_Ct/ {CRETC = $10; printf " %d", CRETC}
8/Min_Erase_Count/         {MIEC = $10; printf " %d", MIEC}
9/Max_Erase_Count/         {MAEC = $10; printf " %d", MAEC}
10/Average_Erase_Count/   { AEC  = $10; printf " %d", AEC }
11/Remaining_Lifetime_Perc/ {RLP = $10; printf " %d\n", RLP}