How to know about docker engine status

dockerd provides bunch of functionalities like pulling image, creating container, service and etc.
But dockerd can accept multi requests and response.
Let’s assume the scenario,

  1. A client requests to pull a image (900 MB)
  2. B client wants to know what the dockerd is doing.

Dockerd might be busy due to pulling image(900 MB)
How can B client knows the status of dockerd? I guess docker api provide only ‘ping’ whether engine is alive or not.
Otherwise register docker monitor event to check event and save the status.
I would like to request just status when I want to know the dockerd status like busy or idle? / pulling image or creating image…
Does it be possible?

Hi! Great question.

The engine supports events. Please have a look at Engine Events, which is a command line interface to stream or search for engine-related events.

If you prefer to work at the API level, you can visit Engine System Events for some guidance

The performance impact can be quite impressive if you have a busy or resource-constrained system, so it’s a good idea to use these interfaces with appropriate care.

Thank the info.

I know how to get the event from engine both api and docker cli.
However it needs to make some steps, I mean, need a thread to take care of the events and set the status in a file or whatever.
But like ping api (https://docs.docker.com/engine/api/v1.30/#operation/SystemPing),it provides whether engine is alive or not.
Like the api, does it have any idea If engine responses the status like ‘busy’ or ‘idle’ when request some of api to know engine status , That is my fundermental questions.