> For the complete documentation index, see [llms.txt](https://skyneticlabs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://skyneticlabs.gitbook.io/docs/services/mainnet-networks/monad/useful-commands.md).

# Useful commands

### Node Diagnostics & Operational Checks

This section covers day-to-day operational verification and diagnostics for a running Monad node.

***

#### Binary & Runtime Verification

Confirm that the installed binaries match the expected release:

```bash
monad-node --version
monad-rpc --version
```

Expected output example:

```json
{
  "commit": "e1e9489b8fc42c0a5af208bab20f6704f83c91c0",
  "tag": "v0.12.7",
  "branch": "",
  "modified": true
}
```

If versions differ between binaries, verify the package installation and restart services.

***

#### Systemd Service Health

Check that all Monad core services are active and running:

```bash
systemctl is-active monad-bft monad-execution monad-rpc
```

For detailed status information:

```bash
systemctl status monad-bft
systemctl status monad-execution
systemctl status monad-rpc
```

All services must report **active (running)**.

***

#### Log Inspection & Troubleshooting

Follow live logs for each component:

```bash
journalctl -fu monad-bft
journalctl -fu monad-execution
journalctl -fu monad-rpc
```

Common indicators of healthy operation:

* steady block production / reception
* no repeated panic or restart loops
* consistent peer connections

***

#### Sync Progress & Chain Height

After RPC becomes available (default: port 8080), verify sync status:

```bash
curl -s http://localhost:8080 \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
```

The returned block height should continuously increase and converge with network tip.

***

#### TrieDB (MonadDB) Storage Health

Inspect TrieDB allocation and retained history:

```bash
monad-mpt --storage /dev/triedb
```

Operational notes:

* automatic compaction occurs around \~80% utilization
* history retention is managed by monad-cruft
* sudden rapid growth usually indicates misconfigured retention

***

#### Node Snapshot Overview (Quick Status)

For a summarized operational view:

```bash
monad-status
```

This provides:

* binary versions
* sync state
* validator keys presence
* peer count
* consensus state
* RPC availability

Useful for fast sanity checks after restarts or upgrades.

***

#### Consensus & Epoch Visibility (Optional)

To observe live consensus data (epochs, rounds, proposers):

```bash
systemctl start monad-ledger-tail
journalctl -fu monad-ledger-tail
```

This stream is helpful when diagnosing proposer rotation or epoch transitions.

***

#### Advanced Log Analysis (monlog)

`monlog` parses recent BFT logs into a concise health summary.

One-time setup:

```bash
usermod -a -G systemd-journal monad
```

Re-login as `monad`, then:

```bash
cd /home/monad
curl -sSL https://pub-b0d0d7272c994851b4c8af22a766f571.r2.dev/scripts/monlog -O
chmod +x monlog
```

Verify integrity:

```bash
sha256sum monlog
```

Expected checksum:

```
f8a1066d8c093bbdb5f722f5b3d89904c17a76fa01fa1dd62e950f445e88327f
```

Run analysis:

```bash
./monlog
watch -d "./monlog"
```

Optional modes:

* `./monlog -r` — recent log excerpts
* `./monlog -n` — map validator identities
* `./monlog --no-color` — script-friendly output

***

#### Operational Recommendations

* Always verify **service health → logs → block height** in this order
* Avoid changing CLI flags unless explicitly documented
* Monitor TrieDB growth after snapshots or upgrades
* Use `monad-status` for fast checks, logs for root cause analysis
