Opened 20 years ago
Closed 20 years ago
#1027 closed enhancement (fixed)
cpu temp status for mythbackend (acpi + lmsensor)
Reported by: | Owned by: | skamithi | |
---|---|---|---|
Priority: | minor | Milestone: | 0.20 |
Component: | mythtv | Version: | head |
Severity: | medium | Keywords: | mythbackend status acpi cpu temperature |
Cc: | Ticket locked: | no |
Description
I installed MythWeb and noticed the 'Backend status' menuitem. I created a small addition, to show the ACPI CPU temperature ("/proc/acpi/thermal_zone/THRM/temperature") under 'Machine information'.
The patch is against mainserver.cpp and httpstatus.cpp of mythbackend.
It'd be nice to see it included in the main distribution. Thanks in advance!
Attachments (4)
Change History (12)
by , 20 years ago
Attachment: | mythtv-showacpitemperature.patch added |
---|
comment:1 by , 20 years ago
Milestone: | → 0.20 |
---|---|
Version: | → head |
comment:2 by , 20 years ago
comment:5 by , 20 years ago
I don't have a lot of time on my hands in this period, so unless anybody else wants to do it, it'll gonna take a while.
comment:6 by , 20 years ago
Status: | new → assigned |
---|---|
Summary: | Adds ACPI CPU temperature to mythbackend status (and MythWeb -> backend status as well) → cpu temp status for mythbackend (acpi + lmsensor) |
by , 20 years ago
Attachment: | temp_sensor.patch added |
---|
latest patch. need to have lmsensor part tested before commiting. my dev pc doesn't support lmsensor cpu temp detection. it uses acpi instead.
comment:7 by , 20 years ago
I tested this out and ran into 2 problems before I got the lm_sensors part working:
- on my FC4 system the directory /proc/acpi/thermal_zone exists but has nothing in it. As such the mainserver.cpp code for acpi gets run, and the else clause for lmsensors never gets a chance. I fixed this by using a bool to say whether the acpi logic found a temperature or not and use that bool in place of the else.
- the patch is freeing the return value of fopen. This results in a segfault (fopen doesn't malloc, it returns from a statically allocated array). Removing the free got things working.
I'll attach my changed diffs...
David.
by , 20 years ago
Attachment: | updated_temp_sensor.patch added |
---|
For machines that don't support ACPI temperature reporting (lacking hardware or kernel support), wouldn't it be better to not create the thermal node at all, instead of taking up increasingly-valuable screen real-estate with "unknown"?