> For the complete documentation index, see [llms.txt](https://service.block-pro.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://service.block-pro.net/testnet/monad/useful-commands.md).

# Useful Commands

**Testnet · v0.16.7 · Chain ID `10143`**

Daily checks for the packaged Monad installation. Use [Node Upgrade](https://service.block-pro.net/testnet/monad/node-upgrade.md) when changing the installed release.

## Service operations

### Service status

Confirm consensus, execution and RPC are active.

```bash
sudo systemctl status monad-bft monad-execution monad-rpc --no-pager -l
```

### Start services

Start all three node components.

```bash
sudo systemctl start monad-bft monad-execution monad-rpc
```

### Stop services

Stop all three components before maintenance.

```bash
sudo systemctl stop monad-bft monad-execution monad-rpc
```

### Restart services

Restart the packaged services after an approved configuration change.

```bash
sudo systemctl restart monad-bft monad-execution monad-rpc
```

### Enable startup

Enable the services at boot.

```bash
sudo systemctl enable monad-bft monad-execution monad-rpc
```

### Follow consensus logs

Ctrl+C exits the log view without stopping the service.

```bash
sudo journalctl -u monad-bft -f -o cat
```

### Follow execution logs

Inspect execution progress and errors.

```bash
sudo journalctl -u monad-execution -f -o cat
```

### Follow RPC logs

Inspect requests, startup and RPC errors.

```bash
sudo journalctl -u monad-rpc -f -o cat
```

### Check cleanup timer

Confirm periodic artifact cleanup is enabled.

```bash
sudo systemctl status monad-cruft.timer --no-pager
```

## Version and package

### Binary version

Expect tag `v0.16.7`. The commit field identifies the packaged submodule build.

```bash
monad-rpc -V
```

### Package version

Compare the installed package with available repository versions.

```bash
apt-cache policy monad
```

### Hold the package

Prevent an unattended change to a release intended for another network.

```bash
sudo apt-mark hold monad
```

## Network and synchronization

RPC becomes available after statesync. Compare block progress with an independent Testnet endpoint.

### Check chain ID

Expect 0x279f, which is 10143.

```bash
curl -fsS http://127.0.0.1:8080/ -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' | jq
```

### Check block height

Repeat after a short interval to confirm advancement.

```bash
curl -fsS http://127.0.0.1:8080/ -H 'Content-Type: application/json' \
  --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' | jq
```

### Inspect listening ports

Check consensus ports 8000–8002, RPC 8080 and monitoring ports. Keep RPC and metrics restricted.

```bash
sudo ss -tulpn | grep -E '8000|8001|8002|8080|9143|8889'
```

## TrieDB configuration checks

Packaged installs already use `/dev/triedb`. Custom launchers must pass the **device itself**, not a directory containing it.

### Inspect effective units

Review base units and any local overrides.

```bash
sudo systemctl cat monad-bft monad-execution monad-rpc
```

### Check TrieDB paths

Inspect every matching argument; check custom launchers separately if no match appears.

```bash
sudo systemctl cat monad-bft monad-rpc | grep -- '--triedb-path'
```

### Resolve the device

Confirm the symlink targets the intended database partition.

```bash
ls -l /dev/triedb
```

### Check metrics-file arguments

Execution's --db-stats-file and consensus's --triedb-stats-path must refer to the same path. Packaged units use /home/monad/monad-bft/triedb-stats.

```bash
sudo systemctl cat monad-execution monad-bft | grep -E -- '--db-stats-file|--triedb-stats-path'
```

## Monitoring

### Read native metrics

The native endpoint defaults to port 9143. Restrict it to monitoring clients.

```bash
curl -fsS http://127.0.0.1:9143/metrics
```

Existing collector setups may still expose port 8889. Follow the separate [metrics migration announcement](https://docs.monad.xyz/node-ops/upgrade-instructions/prometheus-metrics-migration) before removing a collector; the upstream page currently asks operators to wait for Foundation approval.

## Recovery

Workspace resets and snapshot restoration discard or replace local state. Use these procedures for recovery. Preserve configuration and identity keys, stop the node and follow the relevant official instructions. The [fresh-node installation guide](https://service.block-pro.net/testnet/monad/node-installation.md#bootstrap-and-start) describes Testnet bootstrap for a new server.

[Official release instructions](https://docs.monad.xyz/node-ops/upgrade-instructions/v0.16.7) · [Node Upgrade](https://service.block-pro.net/testnet/monad/node-upgrade.md)
