ดู Resource ของ Container ที่รันอยู่ด้วย Stats
Published in
2 min readDec 8, 2016
docker stats
เป็นคำสั่งที่เอาไว้ดูว่า container ของเรามีการใช้ resource แค่ใหน เช่น CPU, MEM รูปแบบคำสั่ง
docker stats [OPTIONS] [CONTAINER...]
หรืออยากดูคำสั่งทั้งหมด
docker help statsUsage: docker stats [OPTIONS] [CONTAINER...]Display a live stream of container(s) resource usage statisticsOptions:
-a, --all Show all containers (default shows just running)
--format string Pretty-print images using a Go template
--help Print usage
--no-stream Disable streaming stats and only pull the first result
ดูทีละตัว
docker stats doh_php
ดูทีละหลายๆ ตัว
docker stats doh_php doh_frontend doh_backend
ดูทั้งหมด
docker stats -a