github.com/hspak/nomad@v0.7.2-0.20180309000617-bc4ae22a39a5/website/source/docs/commands/node-status.html.md.erb (about)

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