This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!
Project Description

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 ≥2.6 and < 3
  • libsensors.so from lm-sensors version 3.x (API 4)

The package is pure Python, so any implementation with the ctypes module should work. Tested so far with CPython and PyPy.

Installation

The usual python setup.py install from within the source distribution.

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
Release History

Release History

0.0.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
PySensors-0.0.3.tar.gz (5.1 kB) Copy SHA256 Checksum SHA256 Source Aug 18, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting