Complete the command to show resource usage statistics for all running containers.
docker [1]The docker stats command displays live resource usage statistics for running containers.
Complete the command to monitor resource usage for a specific container named 'webapp'.
docker stats [1]To monitor a specific container, provide its name or ID after docker stats. Here, the container name is 'webapp'.
Fix the error in the command to show resource stats for container 'db' without continuous updates.
docker stats [1] dbThe --no-stream option shows a single snapshot of resource usage instead of continuous updates.
Fill both blanks to create a command that shows resource stats for all containers including stopped ones.
docker stats [1] [2]
The --all option includes all containers, and --no-stream shows a single snapshot.
Fill all three blanks to format the stats output to show only container name, CPU %, and memory usage.
docker stats --no-stream --format "{{.[1]: CPU [2], Mem [3]"
The --format option uses Go templates. Name shows container name, .CPUPerc CPU percentage, and .MemUsage memory usage.