Get Running Processes of Docker Container

Get Running Processes of Docker Container

Monitoring the running processes of the Docker container, can help when troubleshooting issues and determine the problem why the container consuming lot of resources. This tutorial shows how to get the running processes of a Docker container.

The docker top command, or docker container command with top argument, can be used to get a list of the running processes of Docker container without logging in to it. The command accepts container name or ID. For example, to get the running processes of a container named nginx, you can use:

docker top nginx
docker container top nginx

Output example:

UID                 PID                 PPID                C                   STIME               TTY                 TIME                CMD
root                1261                1241                0                   02:14               ?                   00:00:00            nginx: master process nginx -g daemon off;
systemd+            1309                1261                0                   02:14               ?                   00:00:00            nginx: worker process
systemd+            1310                1261                0                   02:14               ?                   00:00:00            nginx: worker process
systemd+            1311                1261                0                   02:14               ?                   00:00:00            nginx: worker process
systemd+            1312                1261                0                   02:14               ?                   00:00:00            nginx: worker process
systemd+            1313                1261                0                   02:14               ?                   00:00:00            nginx: worker process

Leave a Comment

Cancel reply

Your email address will not be published.