Last active
September 9, 2022 10:10
-
-
Save nmicic/53976c6002d01a16b87184c21b347b61 to your computer and use it in GitHub Desktop.
To_detect_which_card_cpu_has_crypto_chip_hang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo "Impacted card is one where you see the line: ERROR: Qat is not responding. Please restart the device" | |
| ping bcast -c 2 -w 0.2 -b >& /dev/null | |
| IpNeighShowReach=( $( ip neigh show | grep 172.16 | grep REACHABLE | awk '{print $1}' | sort -n )) | |
| i=0;for IP in "${IpNeighShowReach[@]}";do i=$(( $i + 1 )); IPX[$i]=$IP;done;iLAST=$i; | |
| for ((i=1;i<=$iLAST;i++)); do | |
| IP=${IPX[$i]}; | |
| echo === $IP === | |
| grep $IP" " /etc/hosts | |
| ssh $IP 'grep -e "ERROR" -e "Qat is not responding" -e "Please restart the device" /proc/icp*/qat* /proc/icp*/heartbeat*' | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment