DCA · Question #24
Which command interactively monitors all container activity in the Docker engine?
The correct answer is B. docker system events. The docker system events command interactively monitors all activity within the Docker engine, including container lifecycle events.
Question
Which command interactively monitors all container activity in the Docker engine?
Options
- Adocker system logs
- Bdocker system events
- Cdocker container events
- Ddocker container logs
How the community answered
(24 responses)- A4% (1)
- B96% (23)
Why each option
The `docker system events` command interactively monitors all activity within the Docker engine, including container lifecycle events.
`docker system logs` is not a standard Docker command; `docker logs` retrieves logs from a specific container.
The `docker system events` command streams real-time events from the Docker daemon, providing an interactive display of all container activities such as creation, start, stop, pause, unpause, and destruction, as well as other system-wide events.
`docker container events` is not a valid Docker command; `docker system events` is the correct command for monitoring all events.
`docker container logs` (or `docker logs`) displays the standard output and error streams of a specific container, not a real-time stream of all system-wide container activities.
Concept tested: Monitoring Docker system events
Source: https://docs.docker.com/engine/reference/commandline/system_events/
Topics
Community Discussion
No community discussion yet for this question.