9.2 Advanced Debugging Techniques

1. Analyzing Node Logs

Spicenet nodes output detailed logs that can be crucial for troubleshooting:

  1. View real-time logs:

tail -f /path/to/spicenet/log/node.log
  1. Search for error messages:

grep -i error /path/to/spicenet/log/node.log
  1. Analyze log patterns:

awk '/pattern/ {print $0}' /path/to/spicenet/log/node.log

2. Monitoring System Resources

Use these commands to get a detailed view of system resource usage:

  1. Overall system status:

htop
  1. Disk usage:

df -h
  1. Network statistics:

netstat -tuln

3. Debugging Transaction Issues

If specific transactions are failing:

  1. Retrieve transaction details:

curl -s http://localhost:12346/ledger/txs/TRANSACTION_HASH | jq
  1. Check transaction status:

./target/debug/sov-cli transactions status TRANSACTION_HASH
  1. Verify account balances:

curl -s http://localhost:12346/modules/bank/tokens/TOKEN_ID/balances/ADDRESS | jq

Last updated