142k views
5 votes
What is the command to list the processes running in your swarm cluster?

a) docker ps
b) docker swarm ps
c) docker process ls
d) docker node ps

User Kardo
by
9.0k points

1 Answer

3 votes

Final answer:

The correct command to list the processes running on a node in a Docker Swarm cluster is 'docker node ps', and to see the processes on all nodes, use 'docker node ps --all'.

Step-by-step explanation:

The command to list the processes running in your Docker Swarm cluster is docker node ps. This command needs to be followed by the ID or name of the node you are inspecting. If you want to see the processes running on all nodes within the Swarm, you would append the --all option to the command, for example docker node ps --all. This command shows you details about the services running on a node, such as the container ID, the image being used, the command being executed, the current state of the container, and more. It's a useful command for monitoring and troubleshooting within a Docker Swarm environment.

User Pee
by
9.3k points