Last active
April 7, 2021 09:02
-
-
Save gufmar/097d16e1a627b9962e582c2d37cb3443 to your computer and use it in GitHub Desktop.
check cardano-node logfiles for...
This file contains 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
#!/usr/bin/env bash | |
echo "Log file ${1}" | |
evntCount=0 | |
cat logs/node0-${1}.json | grep SwitchedToAFork | jq -r '.at, .data.newtip' | paste - - | while read -r line ; do | |
evntCount=$((evntCount+1)) | |
echo "${evntCount} SwitchedToAFork: ${line}" | |
done |
This file contains 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
#!/usr/bin/env bash | |
echo "Log file ${1}" | |
prevline=$(cat logs/node0-${1}.json | grep -m1 TraceStartLeadershipCheck | jq -r .data.slot) | |
cat logs/node0-${1}.json | grep TraceStartLeadershipCheck | jq -r .data.slot | while read -r line ; do | |
if [[ $((line-prevline)) -gt 1 ]]; then | |
echo "slotDiff $line $prevline $((line-prevline))" | |
fi | |
prevline=$line | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment