Files
solana/docs/src/running-validator/validator-monitor.md

48 lines
1.7 KiB
Markdown
Raw Normal View History

---
title: Monitoring a Validator
---
## Check Gossip
Confirm the IP address and **identity pubkey** of your validator is visible in
the gossip network by running:
```bash
solana-gossip spy --entrypoint devnet.solana.com:8001
```
## Check Your Balance
2019-11-13 15:58:14 -07:00
Your account balance should decrease by the transaction fee amount as your
validator submits votes, and increase after serving as the leader. Pass the
`--lamports` are to observe in finer detail:
```bash
solana balance --lamports
```
2019-11-13 15:58:14 -07:00
## Check Vote Activity
The `solana vote-account` command displays the recent voting activity from
your validator:
```bash
solana vote-account ~/vote-account-keypair.json
```
## Get Cluster Info
There are several useful JSON-RPC endpoints for monitoring your validator on the
cluster, as well as the health of the cluster:
```bash
# Similar to solana-gossip, you should see your validator in the list of cluster nodes
2021-05-14 09:45:34 -07:00
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getClusterNodes"}' http://api.devnet.solana.com
# If your validator is properly voting, it should appear in the list of `current` vote accounts. If staked, `stake` should be > 0
2021-05-14 09:45:34 -07:00
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getVoteAccounts"}' http://api.devnet.solana.com
# Returns the current leader schedule
2021-05-14 09:45:34 -07:00
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getLeaderSchedule"}' http://api.devnet.solana.com
# Returns info about the current epoch. slotIndex should progress on subsequent calls.
2021-05-14 09:45:34 -07:00
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"getEpochInfo"}' http://api.devnet.solana.com
```