sensors

libsensors wrapper

Wrapper score 15/100 · tests present · no docs generated

Wraps a native library — check OS Compatibility below for platform-specific linking notes.

Summary

Latest Version Unknown
License MIT
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:25

Installation

nimble install sensors
choosenim install sensors
git clone https://github.com//inv2004/sensors

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
sensors - - - - - - -

Source

Repository https://github.com//inv2004/sensors
Homepage https://github.com//inv2004/sensors
Registry Source nimble_official

README

sensors

libsensors wrapper

  • [x] dynamic load and check of libsensors.so

Example

https://github.com/inv2004/sensors/blob/main/examples/dump.nim

import sensors
import strformat

init()

for chip in chips():
  echo fmt"{chip.name}: {chip.prefix}"
  for feature in chip:
    echo fmt"  {feature.label} ({feature.kind})"
    for subfeature in feature:
      echo fmt"    {subfeature.name}: {subfeature.value} ({subfeature.kind})"
coretemp-isa-0000: coretemp
  Package id 0: 40.0
  Core 0: 39.0
  Core 1: 40.0
thinkpad-isa-0000: thinkpad
  CPU: 34.0
  GPU: 0.0
  temp3: 0.0
  temp4: 0.0
  temp5: 0.0
  temp6: 0.0
  temp7: 0.0
  temp8: 0.0
nvme-pci-0500: nvme
  Composite: 23.85
BAT0-acpi-0: BAT0
iwlwifi_1-virtual-0: iwlwifi_1
  temp1: 28.0
pch_skylake-virtual-0: pch_skylake
  temp1: 33.0
BAT1-acpi-0: BAT1
acpitz-acpi-0: acpitz
  temp1: 34.0

Helpers example

import sensors

init()

echo cpuTemp()
echo ssdTemp()