noccylabs/acpi-thermal

Read thermal temperature values from sysfs

Installs: 19

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/noccylabs/acpi-thermal

0.1.0 2014-08-22 18:17 UTC

This package is auto-updated.

Last update: 2025-10-07 09:21:26 UTC


README

Read the temperature readings from the ACPI sysfs

Installation

    $ composer require noccylabs/acpi-thermal:0.1.*

Usage

You can get a collection of all the available thermal zones using the static getAllZones() method:

    use NoccyLabs\Thermal;

    $zones = Thermal\Zone::getAllZones();
    foreach ($zones as $zone) {
        printf("%s = %.1fÂșC\n",
            $zone->getName(),
            $zone->getTemp()
        );
    }

You can also create a zone directly and start reading from it (assuming it exists):

    $zone = new Thermal\Zone("thermal_zone0");        
    echo $zone->getTemp();