Bird
0
0

Which of the following is the correct syntax to get a single snapshot of container metrics without continuous updates?

easy📝 Syntax Q12 of 15
Docker - Logging and Monitoring
Which of the following is the correct syntax to get a single snapshot of container metrics without continuous updates?
Adocker stats --no-stream
Bdocker stats --single
Cdocker stats --once
Ddocker stats --snapshot
Step-by-Step Solution
Solution:
  1. Step 1: Identify the flag for single snapshot

    The --no-stream flag tells docker stats to show metrics once and exit instead of streaming live updates.
  2. Step 2: Verify other options

    Flags like --single, --once, and --snapshot are not valid Docker flags for this command.
  3. Final Answer:

    docker stats --no-stream -> Option A
  4. Quick Check:

    Single snapshot flag = --no-stream [OK]
Quick Trick: Use --no-stream for one-time metrics [OK]
Common Mistakes:
  • Using invalid flags like --single
  • Omitting the flag and expecting single output
  • Confusing with other Docker commands

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes