# Smartctl bsnmp-regex example. # Author: John-Mark Gurney # # To be used with the following input: # smartctl -a /dev/ad4 | sed -e 's/^/ad4: /' | tools/sockin /var/run/bsnmp-regex.sock # ad4model: /^ad4: Device Model: (.*)$/\1/ ad4serial: /^ad4: Serial Number: (.*)$/\1/ ad4firmware: /^ad4: Firmware Version: (.*)$/\1/ ad4startstop: /^ad4: 4 Start_Stop_Count 0x[0-9a-f]* [0-9]* [0-9]* [0-9]* [^ ]* +Always - ([0-9]*)$/\1/ ad4realloc: /^ad4: 5 Reallocated_Sector_Ct 0x[0-9a-f]* [0-9]* [0-9]* [0-9]* [^ ]* +Always - ([0-9]*)$/\1/ ad4seekerror: /^ad4: 7 Seek_Error_Rate 0x[0-9a-f]* [0-9]* [0-9]* [0-9]* [^ ]* +Always - ([0-9]*)$/\1/ ad4airtemp: @^ad4: 190 Airflow_Temperature_Cel 0x[0-9a-f]* [0-9]* [0-9]* [0-9]* [^ ]* +Always - ([0-9]*) \(Lifetime Min/Max [0-9]*/[0-9]*\)$@\1@ ad4airtempmin: @^ad4: 190 Airflow_Temperature_Cel 0x[0-9a-f]* [0-9]* [0-9]* [0-9]* [^ ]* +Always - [0-9]* \(Lifetime Min/Max ([0-9]*)/[0-9]*\)$@\1@ ad4airtemp: @^ad4: 190 Airflow_Temperature_Cel 0x[0-9a-f]* [0-9]* [0-9]* [0-9]* [^ ]* +Always - [0-9]* \(Lifetime Min/Max [0-9]*/([0-9]*)\)$@\1@ ad4temp: @^ad4: 194 Temperature_Celsius 0x[0-9a-f]* [0-9]* [0-9]* [0-9]* [^ ]* +Always - ([0-9]*) \(.*\)$@\1@ ad4pendsect: /^ad4: 197 Current_Pending_Sector 0x[0-9a-f]* [0-9]* [0-9]* [0-9]* [^ ]* +Always - ([0-9]*)$/\1/ ad4offuncor: /^ad4: 198 Offline_Uncorrectable 0x[0-9a-f]* [0-9]* [0-9]* [0-9]* [^ ]* +Offline - ([0-9]*)$/\1/