Opened 18 years ago
Closed 18 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)
Changed 18 years ago by
Attachment: | mythtv-showacpitemperature.patch added |
---|
comment:1 Changed 18 years ago by
Milestone: | → 0.20 |
---|---|
Version: | → head |
comment:2 Changed 18 years ago by
comment:4 Changed 18 years ago by
Owner: | changed from Isaac Richards to skamithi |
---|
want to add lmsensor support as well.
comment:5 Changed 18 years ago by
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 Changed 18 years ago by
Status: | new → assigned |
---|---|
Summary: | Adds ACPI CPU temperature to mythbackend status (and MythWeb -> backend status as well) → cpu temp status for mythbackend (acpi + lmsensor) |
Changed 18 years ago by
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 Changed 18 years ago by
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.
Changed 18 years ago by
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"?