-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new mechanism to get thermal notification #551
Comments
UPD: My quick dirty hack in the
The data are not so comfortable to interpret:
And this data are completely missing:
|
Hey, Using
A device in I guess you want something like below to read all sensors. Index: lib/OperatingSystems/Linux.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/OperatingSystems/Linux.php b/lib/OperatingSystems/Linux.php
--- a/lib/OperatingSystems/Linux.php (revision 268a3601683d8d1d0605ba3d1c17b44afab007e2)
+++ b/lib/OperatingSystems/Linux.php (date 1704898019944)
@@ -232,6 +232,18 @@
public function getThermalZones(): array {
$data = [];
+ $drivers = glob('/sys/class/hwmon/hwmon*');
+ foreach ($drivers as $driver) {
+ $name = $this->readContent($driver . '/name');
+
+ $zones = glob($driver . '/temp*_label');
+ foreach ($zones as $zone) {
+ $type = $name . ' ' . $this->readContent($zone);
+ $temp = (int)$this->readContent(str_replace('_label', '_input', $zone)) / 1000;
+ $data[] = new ThermalZone(md5($zone), $type, $temp);
+ }
+ }
+
$zones = glob('/sys/class/thermal/thermal_zone*');
if ($zones === false) {
return $data;
|
Oh, that is nice! @kesselb Daniel, may I ask you to post here the whole text of the patched function getThermalZones for NC v27? |
Basically the serverinfo gets the information from /sys/class/thermal/thermal_zone*/temp.
At the same time some AMD motherboards and their chipsets do not store the information there, but in hwmon.
Eg, I have hp microserver, and it grabs and stores the temperature data :
And
As well as, lm-sensors produces good data.
Is that possible to grab the data in a more universal way, eg from
hwmon
class, but not from thethermal_zone
class?Read more here https://github.com/Mellanox/mlxsw/wiki/Temperature-and-Fan-Control
The text was updated successfully, but these errors were encountered: