Skip to content

Instantly share code, notes, and snippets.

View KyleBanks's full-sized avatar

Kyle Banks KyleBanks

View GitHub Profile
@KyleBanks
KyleBanks / docker-stats-json
Created February 10, 2017 01:27
Returns Docker stats as a JSON Object
docker stats --no-stream \
--format "{\"container\": \"{{ .Container }}\", \"memory\": { \"raw\": \"{{ .MemUsage }}\", \"percent\": \"{{ .MemPerc }}\"}, \"cpu\": \"{{ .CPUPerc }}\"}"