0
0
Dockerdevops~10 mins

Resource monitoring per container in Docker - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to show resource usage statistics for all running containers.

Docker
docker [1]
Drag options to blanks, or click blank then click option'
Astats
Bimages
Cps
Drun
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker ps' which lists containers but does not show resource usage.
Using 'docker images' which lists images, not containers.
Using 'docker run' which starts a container but does not show stats.
2fill in blank
medium

Complete the command to monitor resource usage for a specific container named 'webapp'.

Docker
docker stats [1]
Drag options to blanks, or click blank then click option'
A--all
B--no-stream
Cwebapp
Dcontainer_id
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--all' which shows all containers, not just one.
Using '--no-stream' which changes output mode but does not specify container.
Using 'container_id' without knowing the actual ID.
3fill in blank
hard

Fix the error in the command to show resource stats for container 'db' without continuous updates.

Docker
docker stats [1] db
Drag options to blanks, or click blank then click option'
A--no-stream
B--all
C--quiet
D--filter
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--all' which shows all containers.
Using '--quiet' which suppresses output.
Using '--filter' which filters containers but does not stop streaming.
4fill in blank
hard

Fill both blanks to create a command that shows resource stats for all containers including stopped ones.

Docker
docker stats [1] [2]
Drag options to blanks, or click blank then click option'
A--all
B--no-stream
C--no-trunc
D--format
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--no-trunc' which affects output formatting, not container selection.
Using '--format' which changes output style but not container selection.
5fill in blank
hard

Fill all three blanks to format the stats output to show only container name, CPU %, and memory usage.

Docker
docker stats --no-stream --format "{{.[1]: CPU [2], Mem [3]"
Drag options to blanks, or click blank then click option'
AName
B.CPUPerc
C.MemUsage
DID
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'ID' instead of 'Name' for container name.
Omitting the dot prefix in CPU and memory fields.
Mixing up CPU and memory field names.