github.com/adityamillind98/nomad@v0.11.8/website/pages/docs/commands/node/status.mdx (about) 1 --- 2 layout: docs 3 page_title: 'Commands: node status' 4 sidebar_title: status 5 description: | 6 The node status command is used to display information about nodes. 7 --- 8 9 # Command: node status 10 11 The `node status` command is used to display information about client nodes. A 12 node must first be registered with the servers before it will be visible in this 13 output. 14 15 ## Usage 16 17 ```plaintext 18 nomad node status [options] [node] 19 ``` 20 21 If no node ID is passed, then the command will enter "list mode" and dump a 22 high-level list of all known nodes. This list output contains less information 23 but is a good way to get a bird's-eye view of things. 24 25 If there is an exact match based on the provided node ID or prefix, then that 26 particular node will be queried, and detailed information will be displayed, 27 including resource usage statistics. Otherwise, a list of matching nodes and 28 information will be displayed. If running the command on a Nomad Client, the 29 `-self` flag is useful to quickly access the status of the local node. 30 31 ## General Options 32 33 @include 'general_options.mdx' 34 35 ## Status Options 36 37 - `-self`: Query the status of the local node. 38 39 - `-stats`: Display detailed resource usage statistics. 40 41 - `-allocs`: When a specific node is not being queried, shows the number of 42 running allocations per node. 43 44 - `-short`: Display short output. Used only when querying a single node. 45 46 - `-verbose`: Show full information. 47 48 - `-json` : Output the node in its JSON format. 49 50 - `-t` : Format and display node using a Go template. 51 52 ## Examples 53 54 List view: 55 56 ```shell-session 57 $ nomad node status 58 ID DC Name Class Drain Eligibility Status 59 a72dfba2 dc1 node1 <none> false eligible ready 60 1f3f03ea dc1 node2 <none> false eligible ready 61 ``` 62 63 List view, with running allocations: 64 65 ```shell-session 66 $ nomad node status -allocs 67 ID DC Name Class Drain Eligibility Status Running Allocs 68 4d2ba53b dc1 node1 <none> false eligible ready 1 69 34dfba32 dc1 node2 <none> false eligible ready 3 70 ``` 71 72 Single-node view in short mode: 73 74 ```shell-session 75 $ nomad node status -short 1f3f03ea 76 ID = c754da1f 77 Name = nomad 78 Class = <none> 79 DC = dc1 80 Drain = false 81 Status = ready 82 Uptime = 17h2m25s 83 84 Allocations 85 ID Eval ID Job ID Task Group Desired Status Client Status 86 0b8b9e37 8bf94335 example cache run running 87 ``` 88 89 Full output for a single node: 90 91 ```shell-session 92 $ nomad node status 1f3f03ea 93 ID = c754da1f 94 Name = nomad-server01 95 Class = <none> 96 DC = dc1 97 Drain = false 98 Status = ready 99 Uptime = 17h42m50s 100 101 Drivers 102 Driver Detected Healthy 103 docker false false 104 exec true true 105 java true true 106 qemu true true 107 raw_exec true true 108 rkt true true 109 110 Node Events 111 Time Subsystem Message 112 2018-03-29T17:24:42Z Driver: docker Driver docker is not detected 113 2018-03-29T17:23:42Z Cluster Node registered 114 115 Allocated Resources 116 CPU Memory Disk 117 500/2600 MHz 256 MiB/2.0 GiB 300 MiB/32 GiB 118 119 Allocation Resource Utilization 120 CPU Memory 121 430/2600 MHz 199 MiB/2.0 GiB 122 123 Host Resource Utilization 124 CPU Memory Disk 125 513/3000 MHz 551 MiB/2.4 GiB 4.2 GiB/52 GiB 126 127 Allocations 128 ID Eval ID Job ID Task Group Desired Status Client Status 129 7bff7214 b3a6b9d2 example cache run running 130 ``` 131 132 Using `-self` when on a Nomad Client: 133 134 ```shell-session 135 $ nomad node status -self 136 ID = c754da1f 137 Name = nomad-client01 138 Class = <none> 139 DC = dc1 140 Drain = false 141 Status = ready 142 Uptime = 17h7m41s 143 144 Drivers 145 Driver Detected Healthy 146 docker false false 147 exec true true 148 java true true 149 qemu true true 150 raw_exec true true 151 rkt true true 152 153 Node Events 154 Time Subsystem Message 155 2018-03-29T17:24:42Z Driver: docker Driver docker is not detected 156 2018-03-29T17:23:42Z Cluster Node registered 157 158 Allocated Resources 159 CPU Memory Disk 160 2500/2600 MHz 1.3 GiB/2.0 GiB 1.5 GiB/32 GiB 161 162 Allocation Resource Utilization 163 CPU Memory 164 2200/2600 MHz 1.7 GiB/2.0 GiB 165 166 Host Resource Utilization 167 CPU Memory Disk 168 2430/3000 MHz 1.8 GiB/2.4 GiB 6.5 GiB/40 GiB 169 170 Allocations 171 ID Eval ID Job ID Task Group Desired Status Client Status 172 0b8b9e37 8bf94335 example cache run running 173 b206088c 8bf94335 example cache run running 174 b82f58b6 8bf94335 example cache run running 175 ed3665f5 8bf94335 example cache run running 176 24cfd201 8bf94335 example cache run running 177 ``` 178 179 You will note that in the above examples, the **Allocations** output contains 180 columns labeled **Desired Status** and **Client status**. 181 182 Desired Status represents the goal of the scheduler on the allocation with 183 the following valid statuses: 184 185 - _run_: The allocation should run 186 - _stop_: The allocation should stop 187 188 Client Status represents the emergent state of the allocation and include 189 the following: 190 191 - _pending_: The allocation is pending and will be running 192 193 - _running_: The allocation is currently running 194 195 - _complete_: The allocation was running and completed successfully 196 197 - _failed_: The allocation was running and completed with a non-zero exit code 198 199 - _lost_: The node that was running the allocation has failed or has been 200 partitioned 201 202 Using `-stats` to see detailed to resource usage information on the node: 203 204 ```shell-session 205 $ nomad node status -stats c754da1f 206 ID = c754da1f 207 Name = nomad-client01 208 Class = <none> 209 DC = dc1 210 Drain = false 211 Status = ready 212 Uptime = 17h7m41s 213 214 Drivers 215 Driver Detected Healthy 216 docker false false 217 exec true true 218 java true true 219 qemu true true 220 raw_exec true true 221 rkt true true 222 223 Node Events 224 Time Subsystem Message 225 2018-03-29T17:24:42Z Driver: docker Driver docker is not detected 226 2018-03-29T17:23:42Z Cluster Node registered 227 228 Allocated Resources 229 CPU Memory Disk 230 2500/2600 MHz 1.3 GiB/2.0 GiB 1.5 GiB/32 GiB 231 232 Allocation Resource Utilization 233 CPU Memory 234 2200/2600 MHz 1.7 GiB/2.0 GiB 235 236 Host Resource Utilization 237 CPU Memory Disk 238 2430/3000 MHz 1.8 GiB/2.4 GiB 3.9 GiB/40 GiB 239 240 CPU Stats 241 CPU = cpu0 242 User = 96.94% 243 System = 1.02% 244 Idle = 2.04% 245 246 CPU = cpu1 247 User = 97.92% 248 System = 2.08% 249 Idle = 0.00% 250 251 Memory Stats 252 Total = 2.4 GiB 253 Available = 612 MiB 254 Used = 1.8 GiB 255 Free = 312 MiB 256 257 Disk Stats 258 Device = /dev/mapper/ubuntu--14--vg-root 259 MountPoint = / 260 Size = 38 GiB 261 Used = 3.9 GiB 262 Available = 32 GiB 263 Used Percent = 10.31% 264 Inodes Percent = 3.85% 265 266 Device = /dev/sda1 267 MountPoint = /boot 268 Size = 235 MiB 269 Used = 45 MiB 270 Available = 178 MiB 271 Used Percent = 19.17% 272 Inodes Percent = 0.48% 273 274 Allocations 275 ID Eval ID Job ID Task Group Desired Status Client Status 276 0b8b9e37 8bf94335 example cache run running 277 b206088c 8bf94335 example cache run running 278 b82f58b6 8bf94335 example cache run running 279 ed3665f5 8bf94335 example cache run running 280 24cfd201 8bf94335 example cache run running 281 ``` 282 283 To view verbose information about the node: 284 285 ```shell-session 286 $ nomad node status -verbose c754da1f 287 ID = c754da1f-6337-b86d-47dc-2ef4c71aca14 288 Name = nomad 289 Class = <none> 290 DC = dc1 291 Drain = false 292 Status = ready 293 Uptime = 17h7m41s 294 295 Host Volumes 296 Name ReadOnly Source 297 298 CSI Volumes 299 ID Name Plugin ID Schedulable Access Mode Mount Options 300 402f2c83 vol plug true single-node-writer <none> 301 302 Drivers 303 Driver Detected Healthy Message Time 304 docker false false Driver docker is not detected 2018-03-29T17:24:42Z 305 exec true true <none> 2018-03-29T17:23:42Z 306 java true true <none> 2018-03-29T17:23:41Z 307 qemu true true <none> 2018-03-29T17:23:41Z 308 raw_exec true true <none> 2018-03-29T17:23:42Z 309 rkt true true <none> 2018-03-29T17:23:42Z 310 311 Node Events 312 Time Subsystem Message Details 313 2018-03-29T17:24:42Z Driver: docker Driver docker is not detected driver: docker, 314 2018-03-29T17:23:42Z Cluster Node registered <none> 315 316 Allocated Resources 317 CPU Memory Disk 318 2500/2600 MHz 1.3 GiB/2.0 GiB 1.5 GiB/32 GiB 319 320 Allocation Resource Utilization 321 CPU Memory 322 2200/2600 MHz 1.7 GiB/2.0 GiB 323 324 Host Resource Utilization 325 CPU Memory Disk 326 230/3000 MHz 121 MiB/2.4 GiB 6.5 GiB/40 GiB 327 328 Allocations 329 ID Eval ID Job ID Task Group Desired Status Client Status 330 3d743cff-8d57-18c3-2260-a41d3f6c5204 2fb686da-b2b0-f8c2-5d57-2be5600435bd example cache run complete 331 332 Attributes 333 arch = amd64 334 cpu.frequency = 1300.000000 335 cpu.modelname = Intel(R) Core(TM) M-5Y71 CPU @ 1.20GHz 336 cpu.numcores = 2 337 cpu.totalcompute = 2600.000000 338 driver.docker = 1 339 driver.docker.version = 1.10.3 340 driver.exec = 1 341 driver.java = 1 342 driver.java.runtime = OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.2) 343 driver.java.version = 1.7.0_95 344 driver.java.vm = OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode) 345 driver.qemu = 1 346 driver.qemu.version = 2.0.0 347 driver.raw_exec = 1 348 driver.rkt = 1 349 driver.rkt.appc.version = 0.7.4 350 driver.rkt.version = 1.2.0 351 hostname = nomad 352 kernel.name = linux 353 kernel.version = 3.19.0-25-generic 354 memory.totalbytes = 2094473216 355 nomad.revision = '270da7a60ccbf39eeeadc4064a59ca06bf9ac6fc+CHANGES' 356 nomad.version = 0.3.2dev 357 os.name = ubuntu 358 os.version = 14.04 359 unique.cgroup.mountpoint = /sys/fs/cgroup 360 unique.network.ip-address = 127.0.0.1 361 unique.storage.bytesfree = 36044333056 362 unique.storage.bytestotal = 41092214784 363 unique.storage.volume = /dev/mapper/ubuntu--14--vg-root 364 ```