pwrzv

A Rolls-Royce–inspired performance reserve meter for Linux systems. Elegant, minimal, and focused on what really matters: how much performance your machine has left to give.
🛠 What is pwrzv?
Inspired by the Power Reserve gauge in Rolls-Royce cars — which shows how much engine power is still available — pwrzv brings the same philosophy to Linux systems. Instead of showing raw usage, it estimates how much headroom remains in your system's core resources.
It provides a simple 0–5 score, calculated from multiple real-time metrics:
- CPU usage and I/O wait
- Memory availability
- Swap activity
- Disk I/O
- Network throughput
- File descriptor consumption
All inputs are weighted and transformed via sigmoid functions to reflect practical bottlenecks, not just raw numbers.
🚦 Example Output
Basic Usage
)
)
Detailed Analysis
===
)
)
)
📦 Installation
From Source
Using Cargo
🖥️ Platform Support
pwrzv only supports Linux systems. Other platforms will display an error message.
Check platform compatibility:
🔧 Usage
Command Line Interface
# Basic usage
# Detailed component analysis
# JSON output
# YAML output
# Quiet mode (suppress warnings)
# Check platform compatibility
Library Usage
use ;
Detailed Analysis
use ;
Custom Configuration
use ;
📊 Scoring System
The scoring system uses sigmoid functions to map resource utilization to a 0-5 scale:
- 5 (Excellent): Abundant resources, system running smoothly
- 4 (Good): Ample resources available, good performance
- 3 (Moderate): Adequate performance, resources sufficient
- 2 (Low): Resource constrained, consider optimization
- 0-1 (Critical): System under heavy load, immediate attention needed
How It Works
- Resource Collection: Gathers metrics from
/procfilesystem - Normalization: Converts raw metrics to 0-1 scale
- Sigmoid Transformation: Applies configurable thresholds and curves
- Bottleneck Detection: Takes the minimum score (worst resource)
- Final Scoring: Maps to 0-5 range with level descriptions
🧪 Philosophy
While most system monitors highlight how much is used, pwrzv tells you how much is left. This makes it a useful tool for:
- Minimal dashboards - Single metric overview
- Autoscaling decisions - When to scale up/down
- Performance monitoring - Proactive resource management
- System health checks - Quick status assessment
🔄 Examples
Run the included examples:
# Basic usage example
# Detailed analysis with different configurations
PWRZV_JSON_OUTPUT=1
🧪 Testing
# Run all tests
# Run only unit tests
# Run documentation tests
# Run examples
📚 API Documentation
Generate and view the full API documentation:
🤝 Contributing
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass:
cargo test - Submit a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Inspired by the Power Reserve gauge in Rolls-Royce automobiles
- Built with Rust for performance and reliability
- Thanks to the Linux kernel for providing comprehensive
/procmetrics