Created
February 10, 2017 01:27
-
-
Save KyleBanks/8befbf0ae0d0535fa27d33cb67b40bd1 to your computer and use it in GitHub Desktop.
Returns Docker stats as a JSON Object
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
docker stats --no-stream \ | |
--format "{\"container\": \"{{ .Container }}\", \"memory\": { \"raw\": \"{{ .MemUsage }}\", \"percent\": \"{{ .MemPerc }}\"}, \"cpu\": \"{{ .CPUPerc }}\"}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample output: