takuya / php-lmsensors-wrapper
cpu temperature to json
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/takuya/php-lmsensors-wrapper
Requires
- php: >=7.3
- ext-json: *
- symfony/process: ^6.0
Requires (Dev)
- larapack/dd: ^1.1
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2025-10-12 16:58:48 UTC
README
lm-sensors cpu temperature to json
command result
acpitz-acpi-0
Adapter: ACPI interface
temp1: +33.0°C (crit = +100.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Package id 0: +34.0°C (high = +105.0°C, crit = +105.0°C)
Core 0: +33.0°C (high = +105.0°C, crit = +105.0°C)
Core 2: +34.0°C (high = +105.0°C, crit = +105.0°C)
this package will convert result to json
[
{
"Name": "acpitz-acpi-0",
"Adapter": " ACPI interface",
"Temperature": {
"temp1": "+33.0°C (crit = +100.0°C)"
}
},
{
"Name": "coretemp-isa-0000",
"Adapter": " ISA adapter",
"Temperature": {
"Package id 0": "+34.0°C (high = +105.0°C, crit = +105.0°C)",
"Core 0": "+33.0°C (high = +105.0°C, crit = +105.0°C)",
"Core 2": "+34.0°C (high = +105.0°C, crit = +105.0°C)"
}
}
]
Install
via packagist
composre require takuya/php-lmsensors-wrapper
via git
repo=git@github.com:takuya/php-lmsensors-wrapper.git
composer config repositories.takuya/php-lmsensors-wrapper vcs $repo
composer require takuya/php-lmsensors-wrapper
Example 01
$obj = new Sensors(); $obj->execute('ssh 192.168.1.1 -- sensors'); $json = $obj->toJson();
Example 02
$obj = new Sensors(); $ret = `ssh 192.168.1.1 -- sensors` $obj->setResult($ret); $json = $obj->toJson();
requirements
sudo apt install lm-sensors