Update node-status docs
This commit is contained in:
parent
0de6735c22
commit
fc8254d157
|
@ -40,9 +40,9 @@ Usage: nomad node-status [options] <node>
|
||||||
returned includes only nodes which jobs may be scheduled to, and
|
returned includes only nodes which jobs may be scheduled to, and
|
||||||
includes status and other high-level information.
|
includes status and other high-level information.
|
||||||
|
|
||||||
If a node ID is passed, information for that specific node will
|
If a node ID is passed, information for that specific node will be displayed,
|
||||||
be displayed. If no node ID's are passed, then a short-hand
|
including resource usage statistics. If no node ID's are passed, then a
|
||||||
list of all nodes will be displayed. The -self flag is useful to
|
short-hand list of all nodes will be displayed. The -self flag is useful to
|
||||||
quickly access the status of the local node.
|
quickly access the status of the local node.
|
||||||
|
|
||||||
General Options:
|
General Options:
|
||||||
|
@ -51,21 +51,21 @@ General Options:
|
||||||
|
|
||||||
Node Status Options:
|
Node Status Options:
|
||||||
|
|
||||||
|
-self
|
||||||
|
Query the status of the local node.
|
||||||
|
|
||||||
|
-stats
|
||||||
|
Display detailed resource usage statistics.
|
||||||
|
|
||||||
|
-allocs
|
||||||
|
Display a count of running allocations for each node.
|
||||||
|
|
||||||
-short
|
-short
|
||||||
Display short output. Used only when a single node is being
|
Display short output. Used only when a single node is being
|
||||||
queried, and drops verbose output about node allocations.
|
queried, and drops verbose output about node allocations.
|
||||||
|
|
||||||
-verbose
|
-verbose
|
||||||
Display full information.
|
Display full information.
|
||||||
|
|
||||||
-stats
|
|
||||||
Display detailed resource usage statistics
|
|
||||||
|
|
||||||
-self
|
|
||||||
Query the status of the local node.
|
|
||||||
|
|
||||||
-allocs
|
|
||||||
Display a count of running allocations for each node.
|
|
||||||
`
|
`
|
||||||
return strings.TrimSpace(helpText)
|
return strings.TrimSpace(helpText)
|
||||||
}
|
}
|
||||||
|
@ -225,7 +225,7 @@ func (c *NodeStatusCommand) formatNode(client *api.Client, node *api.Node) int {
|
||||||
|
|
||||||
// Format the header output
|
// Format the header output
|
||||||
basic := []string{
|
basic := []string{
|
||||||
fmt.Sprintf("Node ID|%s", limit(node.ID, c.length)),
|
fmt.Sprintf("ID|%s", limit(node.ID, c.length)),
|
||||||
fmt.Sprintf("Name|%s", node.Name),
|
fmt.Sprintf("Name|%s", node.Name),
|
||||||
fmt.Sprintf("Class|%s", node.NodeClass),
|
fmt.Sprintf("Class|%s", node.NodeClass),
|
||||||
fmt.Sprintf("DC|%s", node.Datacenter),
|
fmt.Sprintf("DC|%s", node.Datacenter),
|
||||||
|
|
|
@ -23,10 +23,10 @@ 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.
|
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
|
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.
|
particular node will be queried, and detailed information will be displayed,
|
||||||
Otherwise, a list of matching nodes and information will be displayed. If
|
including resource usage statistics. Otherwise, a list of matching nodes and
|
||||||
running the command on a Nomad Client, the -self flag is useful to quickly
|
information will be displayed. If running the command on a Nomad Client, the
|
||||||
access the status of the local node.
|
-self flag is useful to quickly access the status of the local node.
|
||||||
|
|
||||||
## General Options
|
## General Options
|
||||||
|
|
||||||
|
@ -34,11 +34,18 @@ access the status of the local node.
|
||||||
|
|
||||||
## Node Status Options
|
## Node Status Options
|
||||||
|
|
||||||
* `-short`: Display short output. Used only when querying a single node.
|
|
||||||
* `-verbose`: Show full information.
|
|
||||||
* `-allocs`: Show running allocations per node.
|
|
||||||
* `-self`: Query the status of the local node.
|
* `-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.
|
||||||
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
List view:
|
List view:
|
||||||
|
@ -69,6 +76,11 @@ Class = <none>
|
||||||
DC = dc1
|
DC = dc1
|
||||||
Drain = false
|
Drain = false
|
||||||
Status = ready
|
Status = ready
|
||||||
|
Uptime = 17h2m25s
|
||||||
|
|
||||||
|
Allocations
|
||||||
|
ID Eval ID Job ID Task Group Desired Status Client Status
|
||||||
|
0b8b9e37 8bf94335 example cache run running
|
||||||
```
|
```
|
||||||
|
|
||||||
Full output for a single node:
|
Full output for a single node:
|
||||||
|
@ -76,19 +88,28 @@ Full output for a single node:
|
||||||
```
|
```
|
||||||
$ nomad node-status 1f3f03ea
|
$ nomad node-status 1f3f03ea
|
||||||
ID = c754da1f
|
ID = c754da1f
|
||||||
Name = nomad
|
Name = nomad-server01
|
||||||
Class = <none>
|
Class = <none>
|
||||||
DC = dc1
|
DC = dc1
|
||||||
Drain = false
|
Drain = false
|
||||||
Status = ready
|
Status = ready
|
||||||
|
Uptime = 17h42m50s
|
||||||
|
|
||||||
==> Resource Utilization
|
Allocated Resources
|
||||||
CPU Memory MB Disk MB IOPS
|
CPU Memory Disk IOPS
|
||||||
0/2600 0/1997 0/34374 0/0
|
500/2600 256 MiB/2.0 GiB 300 MiB/32 GiB 0/0
|
||||||
|
|
||||||
==> Allocations
|
Allocation Resource Utilization
|
||||||
|
CPU Memory
|
||||||
|
430/2600 199 MiB/2.0 GiB
|
||||||
|
|
||||||
|
Host Resource Utilization
|
||||||
|
CPU Memory Disk
|
||||||
|
513/3000 551 MiB/2.4 GiB 4.2 GiB/52 GiB
|
||||||
|
|
||||||
|
Allocations
|
||||||
ID Eval ID Job ID Task Group Desired Status Client Status
|
ID Eval ID Job ID Task Group Desired Status Client Status
|
||||||
3d743cff 2fb686da example cache run complete
|
7bff7214 b3a6b9d2 example cache run running
|
||||||
```
|
```
|
||||||
|
|
||||||
Using `-self` when on a Nomad Client:
|
Using `-self` when on a Nomad Client:
|
||||||
|
@ -96,19 +117,99 @@ Using `-self` when on a Nomad Client:
|
||||||
```
|
```
|
||||||
$ nomad node-status -self
|
$ nomad node-status -self
|
||||||
ID = c754da1f
|
ID = c754da1f
|
||||||
Name = nomad
|
Name = nomad-client01
|
||||||
Class = <none>
|
Class = <none>
|
||||||
DC = dc1
|
DC = dc1
|
||||||
Drain = false
|
Drain = false
|
||||||
Status = ready
|
Status = ready
|
||||||
|
Uptime = 17h7m41s
|
||||||
|
|
||||||
==> Resource Utilization
|
Allocated Resources
|
||||||
CPU Memory MB Disk MB IOPS
|
CPU Memory Disk IOPS
|
||||||
0/2600 0/1997 0/34374 0/0
|
2500/2600 1.3 GiB/2.0 GiB 1.5 GiB/32 GiB 0/0
|
||||||
|
|
||||||
==> Allocations
|
Allocation Resource Utilization
|
||||||
|
CPU Memory
|
||||||
|
2200/2600 1.7 GiB/2.0 GiB
|
||||||
|
|
||||||
|
Host Resource Utilization
|
||||||
|
CPU Memory Disk
|
||||||
|
2430/3000 1.8 GiB/2.4 GiB 6.5 GiB/40 GiB
|
||||||
|
|
||||||
|
Allocations
|
||||||
ID Eval ID Job ID Task Group Desired Status Client Status
|
ID Eval ID Job ID Task Group Desired Status Client Status
|
||||||
3d743cff 2fb686da example cache run complete
|
0b8b9e37 8bf94335 example cache run running
|
||||||
|
b206088c 8bf94335 example cache run running
|
||||||
|
b82f58b6 8bf94335 example cache run running
|
||||||
|
ed3665f5 8bf94335 example cache run running
|
||||||
|
24cfd201 8bf94335 example cache run running
|
||||||
|
```
|
||||||
|
|
||||||
|
Using `-stats` to see detailed to resource usage information on the node:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ nomad node-status -stats c754da1f
|
||||||
|
ID = c754da1f
|
||||||
|
Name = nomad-client01
|
||||||
|
Class = <none>
|
||||||
|
DC = dc1
|
||||||
|
Drain = false
|
||||||
|
Status = ready
|
||||||
|
Uptime = 17h7m41s
|
||||||
|
|
||||||
|
Allocated Resources
|
||||||
|
CPU Memory Disk IOPS
|
||||||
|
2500/2600 1.3 GiB/2.0 GiB 1.5 GiB/32 GiB 0/0
|
||||||
|
|
||||||
|
Allocation Resource Utilization
|
||||||
|
CPU Memory
|
||||||
|
2200/2600 1.7 GiB/2.0 GiB
|
||||||
|
|
||||||
|
Host Resource Utilization
|
||||||
|
CPU Memory Disk
|
||||||
|
2430/3000 1.8 GiB/2.4 GiB 3.9 GiB/40 GiB
|
||||||
|
|
||||||
|
CPU Stats
|
||||||
|
CPU = cpu0
|
||||||
|
User = 96.94%
|
||||||
|
System = 1.02%
|
||||||
|
Idle = 2.04%
|
||||||
|
|
||||||
|
CPU = cpu1
|
||||||
|
User = 97.92%
|
||||||
|
System = 2.08%
|
||||||
|
Idle = 0.00%
|
||||||
|
|
||||||
|
Memory Stats
|
||||||
|
Total = 2.4 GiB
|
||||||
|
Available = 612 MiB
|
||||||
|
Used = 1.8 GiB
|
||||||
|
Free = 312 MiB
|
||||||
|
|
||||||
|
Disk Stats
|
||||||
|
Device = /dev/mapper/ubuntu--14--vg-root
|
||||||
|
MountPoint = /
|
||||||
|
Size = 38 GiB
|
||||||
|
Used = 3.9 GiB
|
||||||
|
Available = 32 GiB
|
||||||
|
Used Percent = 10.31%
|
||||||
|
Inodes Percent = 3.85%
|
||||||
|
|
||||||
|
Device = /dev/sda1
|
||||||
|
MountPoint = /boot
|
||||||
|
Size = 235 MiB
|
||||||
|
Used = 45 MiB
|
||||||
|
Available = 178 MiB
|
||||||
|
Used Percent = 19.17%
|
||||||
|
Inodes Percent = 0.48%
|
||||||
|
|
||||||
|
Allocations
|
||||||
|
ID Eval ID Job ID Task Group Desired Status Client Status
|
||||||
|
0b8b9e37 8bf94335 example cache run running
|
||||||
|
b206088c 8bf94335 example cache run running
|
||||||
|
b82f58b6 8bf94335 example cache run running
|
||||||
|
ed3665f5 8bf94335 example cache run running
|
||||||
|
24cfd201 8bf94335 example cache run running
|
||||||
```
|
```
|
||||||
|
|
||||||
To view verbose information about the node:
|
To view verbose information about the node:
|
||||||
|
@ -121,16 +222,25 @@ Class = <none>
|
||||||
DC = dc1
|
DC = dc1
|
||||||
Drain = false
|
Drain = false
|
||||||
Status = ready
|
Status = ready
|
||||||
|
Uptime = 17h7m41s
|
||||||
|
|
||||||
==> Resource Utilization
|
Allocated Resources
|
||||||
CPU Memory MB Disk MB IOPS
|
CPU Memory Disk IOPS
|
||||||
0/2600 0/1997 0/34374 0/0
|
2500/2600 1.3 GiB/2.0 GiB 1.5 GiB/32 GiB 0/0
|
||||||
|
|
||||||
==> Allocations
|
Allocation Resource Utilization
|
||||||
|
CPU Memory
|
||||||
|
2200/2600 1.7 GiB/2.0 GiB
|
||||||
|
|
||||||
|
Host Resource Utilization
|
||||||
|
CPU Memory Disk
|
||||||
|
230/3000 121 MiB/2.4 GiB 6.5 GiB/40 GiB
|
||||||
|
|
||||||
|
Allocations
|
||||||
ID Eval ID Job ID Task Group Desired Status Client Status
|
ID Eval ID Job ID Task Group Desired Status Client Status
|
||||||
3d743cff-8d57-18c3-2260-a41d3f6c5204 2fb686da-b2b0-f8c2-5d57-2be5600435bd example cache run complete
|
3d743cff-8d57-18c3-2260-a41d3f6c5204 2fb686da-b2b0-f8c2-5d57-2be5600435bd example cache run complete
|
||||||
|
|
||||||
==> Attributes
|
Attributes
|
||||||
arch = amd64
|
arch = amd64
|
||||||
cpu.frequency = 1300.000000
|
cpu.frequency = 1300.000000
|
||||||
cpu.modelname = Intel(R) Core(TM) M-5Y71 CPU @ 1.20GHz
|
cpu.modelname = Intel(R) Core(TM) M-5Y71 CPU @ 1.20GHz
|
||||||
|
|
Loading…
Reference in a new issue