Skip to main content

Add your description here

Project description

Linux HWINFO64

Written in Python
This is a scaled down proof of concept. It's a simple script to output a system's hardware information and some simple metrics for the CPU and GPU In the future, I might expand this to include more of the features of hwinfo64, but it's a simple MVP for now

Requirements

  • nvidia-smi for Nvidia GPUs
  • rocm-smi for AMD GPUs

GPU Detection

It first checks for NVIDIA GPUs using nvidia-smi
Then it checks for AMD GPUs by:

  • Looking at vendor ID in /sys/class/drm/card0/device/vendor
  • Using lspci to search for AMD graphics adapters
  • The most accurate way to get usage is using rocm-smi, otherwise it relies on /sys/class/drm/card0/device/gpu_busy_percent[1]

Usage Notes:

CLI Arguments

  • --graph or -g: Run the monitor in graph mode
  • --record or -r: Record metrics to a CSV file for later analysis
  • --output or -o: Specify the output CSV file name (default: hw_metrics.csv)

Graph Mode

A new display mode that shows line graphs of your hardware metrics over the last 2 minutes

  • CPU usage history
  • Memory usage history
  • GPU utilization history (if available)
  • GPU memory usage history (if available)

Screenshot of tool running in graph mode

Notes

For AMD GPUs, some metrics might not be available depending on your specific card and drivers:

  • Temperature reading paths can vary between different AMD cards
  • Memory usage requires ROCm tools to be installed
  • GPU utilization might not be available on older cards/drivers

Screenshot of the tool running in the terminal

Additional requirements for AMD GPU support:

  • For basic detection: standard Linux utilities like lspci
  • For more detailed metrics: AMD's ROCm tools (rocm-smi)

Links:

[1] I don't know a lot about how linux determines device number, but it will increment the value for card0 if you ever change your graphics card (presumably it stores the previous device values / configs / whatever). I plan to investigate this further

Project details


Download files

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

Source Distribution

linux_hwinfo64-0.1.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

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

linux_hwinfo64-0.1.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file linux_hwinfo64-0.1.0.tar.gz.

File metadata

  • Download URL: linux_hwinfo64-0.1.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for linux_hwinfo64-0.1.0.tar.gz
Algorithm Hash digest
SHA256 004d1ddc565c3950372158aff94080d0ddbbd75c5a67f1ea8dcbd817756fe09c
MD5 494f6f8a12f3e1d5d830bcc84a796041
BLAKE2b-256 6da150802c129adc76c8b02afed7c1f9eb47060f0696dcb19860746ae4f98c61

See more details on using hashes here.

File details

Details for the file linux_hwinfo64-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for linux_hwinfo64-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4790ce5948cf1619b9dae22365ba1205f808097a22a8af9e672b4141bc2e5076
MD5 a627f1f7c8dd599ce3207d82258d5c2c
BLAKE2b-256 9d8ea20f6bde41724bd8f0b08a0ae86db2eb34e4b922b9cc3fb6e43f8b141fa5

See more details on using hashes here.

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