Skip to main content

A simple power monitor for Jetson

Project description

jetson-power-monitor

PyPI - Downloads PyPI version PyPI - Python Version PyPI - Format GitHub jetpwmon Version info
CI & CD CodeQL

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

Star History Chart

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

jetpwmon-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (181.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

jetpwmon-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (184.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

jetpwmon-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (182.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

jetpwmon-0.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (182.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

jetpwmon-0.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (182.8 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

File details

Details for the file jetpwmon-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for jetpwmon-0.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0c45ad07f9c88d55b55dec0dbc2572c98737c3e9e23973856df158780879c79c
MD5 ff4ad6f9d5cfc2a87c5584f653ec0481
BLAKE2b-256 0e3dd65199c681de971577cfc059ac9490815c6300e057c082b14042a114991d

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jetpwmon-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for jetpwmon-0.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 488300e58790c1e6d5352e88cbca3827ff3ef7aad8aecc9872fab8cfbdc7ae62
MD5 96eeceea3226a4b4cc4d854d41bc62eb
BLAKE2b-256 f9dbb1e814ad1723ffb76670a97270fdb3b977712c875f0be889a893dfb36bd5

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jetpwmon-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for jetpwmon-0.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4beca988ab1d5662e3259d7d28c5433194f2f8b4a209d220065ef4dab6d92f9d
MD5 e848e9815c66867e7545bb39f01116fc
BLAKE2b-256 ed074fe39191df1d4140a0289e368d30edc00b73d2d20c5b37685bee566bd410

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jetpwmon-0.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for jetpwmon-0.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 97445a58a55c0b06a4952d5cde9a260f8ecea62e789dcd81a7dc0943a0747ad4
MD5 9b817b99fd68eef2b6df9118e7b4828d
BLAKE2b-256 0d2b94f2694c7812d8ea8b09f1d68a38b2062e124661db369cfcc260954090c3

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jetpwmon-0.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for jetpwmon-0.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 766a05dc304ec1c972681b6774f27643b039deba3809d60764f9c96014661296
MD5 c7c6d59d64dc55b20b35842bc7238a34
BLAKE2b-256 f138a148f96cc4c235e6482c22c1dd61b4403016e17d829027b4cd593f00e465

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page