Command: node status
The node status
command is used to display information about client nodes. A
node must first be registered with the servers before it will be visible in this
output.
Usage
nomad node status [options] [node]
If no node ID is passed, then the command will enter "list mode" and dump a high-level list of all known nodes. This list output contains less information but is a good way to get a bird's-eye view of things.
If there is an exact match based on the provided node ID or prefix, then that
particular node will be queried, and detailed information will be displayed,
including resource usage statistics. Otherwise, a list of matching nodes and
information will be displayed. If running the command on a Nomad Client, the
-self
flag is useful to quickly access the status of the local node.
If ACLs are enabled, this option requires a token with the 'node:read' capability.
General Options
-address=<addr>
: The address of the Nomad server. Overrides theNOMAD_ADDR
environment variable if set. Defaults tohttp://127.0.0.1:4646
.-region=<region>
: The region of the Nomad server to forward commands to. Overrides theNOMAD_REGION
environment variable if set. Defaults to the Agent's local region.-no-color
: Disables colored command output. Alternatively,NOMAD_CLI_NO_COLOR
may be set. This option takes precedence over-force-color
.-force-color
: Forces colored command output. This can be used in cases where the usual terminal detection fails. Alternatively,NOMAD_CLI_FORCE_COLOR
may be set. This option has no effect if-no-color
is also used.-ca-cert=<path>
: Path to a PEM encoded CA cert file to use to verify the Nomad server SSL certificate. Overrides theNOMAD_CACERT
environment variable if set.-ca-path=<path>
: Path to a directory of PEM encoded CA cert files to verify the Nomad server SSL certificate. If both-ca-cert
and-ca-path
are specified,-ca-cert
is used. Overrides theNOMAD_CAPATH
environment variable if set.-client-cert=<path>
: Path to a PEM encoded client certificate for TLS authentication to the Nomad server. Must also specify-client-key
. Overrides theNOMAD_CLIENT_CERT
environment variable if set.-client-key=<path>
: Path to an unencrypted PEM encoded private key matching the client certificate from-client-cert
. Overrides theNOMAD_CLIENT_KEY
environment variable if set.-tls-server-name=<value>
: The server name to use as the SNI host when connecting via TLS. Overrides theNOMAD_TLS_SERVER_NAME
environment variable if set.-tls-skip-verify
: Do not verify TLS certificate. This is highly not recommended. Verification will also be skipped ifNOMAD_SKIP_VERIFY
is set.-token
: The SecretID of an ACL token to use to authenticate API requests with. Overrides theNOMAD_TOKEN
environment variable if set.
Status Options
-self
: Query the status of the local node.-stats
: Display detailed resource usage statistics.-allocs
: When a specific node is not being queried, shows the number of running allocations per node.-short
: Display short output. Used only when querying a single node.-verbose
: Show full information.-per-page
: How many results to show per page.-page-token
: Where to start pagination.-filter
: Specifies an expression used to filter query results.-os
: Display operating system name.-quiet
: Display only node IDs.-json
: Output the node in its JSON format.-t
: Format and display node using a Go template.
Examples
List view:
$ nomad node statusID DC Name Class Drain Eligibility Statusa72dfba2 dc1 node1 <none> false eligible ready1f3f03ea dc1 node2 <none> false eligible ready
List view, with operating system name:
$ nomad node status -osID DC Name Class OS Drain Eligibility Statusa72dfba2 dc1 node1 <none> ubuntu false eligible readyf73e3993 dc1 node2 <none> centos false eligible ready
List view, with quiet:
$ nomad node status -quiet820561cf-830d-b089-cg03-f2cfc4cecff707949e3a-4c25-e1bf-3dbh-984c2e28fec28bc2c581-37ba-dj08-9f67-53bc217f36f8f35be281-85a5-d1e6-d268-6e8a6f0684df
NOTE: -quiet
cannot be used in conjuction with -verbose
or -json
.
List view, with running allocations:
$ nomad node status -allocsID DC Name Class Drain Eligibility Status Running Allocs4d2ba53b dc1 node1 <none> false eligible ready 134dfba32 dc1 node2 <none> false eligible ready 3
Single-node view in short mode:
$ nomad node status -short 1f3f03eaID = c754da1fName = nomadClass = <none>DC = dc1Drain = falseStatus = readyUptime = 17h2m25s AllocationsID Eval ID Job ID Task Group Desired Status Client Status0b8b9e37 8bf94335 example cache run running
Full output for a single node:
$ nomad node status 1f3f03eaID = c754da1fName = nomad-server01Class = <none>DC = dc1Drain = falseStatus = readyUptime = 17h42m50s DriversDriver Detected Healthydocker false falseexec true truejava true trueqemu true trueraw_exec true truerkt true true Node EventsTime Subsystem Message2018-03-29T17:24:42Z Driver: docker Driver docker is not detected2018-03-29T17:23:42Z Cluster Node registered Allocated ResourcesCPU Memory Disk500/2600 MHz 256 MiB/2.0 GiB 300 MiB/32 GiB Allocation Resource UtilizationCPU Memory430/2600 MHz 199 MiB/2.0 GiB Host Resource UtilizationCPU Memory Disk513/3000 MHz 551 MiB/2.4 GiB 4.2 GiB/52 GiB AllocationsID Eval ID Job ID Task Group Desired Status Client Status7bff7214 b3a6b9d2 example cache run running
Using -self
when on a Nomad Client:
$ nomad node status -selfID = c754da1fName = nomad-client01Class = <none>DC = dc1Drain = falseStatus = readyUptime = 17h7m41s DriversDriver Detected Healthydocker false falseexec true truejava true trueqemu true trueraw_exec true truerkt true true Node EventsTime Subsystem Message2018-03-29T17:24:42Z Driver: docker Driver docker is not detected2018-03-29T17:23:42Z Cluster Node registered Allocated ResourcesCPU Memory Disk2500/2600 MHz 1.3 GiB/2.0 GiB 1.5 GiB/32 GiB Allocation Resource UtilizationCPU Memory2200/2600 MHz 1.7 GiB/2.0 GiB Host Resource UtilizationCPU Memory Disk2430/3000 MHz 1.8 GiB/2.4 GiB 6.5 GiB/40 GiB AllocationsID Eval ID Job ID Task Group Desired Status Client Status0b8b9e37 8bf94335 example cache run runningb206088c 8bf94335 example cache run runningb82f58b6 8bf94335 example cache run runninged3665f5 8bf94335 example cache run running24cfd201 8bf94335 example cache run running
You will note that in the above examples, the Allocations output contains columns labeled Desired Status and Client status.
Desired Status represents the goal of the scheduler on the allocation with the following valid statuses:
- run: The allocation should run
- stop: The allocation should stop
Client Status represents the emergent state of the allocation and include the following:
pending: The allocation is pending and will be running
running: The allocation is currently running
complete: The allocation was running and completed successfully
failed: The allocation was running and completed with a non-zero exit code
lost: The node that was running the allocation has failed or has been partitioned
Using -stats
to see detailed to resource usage information on the node:
$ nomad node status -stats c754da1fID = c754da1fName = nomad-client01Class = <none>DC = dc1Drain = falseStatus = readyUptime = 17h7m41s DriversDriver Detected Healthydocker false falseexec true truejava true trueqemu true trueraw_exec true truerkt true true Node EventsTime Subsystem Message2018-03-29T17:24:42Z Driver: docker Driver docker is not detected2018-03-29T17:23:42Z Cluster Node registered Allocated ResourcesCPU Memory Disk2500/2600 MHz 1.3 GiB/2.0 GiB 1.5 GiB/32 GiB Allocation Resource UtilizationCPU Memory2200/2600 MHz 1.7 GiB/2.0 GiB Host Resource UtilizationCPU Memory Disk2430/3000 MHz 1.8 GiB/2.4 GiB 3.9 GiB/40 GiB CPU StatsCPU = cpu0User = 96.94%System = 1.02%Idle = 2.04% CPU = cpu1User = 97.92%System = 2.08%Idle = 0.00% Memory StatsTotal = 2.4 GiBAvailable = 612 MiBUsed = 1.8 GiBFree = 312 MiB Disk StatsDevice = /dev/mapper/ubuntu--14--vg-rootMountPoint = /Size = 38 GiBUsed = 3.9 GiBAvailable = 32 GiBUsed Percent = 10.31%Inodes Percent = 3.85% Device = /dev/sda1MountPoint = /bootSize = 235 MiBUsed = 45 MiBAvailable = 178 MiBUsed Percent = 19.17%Inodes Percent = 0.48% AllocationsID Eval ID Job ID Task Group Desired Status Client Status0b8b9e37 8bf94335 example cache run runningb206088c 8bf94335 example cache run runningb82f58b6 8bf94335 example cache run runninged3665f5 8bf94335 example cache run running24cfd201 8bf94335 example cache run running
To view verbose information about the node:
$ nomad node status -verbose c754da1fID = c754da1f-6337-b86d-47dc-2ef4c71aca14Name = nomadClass = <none>DC = dc1Drain = falseStatus = readyUptime = 17h7m41s Host VolumesName ReadOnly Source CSI VolumesID Name Plugin ID Schedulable Access Mode Mount Options402f2c83 vol plug true single-node-writer <none> DriversDriver Detected Healthy Message Timedocker false false Driver docker is not detected 2018-03-29T17:24:42Zexec true true <none> 2018-03-29T17:23:42Zjava true true <none> 2018-03-29T17:23:41Zqemu true true <none> 2018-03-29T17:23:41Zraw_exec true true <none> 2018-03-29T17:23:42Zrkt true true <none> 2018-03-29T17:23:42Z Node EventsTime Subsystem Message Details2018-03-29T17:24:42Z Driver: docker Driver docker is not detected driver: docker,2018-03-29T17:23:42Z Cluster Node registered <none> Allocated ResourcesCPU Memory Disk2500/2600 MHz 1.3 GiB/2.0 GiB 1.5 GiB/32 GiB Allocation Resource UtilizationCPU Memory2200/2600 MHz 1.7 GiB/2.0 GiB Host Resource UtilizationCPU Memory Disk230/3000 MHz 121 MiB/2.4 GiB 6.5 GiB/40 GiB AllocationsID Eval ID Job ID Task Group Desired Status Client Status3d743cff-8d57-18c3-2260-a41d3f6c5204 2fb686da-b2b0-f8c2-5d57-2be5600435bd example cache run complete Attributesarch = amd64cpu.frequency = 1300.000000cpu.modelname = Intel(R) Core(TM) M-5Y71 CPU @ 1.20GHzcpu.numcores = 2cpu.totalcompute = 2600.000000driver.docker = 1driver.docker.version = 1.10.3driver.exec = 1driver.java = 1driver.java.runtime = OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.2)driver.java.version = 1.7.0_95driver.java.vm = OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)driver.qemu = 1driver.qemu.version = 2.0.0driver.raw_exec = 1driver.rkt = 1driver.rkt.appc.version = 0.7.4driver.rkt.version = 1.2.0hostname = nomadkernel.name = linuxkernel.version = 3.19.0-25-genericmemory.totalbytes = 2094473216nomad.revision = '270da7a60ccbf39eeeadc4064a59ca06bf9ac6fc+CHANGES'nomad.version = 0.3.2devos.name = ubuntuos.version = 14.04unique.cgroup.mountpoint = /sys/fs/cgroupunique.network.ip-address = 127.0.0.1unique.storage.bytesfree = 36044333056unique.storage.bytestotal = 41092214784unique.storage.volume = /dev/mapper/ubuntu--14--vg-root