> 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

This page collects the most useful commands for daily Monad node operations.

### Check binary version

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

### Check service status

All at once:

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

One by one:

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

***

### Follow logs

```
journalctl -u monad-bft -f
journalctl -u monad-execution -f
journalctl -u monad-rpc -f
```

***

### Check current block height

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

RPC becomes active after statesync is completed.

***

### Check TrieDB usage

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

TrieDB status output includes used space, history depth, and compaction-related information. The docs note that TrieDB is the dedicated blockchain state device and that its storage behavior is central to node performance.

***

### Check public keys

```
cat /home/monad/pubkey-secp-bls
```

***

### Check node status

Install:

```
curl -sSL https://bucket.monadinfra.com/scripts/monad-status.sh -o /usr/local/bin/monad-status
chmod +x /usr/local/bin/monad-status
```

Run:

```
monad-status
```

***

### Use monlog

Grant journal access:

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

Switch user if needed:

```
su - monad
```

Download:

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

Check SHA:

```
sha256sum ./monlog
```

Run:

```
./monlog
```

Live mode:

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

Recent collected logs:

```
./monlog -r
```

Map SECP keys to validator names:

```
./monlog -n
```

No color mode:

```
./monlog --no-color
```

***

### Use ledger-tail

Start:

```
systemctl start monad-ledger-tail
```

View logs:

```
journalctl -fu monad-ledger-tail
```

***

### Restart services

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

***

### Stop services

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

***

### Start services

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

***

### Enable services on boot

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

***

### Reset workspace

```
bash /opt/monad/scripts/reset-workspace.sh
```

***

### Restore snapshot

```
curl -sSL https://bucket.monadinfra.com/scripts/testnet/restore-from-snapshot.sh | bash
```

***

### Check installed package version

```
apt-cache policy monad
```

***

### Hold package version

```
apt-mark hold monad
```

Remove hold:

```
apt-mark unhold monad
```

***

### Check metrics endpoint

```
curl http://localhost:8889/metrics
```

***

### Check open ports

```
ss -tulpn | grep -E '8000|8001|8080|8889'
```


---

# 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://service.block-pro.net/testnet/monad/useful-commands.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.
