Last active
August 4, 2022 10:46
-
-
Save nmicic/a53bcd5d974704a51350302bae66b605 to your computer and use it in GitHub Desktop.
More info about ASR5500 crypto chip from /proc/ucad from all cards in copy/paste format for debug shell ( on MIO ) Raw
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 | |
| # ver 0.3 | |
| ###### Please always collect 2x SSD before/after running this script! #### | |
| # additionally please collect: "cat /proc/ucad/ipsec/sa_table" from DPC card we investigate from all CPU's of that DPC | |
| read -r -d '' HELP_README << README_BEGIN_END | |
| # get to debug shell after cli test-commands password ... | |
| To run: | |
| cd /var/tmp | |
| cat > /var/tmp/ucad_proc.sh | |
| <copy/paste this script> | |
| CTRL+D | |
| ... then: | |
| chmod +x /var/tmp/ucad_proc.sh | |
| /var/tmp/ucad_proc.sh | |
| exit | |
| ##### | |
| README_BEGIN_END | |
| ping bcast -c 2 -w 0.2 -b >& /dev/null | |
| IpNeighShowReach=( $( ip neigh show | grep 172.16 | grep REACHABLE | awk '{print $1}' | sort -n )) | |
| for ((j=0;j<=3;j++)); do | |
| 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 "date +%s;head -4096 /proc/ucad/debug/stats_raw;sleep 1;date +%s;head -4096 /proc/ucad/debug/stats_cooked;sleep 1;cat /proc/icp_dh8*/et_ring_ctrl/*/conf;date +%s;head -4096 /proc/ucad/ipsec/ctx_stats;sleep 1;date +%s;head -4096 /proc/ucad/ipsec/svc_stats;date +%s;cat /proc/ucam/dist;date +%s;find /proc/icp_dh8* -type f -print -exec cat {} \;" | |
| sleep 1 | |
| ssh $IP "date +%s;head -4096 /proc/ucad/debug/stats_raw;sleep 1;date +%s;head -4096 /proc/ucad/debug/stats_cooked;sleep 1;cat /proc/icp_dh8*/et_ring_ctrl/*/conf;date +%s;head -4096 /proc/ucad/ipsec/ctx_stats;sleep 1;date +%s;head -4096 /proc/ucad/ipsec/svc_stats;date +%s;cat /proc/ucam/dist;date +%s;find /proc/icp_dh8* -type f -print -exec cat {} \;" | |
| done | |
| done | |
| echo done | |
| exit | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment