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