github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/agent-info.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: agent-info'
     4  description: |
     5    Display information and status of a running agent.
     6  ---
     7  
     8  # Command: agent-info
     9  
    10  The `agent-info` command dumps metrics and status information of a running
    11  agent. The information displayed pertains to the specific agent the CLI
    12  is connected to. This is useful for troubleshooting and performance monitoring.
    13  
    14  ## Usage
    15  
    16  ```plaintext
    17  nomad agent-info [options]
    18  ```
    19  
    20  When ACLs are enabled, this command requires a token with the `agent:read`
    21  capability.
    22  
    23  ## General Options
    24  
    25  @include 'general_options_no_namespace.mdx'
    26  
    27  ## Agent Info Options
    28  
    29  - `-json` : Output agent info in its JSON format.
    30  - `-t` : Format and display agent info using a Go template.
    31  
    32  ## Output
    33  
    34  Depending on the agent queried, information from different subsystems is
    35  returned. These subsystems are described below:
    36  
    37  - client - Status of the local Nomad client
    38  - nomad - Status of the local Nomad server
    39  - serf - Gossip protocol metrics and information
    40  - raft - Status information about the Raft consensus protocol
    41  - runtime - Various metrics from the runtime environment
    42  
    43  ## Examples
    44  
    45  ```shell-session
    46  $ nomad agent-info
    47  raft
    48    commit_index = 0
    49    fsm_pending = 0
    50    last_contact = never
    51    last_snapshot_term = 0
    52    state = Follower
    53    term = 0
    54    applied_index = 0
    55    last_log_index = 0
    56    last_log_term = 0
    57    last_snapshot_index = 0
    58    num_peers = 0
    59  runtime
    60    cpu_count = 4
    61    goroutines = 43
    62    kernel.name = darwin
    63    max_procs = 4
    64    version = go1.5
    65    arch = amd64
    66  serf
    67    intent_queue = 0
    68    member_time = 1
    69    query_queue = 0
    70    event_time = 1
    71    event_queue = 0
    72    failed = 0
    73    left = 0
    74    members = 1
    75    query_time = 1
    76    encrypted = false
    77  client
    78    heartbeat_ttl = 0
    79    known_servers = 0
    80    last_heartbeat = 9223372036854775807
    81    num_allocations = 0
    82  nomad
    83    bootstrap = false
    84    known_regions = 1
    85    leader = false
    86    server = true
    87  ```