---
title: "Displaying Total Tx and Pending Tx in gLiveView"
url: https://bkvpool.com/blog/gliveview-total-pending-tx/
date: 2024-01-28
author: Alex BKV
category: Cardano Explained
---

# Displaying Total Tx and Pending Tx in gLiveView

A practical tip for Cardano stake pool operators: how to make gLiveView show the total and pending transaction counts of your node again.


Are you running a Cardano node and noticed that the "Total Tx" and "Pending Tx" metrics aren't showing up in gLiveView? Here's the quick fix!

## The Problem

By default, gLiveView doesn't display transaction metrics because the required tracing isn't enabled in the Cardano node configuration.

You might see:
- Total Tx: N/A
- Pending Tx: N/A
- Processed Tx: 0

## The Solution

Enable `TraceMempool` in your node's configuration file.

### Step 1: Locate Your Config File

Your Cardano node configuration file is typically at:
```bash
/opt/cardano/cnode/files/config.json
```

Or wherever you've installed your node.

### Step 2: Edit the Configuration

Open the config file:
```bash
sudo nano /opt/cardano/cnode/files/config.json
```

### Step 3: Find TraceMempool

Search for `TraceMempool` in the file. It's usually in the section with other trace options.

### Step 4: Enable the Trace

Change the value from `false` to `true`:

**Before:**
```json
"TraceMempool": false,
```

**After:**
```json
"TraceMempool": true,
```

### Step 5: Save and Restart

1. Save the file (Ctrl+X, then Y, then Enter in nano)
2. Restart your Cardano node:

```bash
sudo systemctl restart cardano-node
```

Or if you're using the CNTools scripts:
```bash
./cnode.sh restart
```

## What You'll See

After restarting, gLiveView will now display:

- **Total Tx**: Total number of transactions processed
- **Pending Tx**: Transactions waiting in the mempool
- **Processed Tx**: Running count of processed transactions

This gives you better visibility into your node's transaction processing activity.

## Why This Matters

### For SPOs

Understanding transaction flow helps you:
- Monitor node health
- Identify performance issues
- Verify your node is processing transactions
- Debug mempool-related problems

### For Block Production

During your slot leadership, you'll see:
- Transactions being added to your block
- Mempool activity
- Transaction processing rates

## Performance Impact

Enabling `TraceMempool` has minimal performance impact:
- Slight increase in logging
- Negligible CPU overhead
- Small additional disk writes

The benefits of visibility far outweigh any minor overhead.

## Other Useful Traces

While you're in the config file, consider enabling these other useful traces:

### TraceBlockFetchDecisions
```json
"TraceBlockFetchDecisions": true,
```
Shows block fetching activity.

### TracePeerSelection
```json
"TracePeerSelection": true,
```
Displays peer connection decisions.

### TraceChainDb
```json
"TraceChainDb": false,
```
Keep this false unless debugging, it's very verbose!

## Troubleshooting

### Still Not Showing?

If you still don't see the metrics after enabling TraceMempool:

1. **Verify the restart**: Make sure your node actually restarted
   ```bash
   sudo systemctl status cardano-node
   ```

2. **Check for syntax errors**: JSON is sensitive to commas and brackets
   ```bash
   cat /opt/cardano/cnode/files/config.json | jq .
   ```

3. **Review logs**: Check for error messages
   ```bash
   journalctl -u cardano-node -f
   ```

4. **Update gLiveView**: Ensure you're running the latest version
   ```bash
   cd /opt/cardano/cnode/scripts
   ./guild-deploy.sh -s gliveview
   ```

### Syntax Errors

Common JSON mistakes:
- Missing comma between entries
- Extra comma after last entry
- Mismatched brackets or braces

Use `jq` to validate:
```bash
cat config.json | jq . > /dev/null && echo "Valid JSON" || echo "Invalid JSON"
```

## Example gLiveView Output

With TraceMempool enabled, you'll see something like:

```
Total Tx    : 1,234
Pending Tx  : 5
Processed   : 456,789
```

During busy periods or slot leadership, these numbers will increase.

## Best Practices

### Monitoring

- Check these metrics regularly
- Watch for unusual spikes in pending transactions
- Monitor processing rates during your slots

### Log Management

With additional tracing enabled:
- Set up log rotation
- Monitor disk space
- Archive old logs regularly

### Performance

- Start with just TraceMempool
- Add other traces only if needed
- Disable verbose traces in production

## Additional Resources

### gLiveView Documentation
- GitHub: https://github.com/cardano-community/guild-operators
- Documentation: https://cardano-community.github.io/guild-operators/

### Cardano Node Config
- Official docs: https://docs.cardano.org/
- Configuration examples: GitHub cardano-node repository

## Need Help?

If you're still having issues or want to learn more about Cardano node operations:

- **Twitter**: [@bkvpool](https://twitter.com/bkvpool)

## Conclusion

Enabling TraceMempool is a simple configuration change that provides valuable insights into your Cardano node's transaction processing. It's one of many small optimizations that help you run a more effective stake pool.

Happy monitoring!

---

*Running a Cardano stake pool? Delegate to [BKV] Pool for reliable performance and active community support.*

