> For the complete documentation index, see [llms.txt](https://docs.gxc.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gxc.io/docs/troubleshooting/onyx-troubleshooting-guide/agw_user-cli-command-reference.md).

# agw\_user CLI Command Reference

*agw\_user* is a restricted, non-root command-line account available on the Onyx Edge, giving users a safe way to run basic diagnostic and maintenance commands — collecting tech dumps, restarting services, rebooting, etc. This reference describes each *agw\_user* command.

<details>

<summary><code>change-passwd</code></summary>

Prompts to change the current password for `agw_user`.

Password changes may be restricted if the Onyx Portal manages credentials.

**Usage:** `change-passwd [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

{% hint style="info" %}
**NOTE:** If the password is managed via the Onyx Portal, this command will display a message and exit without allowing a change.
{% endhint %}

**Example:**

```
onyxedge> change-passwd
```

</details>

<details>

<summary><code>collect-tech-dump</code></summary>

Collects a tech dump from the Onyx Edge and saves it to the tech dump directory.

**Usage:** `collect-tech-dump [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> collect-tech-dump
```

</details>

<details>

<summary><code>gw-poweroff</code></summary>

Powers off the Onyx Edge. Requires confirmation before proceeding.

**Usage:** `gw-poweroff [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

{% hint style="info" %}
**NOTE:** You will be prompted to confirm with `y` before the power off is triggered. This action will shut down the gateway immediately.
{% endhint %}

**Example:**

```
onyxedge> gw-poweroff
Power off AGW. Are you sure (y)?
```

</details>

<details>

<summary><code>gw-reboot</code></summary>

Reboots the Onyx Edge. Requires confirmation before proceeding.

**Usage:** `gw-reboot [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

{% hint style="info" %}
**NOTE:** You will be prompted to confirm with `y` before the reboot is triggered.
{% endhint %}

**Example:**

```
onyxedge> gw-reboot
Reboot AGW. Are you sure (y)?
```

</details>

<details>

<summary><code>gw-restart-services</code></summary>

Triggers a full restart of all Onyx Edge services, including networking, subscriber clearing, and Redis flush.

**Usage:** `gw-restart-services [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

{% hint style="info" %}
**NOTE:** This command restarts all services. Use `show-services` to track recovery status afterward.
{% endhint %}

**Example:**

```
onyxedge> gw-restart-services
```

</details>

<details>

<summary><code>gw-rmfile</code></summary>

Removes one or more files from the Onyx Edge. Files are removed using a secure deletion script.

**Usage:** `gw-rmfile [-h] (--techdump | --core | --pcap) <filenames ...>`

**Positional Arguments:**

* `filenames`: One or more file names to remove (basename only, not full path).

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.
* `--techdump`: Remove files from the tech dump directory.
* `--core`: Remove files from the core dump directory.
* `--pcap`: Remove files from the pcap directory.

**Example:**

```
onyxedge> gw-rmfile --techdump techdump-20240101.tar.gz
onyxedge> gw-rmfile --pcap capture01.pcap capture02.pcap
```

</details>

<details>

<summary><code>gw-tcpdump</code></summary>

Captures network traffic on a specified interface and saves it as a `.pcap` file.

**Usage:** `gw-tcpdump [-h] [-c PKTS] [-s SNAPLEN] <interface> <filename> [filters ...]`

**Positional Arguments:**

* `interface`: Network interface to capture on (e.g., `eth0`).
* `filename`: Name of the output file (must not contain invalid characters; `.pcap` extension added automatically if omitted).

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.
* `-c PKTS`: Stop after capturing this many packets.
* `-s SNAPLEN`: Snap length (bytes per packet to capture).
* `filters`: Additional tcpdump filter expressions.

{% hint style="info" %}
**NOTE:** If a file with the given name already exists, you will be prompted to confirm overwriting it.
{% endhint %}

**Example:**

```
onyxedge> gw-tcpdump eth0 capture01
onyxedge> gw-tcpdump -c 1000 -s 128 eth0 capture01 port 443
```

</details>

<details>

<summary><code>scp-to</code></summary>

Copies a file from the Onyx Edge to a remote host using SCP.

**Usage:** `scp-to [-h] (--techdump FILE | --core FILE | --pcap FILE | --ssh-pubkey) <user> <host> <target_path>`

**Positional Arguments:**

* `user`: Remote username.
* `host`: Remote hostname or IP address.
* `target_path`: Destination path on the remote host.

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.
* `--techdump FILE`: Name of the tech dump file to copy.
* `--core FILE`: Name of the core dump file to copy.
* `--pcap FILE`: Name of the pcap file to copy.
* `--ssh-pubkey`: Copy the Onyx Edge's SSH public key.

{% hint style="info" %}
**NOTE:** Host key checking is disabled for this command.
{% endhint %}

**Example:**

```
onyxedge> scp-to --techdump techdump-20240101.tar.gz admin 192.168.1.100 /tmp/
onyxedge> scp-to --ssh-pubkey admin 192.168.1.100 /home/admin/
```

</details>

<details>

<summary><code>show-authkeys</code></summary>

Displays the contents of the `authorized_keys` file for the `agw_user` account.

**Usage:** `show-authkeys [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> show-authkeys
```

</details>

<details>

<summary><code>show-cores</code></summary>

Lists all available core dump files stored on the Onyx Edge.

**Usage:** `show-cores [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> show-cores
```

</details>

<details>

<summary><code>show-enodebs</code></summary>

Displays information about connected eNodeBs (4G base stations).

**Usage:** `show-enodebs [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> show-enodebs
```

</details>

<details>

<summary><code>show-gnodebs</code></summary>

Displays information about connected gNodeBs (5G base stations).

**Usage:** `show-gnodebs [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> show-gnodebs
```

</details>

<details>

<summary><code>show-gw-info</code></summary>

Displays general Onyx Edge gateway information.

**Usage:** `show-gw-info [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> show-gw-info
```

</details>

<details>

<summary><code>show-networking</code></summary>

Displays network information for the Onyx Edge gateway. Supports multiple sub-commands.

**Usage:** `show-networking [-h] {ipv4,routes,links,data-rates} ...`

**Sub-commands:**

`ipv4` — Displays a brief summary of all IPv4 addresses on the gateway.

```
onyxedge> show-networking ipv4
```

`routes` — Displays the current IP routing table.

```
onyxedge> show-networking routes
```

`links summary` — Displays a summary of all network links.

```
onyxedge> show-networking links summary
```

`links detailed <linkname>` — Displays detailed information for a specific network link using `ethtool`.

* `--driver` / `-i`: Show driver information instead of link details.

```
onyxedge> show-networking links detailed eth0
onyxedge> show-networking links detailed --driver eth0
```

`data-rates {nat-path,vlan-path,<ifc>...}` — Displays data rates for network interfaces using `bps`.

* `-n <num_samples>`: Number of samples to collect.
* `-t <duration>`: Duration of the test.
* `-P`: Display packet counts as numbers.

```
onyxedge> show-networking data-rates nat-path
onyxedge> show-networking data-rates vlan-path
onyxedge> show-networking data-rates eth0 eth1
```

</details>

<details>

<summary><code>show-ntp</code></summary>

Displays the current NTP synchronization status.

**Usage:** `show-ntp [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> show-ntp
```

</details>

<details>

<summary><code>show-pc</code></summary>

Displays the status of the last policy controller request and response (sensitive fields excluded).

**Usage:** `show-pc [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> show-pc
```

</details>

<details>

<summary><code>show-pcaps</code></summary>

Lists all available packet capture (`.pcap`) files stored on the gateway.

**Usage:** `show-pcaps [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> show-pcaps
```

</details>

<details>

<summary><code>show-services</code></summary>

Displays the status of all Onyx Edge services.

**Usage:** `show-services [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> show-services
```

</details>

<details>

<summary><code>show-sshkey</code></summary>

Displays the public SSH key (`id_rsa.pub`) for the `agw_user` account.

**Usage:** `show-sshkey [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> show-sshkey
```

</details>

<details>

<summary><code>show-techdump</code></summary>

Lists all available tech dump files stored on the Onyx Edge.

**Usage:** `show-techdump [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> show-techdump
```

</details>

<details>

<summary><code>show-time</code></summary>

Displays the current system date and time.

**Usage:** `show-time [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> show-time
```

</details>

<details>

<summary><code>show-ues</code></summary>

Displays information about connected User Equipment (UE).

**Usage:** `show-ues [-h] {summary,detailed}`

**Positional Arguments:**

* `summary`: Shows a brief summary of all connected UE.
* `detailed`: Shows detailed information for each UE.

**Example:**

```
onyxedge> show-ues summary
onyxedge> show-ues detailed
```

</details>

<details>

<summary><code>test-ap-speedtest</code></summary>

Runs a speed test to a connected AP by IP address.

**Usage:** `test-ap-speedtest [-h] <ip>`

**Positional Arguments:**

* `ip`: IP address of the target AP.

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> test-ap-speedtest 192.168.1.10
```

</details>

<details>

<summary><code>test-checkin</code></summary>

Tests the Onyx Edge's checkin connectivity to the Orchestrator.

**Usage:** `test-checkin [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> test-checkin
```

</details>

<details>

<summary><code>test-dnslookup</code></summary>

Performs a DNS lookup for a given hostname.

**Usage:** `test-dnslookup [-h] [-s SERVER] <host>`

**Positional Arguments:**

* `host`: The hostname to resolve.

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.
* `-s SERVER`: DNS server to use for the lookup. Uses the system default if omitted.

**Example:**

```
onyxedge> test-dnslookup google.com
onyxedge> test-dnslookup -s 8.8.8.8 google.com
```

</details>

<details>

<summary><code>test-network-health</code></summary>

Runs a comprehensive network health check and displays a summary.

**Usage:** `test-network-health [-h]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> test-network-health
```

</details>

<details>

<summary><code>test-ping</code></summary>

Sends ICMP ping packets to a target host.

**Usage:** `test-ping [-h] [-c COUNT] <host>`

**Positional Arguments:**

* `host`: The target hostname or IP address.

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.
* `-c COUNT`: Number of ping packets to send. If omitted, pings continuously.

**Example:**

```
onyxedge> test-ping 8.8.8.8
onyxedge> test-ping -c 5 8.8.8.8
```

</details>

<details>

<summary><code>test-speedtest</code></summary>

Runs a network speed test from the Onyx Edge.

**Usage:** `test-speedtest [-h] [-d] [-s SERVERS] [-p PORT] [-t TEST_DURATION] [-T TEST_TIMEOUT]`

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.
* `-d, --download`: Run a download-only speed test.
* `-s SERVERS`: Specify speed test server(s) to use.
* `-p PORT`: Specify the port to use for the test.
* `-t TEST_DURATION`: Duration of the speed test.
* `-T TEST_TIMEOUT`: Timeout for the speed test.

**Example:**

```
onyxedge> test-speedtest
onyxedge> test-speedtest -d -t 30
```

</details>

<details>

<summary><code>test-tcpconn-any</code></summary>

Tests a TCP connection to any specified host and port.

**Usage:** `test-tcpconn-any [-h] <host> <port>`

**Positional Arguments:**

* `host`: The target hostname or IP address.
* `port`: The target TCP port.

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> test-tcpconn-any controller.example.com 443
```

</details>

<details>

<summary><code>test-tcpconn-std</code></summary>

Tests a TCP connection to a set of standard, pre-configured endpoints.

**Usage:** `test-tcpconn-std [-h] {orc8r,bootstrap,logs-server,pserver,bastion-host,artifactory}`

**Positional Arguments:**

* `orc8r`: Tests connectivity to the Orchestrator.
* `bootstrap`: Tests connectivity to the Bootstrap server.
* `logs-server`: Tests connectivity to the Logs server.
* `pserver`: Tests connectivity to the Policy server.
* `bastion-host`: Tests connectivity to the Bastion host on port 22.
* `artifactory`: Tests connectivity to `artifactory.gxc.io` on port 443.

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.

**Example:**

```
onyxedge> test-tcpconn-std orc8r
onyxedge> test-tcpconn-std bastion-host
```

</details>

<details>

<summary><code>test-traceroute</code></summary>

Traces the network path to a target host.

**Usage:** `test-traceroute [-h] [-m MAXHOPS] <host>`

**Positional Arguments:**

* `host`: The target hostname or IP address.

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.
* `-m MAXHOPS`: Maximum number of hops to trace.

**Example:**

```
onyxedge> test-traceroute 8.8.8.8
onyxedge> test-traceroute -m 20 8.8.8.8
```

</details>

<details>

<summary><code>test-url-any</code></summary>

Tests HTTP/HTTPS connectivity to any specified URL.

**Usage:** `test-url-any [-h] [-x EXPECT_CODE] [-i] <url>`

**Positional Arguments:**

* `url`: The target URL to test.

**Optional Arguments:**

* `-h, --help`: Displays help information for the command.
* `-x EXPECT_CODE`: Expected HTTP response code (default may vary).
* `-i, --insecure`: Skip TLS certificate verification.

**Example:**

```
onyxedge> test-url-any https://example.com
onyxedge> test-url-any -x 200 -i https://example.com
```

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.gxc.io/docs/troubleshooting/onyx-troubleshooting-guide/agw_user-cli-command-reference.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
