Opened 18 years ago

Closed 18 years ago

#1027 closed enhancement (fixed)

cpu temp status for mythbackend (acpi + lmsensor)

Reported by: arzie@… 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)

mythtv-showacpitemperature.patch (2.1 KB) - added by arzie@… 18 years ago.
mythtv-showacpitemperature-revised.patch (1.8 KB) - added by arzie@… 18 years ago.
Revised version
temp_sensor.patch (5.7 KB) - added by skamithi 18 years ago.
latest patch. need to have lmsensor part tested before commiting. my dev pc doesn't support lmsensor cpu temp detection. it uses acpi instead.
updated_temp_sensor.patch (5.8 KB) - added by anonymous 18 years ago.

Download all attachments as: .zip

Change History (12)

Changed 18 years ago by arzie@…

comment:1 Changed 18 years ago by danielk

Milestone: 0.20
Version: head

comment:2 Changed 18 years ago by Robert Tsai <rtsai1111>

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"?

Changed 18 years ago by arzie@…

Revised version

comment:3 Changed 18 years ago by arzie@…

I agree, have a look at the revised patch.

comment:4 Changed 18 years ago by skamithi

Owner: changed from Isaac Richards to skamithi

want to add lmsensor support as well.

comment:5 Changed 18 years ago by arzie@…

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 skamithi

Status: newassigned
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 skamithi

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 David Asher <david.asher@…>

I tested this out and ran into 2 problems before I got the lm_sensors part working:

  1. 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.
  1. 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 anonymous

Attachment: updated_temp_sensor.patch added

comment:8 Changed 18 years ago by skamithi

Resolution: fixed
Status: assignedclosed

(In [9741]) Closes #1027. Temp sensor for mythbackend

Note: See TracTickets for help on using tickets.