Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
| ... | ... |
@@ -28,7 +28,7 @@ Commands: |
| 28 | 28 |
inspect Display detailed information on one or more services |
| 29 | 29 |
logs Fetch the logs of a service |
| 30 | 30 |
ls List services |
| 31 |
- ps List the tasks of a service |
|
| 31 |
+ ps List the tasks of one or more services |
|
| 32 | 32 |
rm Remove one or more services |
| 33 | 33 |
scale Scale one or multiple replicated services |
| 34 | 34 |
update Update a service |
| ... | ... |
@@ -17,7 +17,7 @@ aliases: ["/engine/reference/commandline/service_tasks/"] |
| 17 | 17 |
# service ps |
| 18 | 18 |
|
| 19 | 19 |
```Markdown |
| 20 |
-Usage: docker service ps [OPTIONS] SERVICE |
|
| 20 |
+Usage: docker service ps [OPTIONS] SERVICE [SERVICE...] |
|
| 21 | 21 |
|
| 22 | 22 |
List the tasks of one or more services |
| 23 | 23 |
|
| ... | ... |
@@ -147,12 +147,10 @@ ID NAME IMAGE NODE DESIRED STATE CURRENT STATE |
| 147 | 147 |
8eaxrb2fqpbn redis.10 redis:3.0.6 manager1 Running Running 8 seconds |
| 148 | 148 |
``` |
| 149 | 149 |
|
| 150 |
- |
|
| 151 | 150 |
#### desired-state |
| 152 | 151 |
|
| 153 | 152 |
The `desired-state` filter can take the values `running`, `shutdown`, and `accepted`. |
| 154 | 153 |
|
| 155 |
- |
|
| 156 | 154 |
### Formatting |
| 157 | 155 |
|
| 158 | 156 |
The formatting options (`--format`) pretty-prints tasks output |
| ... | ... |
@@ -176,7 +174,7 @@ output the data exactly as the template declares or, when using the |
| 176 | 176 |
`table` directive, includes column headers as well. |
| 177 | 177 |
|
| 178 | 178 |
The following example uses a template without headers and outputs the |
| 179 |
-`ID` and `Driver` entries separated by a colon for all tasks: |
|
| 179 |
+`Name` and `Image` entries separated by a colon for all tasks: |
|
| 180 | 180 |
|
| 181 | 181 |
```bash |
| 182 | 182 |
$ docker service ps --format "{{.Name}}: {{.Image}}" top
|