mirror of
https://github.com/pcvolkmer/docker-pps.git
synced 2025-07-02 13:02:55 +00:00
Initial import
This commit is contained in:
50
README.md
Normal file
50
README.md
Normal file
@ -0,0 +1,50 @@
|
||||
# docker-pps
|
||||
|
||||
The purpose of this tool is to show a list of processes running within docker containers.
|
||||
It is some kind of `docker ps` for processes.
|
||||
|
||||
## Usage
|
||||
|
||||
```shell
|
||||
$ docker-pps
|
||||
```
|
||||
shows
|
||||
```
|
||||
CONTAINER ID IMAGE PID UID COMMAND
|
||||
0123456789ab alpine 12345 1000 sh
|
||||
123456789abc nginx 13570 root nginx: master process nginx -g daemon off;
|
||||
123456789abc nginx 13571 101 nginx: worker process
|
||||
123456789abc nginx 13572 101 nginx: worker process
|
||||
```
|
||||
|
||||
To filter processes by user, provide `--uid` argument with comma separated usernames or IDs.
|
||||
|
||||
```shell
|
||||
$ docker-pps --uid=root,101
|
||||
```
|
||||
shows
|
||||
```
|
||||
CONTAINER ID IMAGE PID UID COMMAND
|
||||
123456789abc nginx 13570 root nginx: master process nginx -g daemon off;
|
||||
123456789abc nginx 13571 101 nginx: worker process
|
||||
123456789abc nginx 13572 101 nginx: worker process
|
||||
```
|
||||
|
||||
Use `-q` argument to show a list of PIDs
|
||||
|
||||
```shell
|
||||
$ docker-pps -q
|
||||
```
|
||||
shows
|
||||
```
|
||||
12345
|
||||
13570
|
||||
13571
|
||||
13572
|
||||
```
|
||||
|
||||
To select another docker host, use `--host` argument
|
||||
|
||||
```shell
|
||||
$ docker-pps --host=http://otherhost:1234
|
||||
```
|
Reference in New Issue
Block a user