# User Interface

Once the Diagnostic Tool is connected and you've refreshed the web browser, you will be presented with a dashboard displaying various metrics and performance indicators of your Erigon node. These include but are not limited to:

* **CPU Usage:** How much processor power the node is consuming.
* **Memory Usage:** The amount of RAM occupied by the node.
* **Network Stats:** Information about the data being transmitted and received by your node.
* **Block Sync Status:** The current block height your node is synced to and syncing speed.

#### Understanding the Metrics

* **Network Stats** can help you diagnose connectivity issues or bandwidth limitations that might be affecting your node's performance.
* **Block Sync Status** is crucial for understanding how up-to-date your node is with the blockchain.

***

## The status bar

The **status bar** displays essential information about the current active session and the Erigon node being operated.&#x20;

<figure><img src="https://2414554083-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Feeqc6D5KqkgOsOW7j4k6%2Fuploads%2F1k15REPaZsvYp0I9xqtD%2Fimage.png?alt=media&#x26;token=7dd22e4e-1764-41e3-9031-12e3af202add" alt=""><figcaption><p>Current Session and Operating Node</p></figcaption></figure>

It also allows users to quickly switch between different sessions and nodes by clicking on the session or node in the status bar. A popup will then appear with a list of available sessions or nodes to switch between.

&#x20;

<figure><img src="https://github.com/ledgerwatch/diagnostics/raw/main/_images/statusbar/sessions_popup.png" alt="" width="188"><figcaption></figcaption></figure>

<figure><img src="https://github.com/ledgerwatch/diagnostics/raw/main/_images/statusbar/nodes_popup.png" alt=""><figcaption></figcaption></figure>

## Process Tab

### Command

In the **Command** ribbon it is possible to inspect the **command line** arguments that were used to launch the Erigon node.

<figure><img src="https://github.com/ledgerwatch/diagnostics/raw/main/_images/process/cmd_line.png" alt=""><figcaption></figcaption></figure>

### Flags

The **Flags** section provides a comprehensive view of the configuration settings used to start the Erigon node, including command-line arguments and values from the configuration file. This feature is particularly useful when launching Erigon with a configuration file, as the command-line arguments alone may not fully represent the startup settings.

The flags table in the diagnostics application typically consists of three columns:

* **Name**: Indicates the specific configuration option or setting.
* **Value**: Displays the current value assigned to the corresponding flag.
* **Default**: Shows whether the flag was set by the user or is using the default value. A "false" value indicates that the flag was user-defined, while "true" means the flag is using its default value.

By presenting the configuration flags in a tabular format, operators can easily review and understand the settings applied to the Erigon node, including whether they were explicitly defined or are using the default values. This transparency ensures a clear understanding of the node's configuration, facilitating troubleshooting and optimizing performance.

<figure><img src="https://github.com/ledgerwatch/diagnostics/raw/main/_images/process/flags.png" alt=""><figcaption></figcaption></figure>

### Node info

Contains detailed info about the Erigon node.

<figure><img src="https://github.com/ledgerwatch/diagnostics/raw/main/_images/process/node_info.png" alt=""><figcaption></figcaption></figure>

### Sync stages

The Diagnostic Tool enables remote access to the Erigon node's database via the `erigon support` tunnel, providing visibility into the node's synchronization progress by reporting the number of synced blocks per stage. This feature enhances operational oversight and aids in optimizing synchronization performance.

<figure><img src="https://github.com/ledgerwatch/diagnostics/raw/main/_images/process/sync_stages.png" alt="" width="375"><figcaption></figcaption></figure>

### Reorgs

