github.com/vieux/docker@v0.6.3-0.20161004191708-e097c2a938c7/docs/reference/commandline/node_ps.md (about) 1 <!--[metadata]> 2 +++ 3 title = "node ps" 4 description = "The node ps command description and usage" 5 keywords = ["node, tasks", "ps"] 6 aliases = ["/engine/reference/commandline/node_tasks/"] 7 [menu.main] 8 parent = "smn_cli" 9 +++ 10 <![end-metadata]--> 11 12 # node ps 13 14 ```markdown 15 Usage: docker node ps [OPTIONS] [NODE...] 16 17 List tasks running on one or more nodes, defaults to current node. 18 19 Options: 20 -a, --all Display all instances 21 -f, --filter value Filter output based on conditions provided 22 --help Print usage 23 --no-resolve Do not map IDs to Names 24 --no-trunc Do not truncate output 25 ``` 26 27 Lists all the tasks on a Node that Docker knows about. You can filter using the `-f` or `--filter` flag. Refer to the [filtering](#filtering) section for more information about available filter options. 28 29 Example output: 30 31 $ docker node ps swarm-manager1 32 NAME IMAGE NODE DESIRED STATE CURRENT STATE 33 redis.1.7q92v0nr1hcgts2amcjyqg3pq redis:3.0.6 swarm-manager1 Running Running 5 hours 34 redis.6.b465edgho06e318egmgjbqo4o redis:3.0.6 swarm-manager1 Running Running 29 seconds 35 redis.7.bg8c07zzg87di2mufeq51a2qp redis:3.0.6 swarm-manager1 Running Running 5 seconds 36 redis.9.dkkual96p4bb3s6b10r7coxxt redis:3.0.6 swarm-manager1 Running Running 5 seconds 37 redis.10.0tgctg8h8cech4w0k0gwrmr23 redis:3.0.6 swarm-manager1 Running Running 5 seconds 38 39 40 ## Filtering 41 42 The filtering flag (`-f` or `--filter`) format is of "key=value". If there is more 43 than one filter, then pass multiple flags (e.g., `--filter "foo=bar" --filter "bif=baz"`) 44 45 The currently supported filters are: 46 47 * [name](#name) 48 * [id](#id) 49 * [label](#label) 50 * [desired-state](#desired-state) 51 52 #### name 53 54 The `name` filter matches on all or part of a task's name. 55 56 The following filter matches all tasks with a name containing the `redis` string. 57 58 $ docker node ps -f name=redis swarm-manager1 59 NAME IMAGE NODE DESIRED STATE CURRENT STATE 60 redis.1.7q92v0nr1hcgts2amcjyqg3pq redis:3.0.6 swarm-manager1 Running Running 5 hours 61 redis.6.b465edgho06e318egmgjbqo4o redis:3.0.6 swarm-manager1 Running Running 29 seconds 62 redis.7.bg8c07zzg87di2mufeq51a2qp redis:3.0.6 swarm-manager1 Running Running 5 seconds 63 redis.9.dkkual96p4bb3s6b10r7coxxt redis:3.0.6 swarm-manager1 Running Running 5 seconds 64 redis.10.0tgctg8h8cech4w0k0gwrmr23 redis:3.0.6 swarm-manager1 Running Running 5 seconds 65 66 67 #### id 68 69 The `id` filter matches a task's id. 70 71 $ docker node ps -f id=bg8c07zzg87di2mufeq51a2qp swarm-manager1 72 NAME IMAGE NODE DESIRED STATE CURRENT STATE 73 redis.7.bg8c07zzg87di2mufeq51a2qp redis:3.0.6 swarm-manager1 Running Running 5 seconds 74 75 76 #### label 77 78 The `label` filter matches tasks based on the presence of a `label` alone or a `label` and a 79 value. 80 81 The following filter matches tasks with the `usage` label regardless of its value. 82 83 ```bash 84 $ docker node ps -f "label=usage" 85 NAME IMAGE NODE DESIRED STATE CURRENT STATE 86 redis.6.b465edgho06e318egmgjbqo4o redis:3.0.6 swarm-manager1 Running Running 10 minutes 87 redis.7.bg8c07zzg87di2mufeq51a2qp redis:3.0.6 swarm-manager1 Running Running 9 minutes 88 ``` 89 90 91 #### desired-state 92 93 The `desired-state` filter can take the values `running`, `shutdown`, and `accepted`. 94 95 96 ## Related information 97 98 * [node inspect](node_inspect.md) 99 * [node update](node_update.md) 100 * [node ls](node_ls.md) 101 * [node rm](node_rm.md)