# 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 %}


---

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

```
GET https://validators.spicenet.io/troubleshooting/9.2-advanced-debugging-techniques.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
