PySensors
- author:
Marc ‘BlackJack’ Rintsch
- date:
2014-08-17
Python bindings for libsensors.so from the lm-sensors project via ctypes. Supports API version 4, i.e. libsensors version 3.x.
Motivation
Motivation for this package are shortcomings of scraping the output of the sensors command by different shell scripts. Some had problems when labels changed, others could not cope with too many matches of their overly broad regular expressions, and so on. Those scripts and thus this package are used at RebeIT for monitoring servers. The needs of that task are the driving force behind this implementation.
Requirements
Python ≥3.6
libsensors.so from lm-sensors version 3.x (API 4)
The package is pure Python, so any implementation with the ctypes module should work.
Installation
The usual python setup.py install from within the source distribution.
Links
PyPi Entry |
|
Source repository |
|
Bugtracker |
Example
The following example prints all detected sensor chips, their adapter, and the features with their ”main” value for each chip:
import sensors
sensors.init()
try:
for chip in sensors.iter_detected_chips():
print '%s at %s' % (chip, chip.adapter_name)
for feature in chip:
print ' %s: %.2f' % (feature.label, feature.get_value())
finally:
sensors.cleanup()
Example output of the code above:
k8temp-pci-00c3 at PCI adapter Core0 Temp: 16.00 Core0 Temp: 11.00 Core1 Temp: 28.00 Core1 Temp: 19.00 w83627ehf-isa-0290 at ISA adapter Vcore: 1.10 in1: 1.10 AVCC: 3.30 VCC: 3.31 in4: 1.68 in5: 1.68 in6: 1.86 3VSB: 3.30 Vbat: 3.06 in9: 1.55 Case Fan: 1231.00 CPU Fan: 2410.00 Aux Fan: 0.00 fan5: 0.00 Sys Temp: 39.00 CPU Temp: 31.50 AUX Temp: 30.50 cpu0_vid: 0.00
Metadata
Release files for PySensors 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| PySensors-0.0.4.tar.gz | 10.6 kB | Without provenance | Details |
Release files / PySensors-0.0.4.tar.gz
| Download URL | PySensors-0.0.4.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
beb0def410d29ee46fe196a7811124772abf84cbe3a0d8b01d80b81fba31dae5
|
|
BLAKE2b-256 checksum How to use checksums |
7631d3383a192f31ce1d79f27ec3d047cca23dd82a1bf0939e774386aba37cf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
|
Security for PySensors 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.