Installing Module PySensors in Linux, 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.
1. You can download this module from pypi, https://pypi.python.org/pypi/PySensors/
2. Extract files and Install module on command terminal like this:
$ cd /path/to/module && sudo python setup.py install
[email protected]:~$ python Python 2.7.6 (default, Jun 22 2015, 18:00:18) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 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() ... acpitz-virtual-0 at Virtual device temp1: 57.00 coretemp-isa-0000 at ISA adapter Physical id 0: 61.00 Core 0: 60.00 Core 1: 61.00 >>>
posted 1 year, 10 months ago