show type if not Ethernet switch
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 5 May 2022 05:51:53 +0000 (07:51 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 5 May 2022 05:51:53 +0000 (07:51 +0200)
helps for Neyland 24T which reports PowerConnect 5324 under type

fans

diff --git a/fans b/fans
index 31af2a4..2bac565 100755 (executable)
--- a/fans
+++ b/fans
@@ -2,5 +2,5 @@ echo "All fans breakdown by status:"
 grep Fan log/*system* | cut -d: -f3 | sort | uniq -c
 echo
 echo "Failing fans:"
-grep -B 15 'NOT' log/*system* | egrep '(NOT|Description|Type)' | grep -v -- -Type: | sed -e 's/^[^_]*_//' -e 's/_[^-:]*[-:]/ /'
+grep -B 15 'NOT' log/*system* | egrep '(NOT|Description|Type)' | grep -v -- '-Type: *Ethernet Switch' | sed -e 's/^[^_]*_//' -e 's/_[^-:]*[-:]/ /'