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