# 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'
```
