Files
nomad/website/content/docs/commands/node-pool/jobs.mdx
Aimee Ukasick dae496e427 Docs: SEO front matter description for search: commands section (#25175)
* Enhance front matter description for search

* acl section

* alloc section

* config section

* deployment section

* eval section

* job section

* license section

* namespace section

* node section

* node pool section

* operator section

* plugin section

* quota section

* recommendation section

* scaling section

* sentinel section

* server section

* service section

* setup section

* system section

* tls section

* var section

* volume section

* change reference to command reference

* Apply suggestions from code review

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>

---------

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
2025-03-19 12:02:02 -05:00

80 lines
2.4 KiB
Plaintext

---
layout: docs
page_title: 'nomad node pool jobs command reference'
description: |
The `nomad node pool jobs` command displays jobs in the specified node pool.
---
# `nomad node pool jobs` command reference
The `node pool jobs` command is used to list jobs in a node pool.
## Usage
```plaintext
nomad node pool jobs [options] <node-pool>
```
If ACLs are enabled, this command requires a token with the `read` capability in
a `node_pool` policy that matches the node pool being targeted. The results will
be filtered by the namespaces where the token has `read-job` capability.
## General options
@include 'general_options.mdx'
## Jobs options
- `-filter`: Specifies an expression used to [filter results][api_filtering].
- `-json`: Output the jobs in JSON format.
- `-page-token`: Where to start [pagination][api_pagination].
- `-per-page`: How many results to show per page. If not specified, or set to
`0`, all results are returned.
- `-t`: Format and display jobs using a Go template.
## Examples
List jobs in a specific namespace in the `prod` node pool:
```shell-session
$ nomad node pool jobs -namespace default prod
ID Type Priority Status Submit Date
job1 service 80 running 07/25/17 15:47:11 UTC
job2 batch 40 complete 07/24/17 19:22:11 UTC
job3 service 50 dead (stopped) 07/22/17 16:34:48 UTC
```
List jobs in all namespaces in the `prod` node pool:
```shell-session
$ nomad node pool jobs -namespace '*' prod
ID Namespace Type Priority Status Submit Date
job1 default service 80 running 07/25/17 15:47:11 UTC
job2 default batch 40 complete 07/24/17 19:22:11 UTC
job3 system service 50 dead (stopped) 07/22/17 16:34:48 UTC
```
Paginate list:
```shell-session
$ nomad node pool jobs -per-page 2 prod
ID Type Priority Status Submit Date
job1 service 80 running 07/25/17 15:47:11 UTC
job2 batch 40 complete 07/24/17 19:22:11 UTC
Results have been paginated. To get the next page run:
nomad node pool jobs -per-page 2 -page-token job3 prod
$ nomad node pool jobs -per-page 2 -page-token job3 prod
ID Type Priority Status Submit Date
job3 service 50 dead (stopped) 07/22/17 16:34:48 UTC
```
[api_filtering]: /nomad/api-docs#filtering
[api_pagination]: /nomad/api-docs#pagination