Browse Source

update to deal w/ non-standard Samsung SSD...

main
John-Mark Gurney 4 years ago
parent
commit
32acaf28bc
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      diskstat

+ 2
- 2
diskstat View File

@@ -8,7 +8,7 @@ BEGIN {
}

function printdiskinfo(lblname, devname) {
cmd = "smartctl -a /dev/" devname " | egrep '"'"'Temperature_Celsius|Device Model:|Power_On_Hours'"'"'"
cmd = "smartctl -a /dev/" devname " | egrep '"'"'Temperature_Celsius|Airflow_Temperature_Cel|Device Model:|Power_On_Hours'"'"'"
r = cmd | getline
#print "xfoox" r "x" $0 "xbarx"

@@ -21,7 +21,7 @@ function printdiskinfo(lblname, devname) {
$1 = ""
$2 = ""
model = sprintf("%-*s", 4*8 - 1, $0)
} else if ($2 == "Temperature_Celsius") {
} else if ($2 == "Temperature_Celsius" || $2 == "Airflow_Temperature_Cel") {
temp = $10
} else if ($2 == "Power_On_Hours") {
hours = $10


Loading…
Cancel
Save