docs.rs failed to build hw-0.2.3
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
hw-0.2.0
English | 简体中文
✨ Features
- 🔄 Multiple Backend Integration - Supports OpenHardwareMonitor, AIDA64, sysinfo and other monitoring solutions
- 🌍 Cross-Platform Support - Full support for Windows, basic support for Linux/MacOS
- 📊 Rich Monitoring Metrics - Comprehensive monitoring of CPU, GPU, Memory, Hard Drive, Motherboard, etc.
- ⚡ Real-time Data Collection - Millisecond-level hardware status monitoring
- 🔌 Unified Interface - Simple command-line tools and Rust API
- 🛠 Extensible Architecture - Easy to extend new monitoring backends
- 📈 Performance Optimization - Low resource usage, efficient data processing
🚀 Quick Start
Install via Cargo
Build from Source
Command Differences:
- data: Only returns current sensor values
- print: Returns complete statistics without validation
- check: Performs value range validation and load testing
10
: Number of tests2000
: Target value3000
: Error range (-1000~5000)100
: CPU load percentage
📖 Features
[]
# All features
= {="0.1"}
# Package all features
= {="0.1",=["build","built"]}
# OHM only
= {="0.1", = false, =["ohm"]}
# Add cli for command line
# Log supports log and tracing, cli defaults to println output
= {="0.1", = false, =["ohm","cli","log"]}
📸 Interface Preview and Command Examples
1. 📖 Click for Rust CLI Usage
2. 📖 Click for Rust OHM CPU Clock Usage
OpenHardwareMonitor Monitoring
CPU Clock Monitoring Example
- data command - Returns current value only
Compiling hw v0.1.2
Finished `dev` profile target in 4.18s
Running `target\x86_64-pc-windows-msvc\debug\hw.exe --api OHM --task data --args CPU Clock`
Started OpenHardwareMonitor.exe with PID: 5332
Loading...
...
--------------------------------
Average(1068MHz 0.0%) Data:1068
Close Load
=== Summary ===
--- Sensor ---
Result: PASS
Data: 1068
Target: 0.0 MHz
Average: 1068.0 MHz
Minimum: 901.2 MHz
Maximum: 1101.5 MHz
Count: 1
Error Count: 0
Load: 0.0%
Average Load: 0.0%
Allowed Error: ±0.0
Allowed Range: 0.0 ~ 0.0 MHz
====================
"content":"1068","status":true,"opts":null}>R
- print command - Returns complete statistics
...
"content":"{\"api\":\"OHM\",\"hw_type\":\"CPU\",\"sensor_type\":\"Clock\",\"res\":\"PASS\",\"data\":\"1102\",\"min\":1101.5174560546875,\"max\":1101.5174560546875,\"avg\":1102.0,\"total\":6609.104736328125,\"samples\":6,\"test_secs\":0,\"error_count\":0,\"load\":{\"min\":0.0,\"max\":0.0,\"avg\":0.0,\"total\":0.0,\"status\":[]},\"status\":[...]}","status":true,"opts":null}>R
- check command - Performs value range validation and load testing
...
--- CPU Status at Second 10 ---
CPU Core #1 - Current=2904.0 MHz Error: ±3000.0
CPU Core #6 - Current=2904.0 MHz Error: ±3000.0
CPU Core #5 - Current=2904.0 MHz Error: ±3000.0
CPU Core #4 - Current=2904.0 MHz Error: ±3000.0
CPU Core #3 - Current=2904.0 MHz Error: ±3000.0
CPU Core #2 - Current=2904.0 MHz Error: ±3000.0
--------------------------------
Average(2904MHz 99.0%) Data:2904
Close Load
=== Summary ===
--- Sensor ---
Result: PASS
Data: 2904
Target: 2000.0 MHz
Average: 2904.0 MHz
Minimum: 2904.0 MHz
Maximum: 2904.0 MHz
Count: 10
Error Count: 0
Load: 100.0%
Average Load: 99.0%
Allowed Error: ±3000.0
Allowed Range: -1000.0 ~ 5000.0 MHz
====================
"content":"{\"api\":\"OHM\",\"hw_type\":\"CPU\",\"sensor_type\":\"Clock\",\"res\":\"PASS\",\"data\":\"2904\",\"min\":2904.000732421875,\"max\":2904.001708984375,\"avg\":2904.0,\"total\":174240.07470703125,\"samples\":60,\"test_secs\":0,\"error_count\":0,\"load\":{\"min\":0.0,\"max\":0.0,\"avg\":99.0,\"total\":5946.0,\"status\":[]},\"status\":[...]}","status":true,"opts":null}>R
# CPU Temperature Monitoring
# CPU Frequency Test (5 times, target 3000MHz, error ±2000MHz, 100% load)
# Fan Speed Test (5 times, target 3000RPM, error ±2000RPM)
3.📖 Click for Rust OS CPU Clock Usage
sysinfo Monitoring
# Overall System Status
# CPU Load Monitoring
4.📖 Click for Rust AIDA64 CPU Voltage Usage
AIDA64 Monitoring
# Memory Usage Monitoring
# CPU Core Voltage Monitoring
X.📖 Click for Rust CoreTemp CPU Voltage Usage
CoreTemp Monitoring
# Memory Usage Monitoring
# CPU Core Voltage Monitoring
5. 📖 Click for Rust OSMore Usage
# Get Complete System Information
# Get Memory Size
# Get CPU Name
# Get Host Name
# Get OS Version
6. 📖 Click for Rust Microsoft Office Usage
# Get Office Version
7. 📖 Click for Rust Microsoft System Activation Usage
# Activate System
# Check System Activation Status and Query Activation Code Cache
8. 📖 Click for Rust Export DLL|SO Dynamic Library Usage
# Export DLL|SO Dynamic Library
# Print File Nodes
# Print File Nodes
9. 📖 Click for Rust PING Usage
# Test PING
# Test PING Nodes
10. 📖 Click for Rust Set DHCP Usage
# Set DHCP ~is_connected means the currently connected network card
11. 📖 Click for Rust Set Static IP Usage
# Set Static IP
# Set DNS
12. 📖 Click for Rust Desktop Usage
# Desktop Nodes
# Print
13. 📖 Click for Rust Drive Usage
# Scan Drives
# Print Drive
# --full Complete data but more resource consuming, recommended to use = and @ for filtering
# Drive Nodes
# Export Drive
# Restart Drive
# Enable Drive
# Disable Drive
# Delete Drive
# Add Drive
# Add Drive Folder
# Check Drive Status
# Print Drive Status
# Print Drive Status Full
# Print Drive Status Nodes
# Print Drive Status Nodes Full
14. 📖 Click for Rust Sync Time Usage
# Sync Time
15. 📖 Click for Rust Network Interface Usage
# "~Less100" Speed less than 100
# "~100" Speed greater than or equal to 100
# "~1000" Speed greater than or equal to 1000
# "~Big1000" Speed greater than or equal to 10000
# "~is_connected" Currently connected
# "~has_dhcp_ip" Has DHCP IP
# Check MAC Duplication and Initialize
# Network Interface
# Network Interface Nodes
16. 📖 Click for Rust Disk Usage
# Get Disk Data
# Get Disk Mount Tree
# Check Disk Load
🚀 Development Progress
Note:
- OpenHardwareMonitor (OHM) and AIDA64 only support Windows platform
- sysinfo supports cross-platform but has limited functionality
- Specific sensor support may vary by hardware
Sensor Type Support Details
Hardware Type Support Details
Third-Party Interface Versions
- OpenHardwareMonitor: v0.9.6
- AIDA64: v7.40.7100
- sysinfo: v0.33
Notes on Third-Party Applications
When using OHM or AIDA64 interface, the program first checks if the process exists;
If not, it checks if OpenHardwareMonitor.exe
or aida64.exe
exists in the current directory
📊 Performance Benchmarks
🦊 Projects Using This Tool
AUTOTEST2.exe
🔭 Why Choose This Tool?
In the field of hardware monitoring, we often face these challenges:
- Large differences in monitoring interfaces across platforms
- Complex sensor data acquisition on Windows
- Rust support
- Lack of unified data access methods
- Cumbersome switching between multiple monitoring tools
- Limited automated testing support
This tool aims to solve these problems by providing:
🎯 Unified Access Interface
- Command Line Tool: Simple and intuitive CLI commands
- Rust API: Native Rust programming interface
- WMI Support: WMI query capability for Windows platform
- Rust Support: Direct LIB calls from Rust
- Unified Data Format: Standardized data output
💻 Seamless Multi-Platform Support
- Windows: Complete sensor support (OHM/AIDA64)
- Linux: Basic system information monitoring (sysinfo)
- MacOS: Basic system information monitoring (sysinfo)
🔌 Rich Integration Capabilities
- Automated Testing: Support for automated hardware testing scenarios
- Data Collection: Flexible data collection and export
- Monitoring Alerts: Configurable threshold monitoring
- Extension Interface: Support for custom monitoring backends
🛠️ Ready to Use
- Zero Configuration: Minimal configuration requirements
- Quick Deployment: Single executable file
- Backward Compatible: Maintains API stability
- Complete Documentation: Detailed usage instructions
📊 Typical Use Cases
-
Hardware Testing
- Product quality validation
- Performance benchmarking
- Stability testing
-
System Monitoring
- Server status monitoring
- Workstation performance analysis
- Temperature control system monitoring
-
Development Debugging
- Hardware driver development
- Performance optimization analysis
- Problem diagnosis
-
Automation Integration
- CI/CD pipeline integration
- Automated test scripts
- Monitoring system integration
💡 Design Philosophy:
- Simplicity first
- Unified interface standards
- Cross-platform compatibility
- Extensible architecture
🙋 Reference Projects and Resources
License
🤝 Contributing
We welcome any form of contribution!
- Submit Issues to report bugs or suggest new features
- Submit Pull Requests to improve code
- Improve project documentation
- Share usage experiences
Before submitting a PR, please ensure:
- Code complies with project standards
- Add necessary tests
- Update relevant documentation
📜 License
This project is dual-licensed under MIT and Apache 2.0.