# Netdata Agent CLI

The `netdatacli` executable offers a straightforward way to manage the Netdata Agent's operations.

It is located in the same directory as the `netdata` binary.

On Windows, `netdatacli` is available alongside the `netdata` executable (typically at `C:\Program Files\Netdata\usr\bin\`) and can send the same management commands to a running Netdata Agent.

Available commands:

| Command                                                                         | Description                                                                                                                                                                                                                                                                                                                                                                             |
|---------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `help`                                                                          | Display usage information and exit.                                                                                                                                                                                                                                                                                                                                                     |
| `reload-health`                                                                 | Reloads the Netdata health configuration, updating alerts based on changes made to configuration files.                                                                                                                                                                                                                                                                                 |
| `reload-labels`                                                                 | Reloads [host labels](/docs/netdata-agent/configuration/organize-systems-metrics-and-alerts.md#create-custom-labels) from netdata.conf.                                                                                                                                                                                                                                                 |
| `reopen-logs`                                                                   | Close and reopen log files.                                                                                                                                                                                                                                                                                                                                                             |
| `shutdown-agent`                                                                | Gracefully shut down the Netdata Agent.                                                                                                                                                                                                                                                                                                                                                 |
| `fatal-agent`                                                                   | Log the current state and forcefully halt the Netdata Agent.                                                                                                                                                                                                                                                                                                                            |
| `reload-claiming-state`                                                         | Reload the Agent's claiming state from disk.                                                                                                                                                                                                                                                                                                                                            |
| `ping`                                                                          | Verifies whether the Agent is ready. Outputs `pong` when the Agent command server can be contacted. Exit code `0` when the Agent is ready to receive commands. Exit code `1` while the Agent is still initializing. Exit code `255` if the Agent is unreachable                                                                                                                         |
| `aclk-state [json]`                                                             | Return the current state of ACLK and Cloud connection. Optionally in JSON.                                                                                                                                                                                                                                                                                                              |
| `dumpconfig`                                                                    | Display the current netdata.conf configuration.                                                                                                                                                                                                                                                                                                                                         |
| `mark-stale-nodes-ephemeral <node_id \| machine_guid \| hostname \| ALL_NODES>` | Marks one or all disconnected nodes, including virtual nodes, as [ephemeral](/docs/nodes-ephemerality.md), while keeping their previously collected metrics data available for queries on both this Netdata Agent dashboard and Netdata Cloud. See notes 1 and 2.                                                                                                                       |
| `remove-stale-node <node_id \| machine_guid \| hostname \| ALL_NODES>`          | Marks one or all disconnected nodes, including virtual nodes, as [ephemeral](/docs/nodes-ephemerality.md), and removes them so that they are no longer available for queries, from both this Netdata Agent dashboard and Netdata Cloud. This is useful to remove decommissioned nodes that have stopped streaming, but for which the Agent still holds metric data. See notes 1 and 3. |
| `version`                                                                       | Display the Netdata Agent version.                                                                                                                                                                                                                                                                                                                                                      |

See also the Netdata daemon [command line options](/src/daemon/README.md#command-line-options).

:::note

1. This also clears any active alerts.
2. The Agent may be configured to [automatically clean up ephemeral nodes](/docs/nodes-ephemerality.md#automatically-removing-ephemeral-nodes) when they have been offline for longer than the configured time interval.
3. If a node is represented by multiple Parent Agents in a HA setup, this command must be executed on each Parent Agent.

:::
