HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/sensors.cpython-310.pyc
o

�N�g)�@s4dZddlZddlZe�e�Zdd�Zddd�ZdS)	z-
Read lm-sensors

.. versionadded:: 2014.1.3
�NcCstjj�d�r	dSdS)N�sensorsT)Fz"sensors does not exist in the path)�salt�utils�path�which�rr�H/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/sensors.py�__virtual__sr	FcCsld}|durd}tdd|�d|��dd���}i}|D]}|�d	�}t|�d
kr3|d��||d<q|S)
uq
    Gather lm-sensors data from a given chip

    To determine the chip to query, use the 'sensors' command
    and see the leading line in the block.

    Example:

    /usr/bin/sensors

    coretemp-isa-0000
    Adapter: ISA adapter
    Physical id 0:  +56.0°C  (high = +87.0°C, crit = +105.0°C)
    Core 0:         +52.0°C  (high = +87.0°C, crit = +105.0°C)
    Core 1:         +50.0°C  (high = +87.0°C, crit = +105.0°C)
    Core 2:         +56.0°C  (high = +87.0°C, crit = +105.0°C)
    Core 3:         +53.0°C  (high = +87.0°C, crit = +105.0°C)

    Given the above, the chip is 'coretemp-isa-0000'.
    �Tz-fzcmd.runz/usr/bin/sensors � F)Zpython_shell�:��r)Z__salt__�
splitlines�split�len�lstrip)ZchipZ
fahrenheit�
extra_argsr�retZsensorZsensor_listrrr�senses��
�r)F)	�__doc__�loggingZsalt.utils.pathr�	getLogger�__name__�logr	rrrrr�<module>s