X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=gnt-smart-test-vs-hours.sh;h=68eb7f6077ae7b4288c4eb3f9790eb4b43d55bcd;hb=0c93539e382dc062a659390cebf32a835dbbe02d;hp=7f2efd6fc0a42743d369535825bab44741f691a6;hpb=d0f5c611000e864cdb4fd207ab81fe410e66548d;p=gnt-info diff --git a/gnt-smart-test-vs-hours.sh b/gnt-smart-test-vs-hours.sh index 7f2efd6..68eb7f6 100755 --- a/gnt-smart-test-vs-hours.sh +++ b/gnt-smart-test-vs-hours.sh @@ -1,8 +1,10 @@ #!/bin/sh -e test -e /dev/shm/gnt-smart || sudo ./gnt-smart.sh -egrep 'Power_On_Hours' /dev/shm/gnt-smart | sed 's/: /:/' > /dev/shm/gnt-smart.2 -egrep '# 1' /dev/shm/gnt-smart | sed 's/: /:/' > /dev/shm/gnt-smart.1 -egrep 'Serial' /dev/shm/gnt-smart | sed 's/: /:/' > /dev/shm/gnt-smart.3 -join /dev/shm/gnt-smart.1 /dev/shm/gnt-smart.2 | sed 's/ [0-9]* Power_On_Hours.*Always - / ~ /' > /dev/shm/gnt-smart.12 -join /dev/shm/gnt-smart.12 /dev/shm/gnt-smart.3 | sed -e 's/ *- *~/ -\t~/' -e 's/ *~ */\t/' -e 's/Serial.*:/\t/' | tee /dev/shm/gnt-smart.out +egrep '# 1' /dev/shm/gnt-smart | sed 's/: /:/' | sort > /dev/shm/gnt-smart.1 +egrep 'Power_On_Hours' /dev/shm/gnt-smart | sed 's/: /:/' | sort > /dev/shm/gnt-smart.2 +egrep 'Serial' /dev/shm/gnt-smart | sed 's/: /:/' | sort > /dev/shm/gnt-smart.3 +join -a 2 /dev/shm/gnt-smart.1 /dev/shm/gnt-smart.2 | sed 's/ [0-9]* Power_On_Hours.*Always - / ~ /' | sort > /dev/shm/gnt-smart.12 +join -a 1 /dev/shm/gnt-smart.12 /dev/shm/gnt-smart.3 | sed -e 's/ *- *~/ -\t~/' -e 's/ *~ */\t/' -e 's/Serial.*:/\t/' > /dev/shm/gnt-smart.123 +egrep 'Load' /dev/shm/gnt-smart | sed 's/: /:/' | awk '{ print $1 " " $11 }' | sort > /dev/shm/gnt-smart.4 +join -a 1 /dev/shm/gnt-smart.123 /dev/shm/gnt-smart.4 | sort | tee /dev/shm/gnt-smart.1234