Bird
0
0

What will be the output of the command docker stats --no-stream my_container if my_container is running?

medium📝 query result Q13 of 15
Docker - Logging and Monitoring
What will be the output of the command docker stats --no-stream my_container if my_container is running?
AA continuous live stream of resource usage for all containers
BLogs of <code>my_container</code>
CAn error saying container not found
DA single snapshot of resource usage metrics for <code>my_container</code>
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command components

    docker stats --no-stream requests a single snapshot, and specifying my_container limits output to that container only.
  2. Step 2: Predict the output

    Since my_container is running, the command outputs one snapshot of its resource usage metrics, not a stream or logs.
  3. Final Answer:

    A single snapshot of resource usage metrics for my_container -> Option D
  4. Quick Check:

    --no-stream + container name = single snapshot for that container [OK]
Quick Trick: Add container name for focused single snapshot [OK]
Common Mistakes:
  • Expecting continuous stream despite --no-stream
  • Confusing stats output with logs
  • Assuming error if container is running

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes