A simple power monitor for Jetson
Project description
jetson-power-monitor
English | 中文
A comprehensive power monitoring library for NVIDIA Jetson devices, available in multiple programming languages.
Features
- Real-time power consumption monitoring
- Support for multiple programming languages (C/C++, Rust, Python)
- Easy installation through package managers
- Low-level access to power metrics
- Cross-platform support for Jetson devices
Installation
Python
pip install jetpwmon
Rust
Add to your Cargo.toml:
[dependencies]
jetpwmon = "0.1.0"
C/C++
Download the pre-built .deb package from the Releases page:
sudo dpkg -i jetpwmon_0.1.0_amd64.deb
Or use CMake to find and link the library in your project:
find_package(jetpwmon REQUIRED)
target_link_libraries(your_target PRIVATE jetpwmon::jetpwmon) # Use shared library
# or
target_link_libraries(your_target PRIVATE jetpwmon::static) # Use static library
# For C++ bindings
target_link_libraries(your_target PRIVATE jetpwmon::jetpwmon_cpp) # Use shared library
# or
target_link_libraries(your_target PRIVATE jetpwmon::static_cpp) # Use static library
Usage
Python
from jetpwmon import PowerMonitor
monitor = PowerMonitor()
power = monitor.get_power_consumption()
print(f"Current power consumption: {power}W")
Rust
use jetpwmon::PowerMonitor;
fn main() {
let monitor = PowerMonitor::new().unwrap();
let power = monitor.get_power_consumption().unwrap();
println!("Current power consumption: {}W", power);
}
C/C++
#include <jetpwmon.h>
int main() {
PowerMonitor* monitor = power_monitor_new();
double power = power_monitor_get_power_consumption(monitor);
printf("Current power consumption: %.2fW\n", power);
power_monitor_free(monitor);
return 0;
}
C++
#include <jetpwmon++.hpp>
int main() {
PowerMonitor monitor;
double power = monitor.get_power_consumption();
std::cout << "Current power consumption: " << power << "W" << std::endl;
return 0;
}
API Documentation
Python
class PowerMonitor:
def __init__(self) -> None
def get_power_consumption(self) -> float
def get_voltage(self) -> float
def get_current(self) -> float
Rust
pub struct PowerMonitor {
// ...
}
impl PowerMonitor {
pub fn new() -> Result<Self, Error>
pub fn get_power_consumption(&self) -> Result<f64, Error>
pub fn get_voltage(&self) -> Result<f64, Error>
pub fn get_current(&self) -> Result<f64, Error>
}
C/C++
PowerMonitor* power_monitor_new(void);
double power_monitor_get_power_consumption(PowerMonitor* monitor);
double power_monitor_get_voltage(PowerMonitor* monitor);
double power_monitor_get_current(PowerMonitor* monitor);
void power_monitor_free(PowerMonitor* monitor);
Building from Source
Prerequisites
- CMake 3.10 or higher
- C++ compiler with C++17 support
- Python 3.7 or higher (for Python bindings)
- Rust toolchain (for Rust bindings)
Build Steps
git clone https://github.com/yourusername/jetson-power-monitor.git
cd jetson-power-monitor
mkdir build && cd build
cmake ..
make
sudo make install
Contributing
We welcome contributions! Please see our CONTRIBUTING.md for detailed information about:
- Project architecture and implementation details
- Development setup and guidelines
- Code style and testing requirements
- Pull request process
- Common development tasks
- Release process
License
This project is licensed under the BSD 3-Clause License License - see the LICENSE file for details.
Acknowledgments
- NVIDIA Jetson team for their excellent hardware
- All contributors who have helped with this project
- jetson_stats
Star History
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jetpwmon-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: jetpwmon-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 181.7 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c45ad07f9c88d55b55dec0dbc2572c98737c3e9e23973856df158780879c79c
|
|
| MD5 |
ff4ad6f9d5cfc2a87c5584f653ec0481
|
|
| BLAKE2b-256 |
0e3dd65199c681de971577cfc059ac9490815c6300e057c082b14042a114991d
|
Provenance
The following attestation bundles were made for jetpwmon-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
build-python-wheel.yml on nerdneilsfield/jetson-power-monitor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jetpwmon-0.1.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl -
Subject digest:
0c45ad07f9c88d55b55dec0dbc2572c98737c3e9e23973856df158780879c79c - Sigstore transparency entry: 188525228
- Sigstore integration time:
-
Permalink:
nerdneilsfield/jetson-power-monitor@b7d9d72eb342b37e7ee20c0b3ea7add142be4c6e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/nerdneilsfield
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-python-wheel.yml@b7d9d72eb342b37e7ee20c0b3ea7add142be4c6e -
Trigger Event:
push
-
Statement type:
File details
Details for the file jetpwmon-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: jetpwmon-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 184.1 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
488300e58790c1e6d5352e88cbca3827ff3ef7aad8aecc9872fab8cfbdc7ae62
|
|
| MD5 |
96eeceea3226a4b4cc4d854d41bc62eb
|
|
| BLAKE2b-256 |
f9dbb1e814ad1723ffb76670a97270fdb3b977712c875f0be889a893dfb36bd5
|
Provenance
The following attestation bundles were made for jetpwmon-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
build-python-wheel.yml on nerdneilsfield/jetson-power-monitor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jetpwmon-0.1.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl -
Subject digest:
488300e58790c1e6d5352e88cbca3827ff3ef7aad8aecc9872fab8cfbdc7ae62 - Sigstore transparency entry: 188525241
- Sigstore integration time:
-
Permalink:
nerdneilsfield/jetson-power-monitor@b7d9d72eb342b37e7ee20c0b3ea7add142be4c6e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/nerdneilsfield
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-python-wheel.yml@b7d9d72eb342b37e7ee20c0b3ea7add142be4c6e -
Trigger Event:
push
-
Statement type:
File details
Details for the file jetpwmon-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: jetpwmon-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 182.9 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4beca988ab1d5662e3259d7d28c5433194f2f8b4a209d220065ef4dab6d92f9d
|
|
| MD5 |
e848e9815c66867e7545bb39f01116fc
|
|
| BLAKE2b-256 |
ed074fe39191df1d4140a0289e368d30edc00b73d2d20c5b37685bee566bd410
|
Provenance
The following attestation bundles were made for jetpwmon-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
build-python-wheel.yml on nerdneilsfield/jetson-power-monitor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jetpwmon-0.1.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl -
Subject digest:
4beca988ab1d5662e3259d7d28c5433194f2f8b4a209d220065ef4dab6d92f9d - Sigstore transparency entry: 188525246
- Sigstore integration time:
-
Permalink:
nerdneilsfield/jetson-power-monitor@b7d9d72eb342b37e7ee20c0b3ea7add142be4c6e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/nerdneilsfield
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-python-wheel.yml@b7d9d72eb342b37e7ee20c0b3ea7add142be4c6e -
Trigger Event:
push
-
Statement type:
File details
Details for the file jetpwmon-0.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: jetpwmon-0.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 182.9 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97445a58a55c0b06a4952d5cde9a260f8ecea62e789dcd81a7dc0943a0747ad4
|
|
| MD5 |
9b817b99fd68eef2b6df9118e7b4828d
|
|
| BLAKE2b-256 |
0d2b94f2694c7812d8ea8b09f1d68a38b2062e124661db369cfcc260954090c3
|
Provenance
The following attestation bundles were made for jetpwmon-0.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
build-python-wheel.yml on nerdneilsfield/jetson-power-monitor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jetpwmon-0.1.0-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl -
Subject digest:
97445a58a55c0b06a4952d5cde9a260f8ecea62e789dcd81a7dc0943a0747ad4 - Sigstore transparency entry: 188525236
- Sigstore integration time:
-
Permalink:
nerdneilsfield/jetson-power-monitor@b7d9d72eb342b37e7ee20c0b3ea7add142be4c6e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/nerdneilsfield
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-python-wheel.yml@b7d9d72eb342b37e7ee20c0b3ea7add142be4c6e -
Trigger Event:
push
-
Statement type:
File details
Details for the file jetpwmon-0.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: jetpwmon-0.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 182.8 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
766a05dc304ec1c972681b6774f27643b039deba3809d60764f9c96014661296
|
|
| MD5 |
c7c6d59d64dc55b20b35842bc7238a34
|
|
| BLAKE2b-256 |
f138a148f96cc4c235e6482c22c1dd61b4403016e17d829027b4cd593f00e465
|
Provenance
The following attestation bundles were made for jetpwmon-0.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
build-python-wheel.yml on nerdneilsfield/jetson-power-monitor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jetpwmon-0.1.0-cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.whl -
Subject digest:
766a05dc304ec1c972681b6774f27643b039deba3809d60764f9c96014661296 - Sigstore transparency entry: 188525232
- Sigstore integration time:
-
Permalink:
nerdneilsfield/jetson-power-monitor@b7d9d72eb342b37e7ee20c0b3ea7add142be4c6e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/nerdneilsfield
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build-python-wheel.yml@b7d9d72eb342b37e7ee20c0b3ea7add142be4c6e -
Trigger Event:
push
-
Statement type: