mysql -u${DBA_USER} -p${DBA_PASSWD} -h ${INSTANCE_ENDPOINT} -e "SHOW ENGINE INNODB STATUS\G" | awk -f deadlock.awk
Last active
November 18, 2022 19:18
-
-
Save ronaldbradford/ed314eb5287cad58d17c2ff440e12e05 to your computer and use it in GitHub Desktop.
Show MySQL Deadlock content from INNODB STATUS
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
BEGIN { show=0; } | |
/^LATEST DETECTED DEADLOCK/ { show=1; } | |
/^TRANSACTIONS/ { show=0; } | |
{ | |
if (show == 1) { | |
print $0 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment