Created
December 20, 2018 00:31
-
-
Save a5ync/f01c3f7970c614a4ffccaf9d34cf4f1a to your computer and use it in GitHub Desktop.
Lists connections (ESTABLISHED) between containers and mysql instance
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
| docker ps -q -f name=utmsp_backend | xargs docker inspect -f '{{.State.Pid}}' | xargs -i nsenter -t {} -n netstat|grep :mysql|grep ESTABLISHED| cut -d ":" -f1|awk '{print $4}'|uniq -c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment