# 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:

```bash
tail -f /path/to/spicenet/log/node.log
```

2. Search for error messages:

```bash
grep -i error /path/to/spicenet/log/node.log
```

3. Analyze log patterns:

```bash
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:

```bash
htop
```

2. Disk usage:

```bash
df -h
```

3. Network statistics:&#x20;

```bash
netstat -tuln
```

### 3. Debugging Transaction Issues

If specific transactions are failing:

1. Retrieve transaction details:

```bash
curl -s http://localhost:12346/ledger/txs/TRANSACTION_HASH | jq
```

2. Check transaction status:

```
./target/debug/sov-cli transactions status TRANSACTION_HASH
```

3. Verify account balances:

{% code overflow="wrap" %}

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

{% endcode %}