This ribbon display [reorgs](https://www.alchemy.com/overviews/what-is-a-reorg), spotting multiple block headers with the same height but different hashes.&#x20;

<figure><img src="https://github.com/ledgerwatch/diagnostics/raw/main/_images/process/find_reorgs.png" alt="" width="375"><figcaption></figcaption></figure>

## Network Tab

### Peers data

The Diagnostics Tool allows you to collect and view essential information about network peers, enabling you to monitor and manage your network connections effectively. This data includes details about active peers, static peers, total seen peers, and any encountered errors, presented in a tabular format where you can access detailed data for each section by clicking on the respective row.

### **Data Table Overview**

* **Active**: Displays the number of currently active peers in the network.
* **Static**: Indicates the number of static peers defined in your Erigon configuration.
* **Total Seen:** Shows the total number of peers observed during all diagnostics sessions with the current node.
* **Total Errors:** Provides information about any errors or issues encountered with network peers.

<figure><img src="https://2414554083-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Feeqc6D5KqkgOsOW7j4k6%2Fuploads%2FY8p7lLZl6wD6ixdfjtbl%2Fimage.png?alt=media&#x26;token=5ae9e4d7-2069-49bd-9bd5-ca563d6b3245" alt=""><figcaption></figcaption></figure>

By clicking on the **Active**, **Static**, or **Total Seen** Peers table, you can access detailed information about each peer. The peer details table includes the following columns:

* **Peer ID:** A unique identifier for the peer.
* **Type:** Indicates whether the peer is *static*, a *boot node*, or *dynamic*.
* **Status:** Displays the status of the peer, indicating whether it's currently active.
* **Total In** and **Total Out:** Shows the total amount of data sent and received over the network
* **In Speed** and **Out Speed**: display the networking speed of the peer.
* **Errors Count:** Shows the total count of errors encountered with this peer.

This detailed peer information allows you to gain insights into your network connections, helping you troubleshoot and manage your network effectively.

<figure><img src="https://2414554083-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Feeqc6D5KqkgOsOW7j4k6%2Fuploads%2FrKdWA9H93HMrygg9sbQj%2Fimage.png?alt=media&#x26;token=7191acd9-a3ab-423d-9d45-ab0244d1dc0e" alt=""><figcaption></figcaption></figure>

### **Peer Details**

Clicking on a peer row will trigger a pop-up window revealing additional peer details. This window provides insight into the network activities of peers, assisting in troubleshooting, performance optimization, and resource allocation. It offers a straightforward breakdown of peer interactions with the network, enhancing network management and decision-making processes.<br>

<figure><img src="https://2414554083-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Feeqc6D5KqkgOsOW7j4k6%2Fuploads%2FC8NJo73mffXxBo6yjt8G%2Fimage.png?alt=media&#x26;token=e60f0221-c59a-40de-a982-688c9395a03e" alt="" width="375"><figcaption></figcaption></figure>

Under the **Main Info** it is given the unique **ID** of the peer and the total data received (**In**) and sent (**Out**) by the peer.

**Network Usage By Capability** displays the network usage based the capability of the communication channel with the peer.

**Network Usage By Type** contains the specific [protocol messages](https://github.com/ethereum/devp2p/blob/master/caps/eth.md#protocol-messages) with the amount of data received and sent for each type.

## Logs Tab

From this tab it is possible to view and download the node log.

<figure><img src="https://2414554083-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Feeqc6D5KqkgOsOW7j4k6%2Fuploads%2FSm7cCNlsfJgXz1MRzlZc%2Fimage.png?alt=media&#x26;token=6ef5e022-c598-4ad8-a353-b4d1ee34a9e1" alt="" width="278"><figcaption></figcaption></figure>

To view the log click on the log name, to download it click on the downward arrow.

## Data Tab

Operator has the capability to inspect the databases and their tables. This functionality is implemented in the file `internal/erigon_node/remote_db.go`.

<figure><img src="https://github.com/ledgerwatch/diagnostics/raw/main/_images/dbs.png" alt=""><figcaption></figcaption></figure>

## Admin Tab

#### Session Management

* **List Sessions**: View active sessions.
* **Create New Session**: Start a new session.
* **Obtain PIN for Session**: Generate a session PIN for security.

#### Data Management

* **Clear All Data**: Permanently delete all sessions and data. Use with caution:

{% hint style="warning" %}
Diagnostic Tool **updates** may contain breaking changes which will result in crashes. To prevent application crashes it is needed to clear data.

**Data deletion is irreversible.**
{% endhint %}
