Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/reference/commandline/container_top.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,28 @@ Display the running processes of a container


<!---MARKER_GEN_END-->

## Description

The `docker top` command shows the processes running inside a container.

On Linux, extra arguments after the container name are passed through to
`ps`. On Windows, those extra arguments aren't supported.

## Examples

### Show processes in a container

```console
$ docker top my-container
UID PID PPID C STIME TTY TIME CMD
root 1853 1838 0 12:01 ? 00:00:00 nginx: master process nginx -g daemon off;
```

### Pass options through to ps (Linux)

```console
$ docker top my-container -o pid,comm
PID COMMAND
1853 nginx
```
25 changes: 25 additions & 0 deletions docs/reference/commandline/top.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,28 @@ Display the running processes of a container

<!---MARKER_GEN_END-->

## Description

The `docker top` command shows the processes running inside a container.

On Linux, extra arguments after the container name are passed through to
`ps`. On Windows, those extra arguments aren't supported.

## Examples

### Show processes in a container

```console
$ docker top my-container
UID PID PPID C STIME TTY TIME CMD
root 1853 1838 0 12:01 ? 00:00:00 nginx: master process nginx -g daemon off;
```

### Pass options through to ps (Linux)

```console
$ docker top my-container -o pid,comm
PID COMMAND
1853 nginx
```