Opened 20 years ago

Closed 20 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@… 20 years ago.
mythtv-showacpitemperature-revised.patch (1.8 KB ) - added by arzie@… 20 years ago.
Revised version
temp_sensor.patch (5.7 KB ) - added by skamithi 20 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 20 years ago.

Download all attachments as: .zip

Change History (12)

by arzie@…, 20 years ago

comment:1 by danielk, 20 years ago

Milestone: 0.20
Version: head

comment:2 by Robert Tsai <rtsai1111>, 20 years ago

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

by arzie@…, 20 years ago

Revised version

comment:3 by arzie@…, 20 years ago

I agree, have a look at the revised patch.

comment:4 by skamithi, 20 years ago

Owner: changed from Isaac Richards to skamithi

want to add lmsensor support as well.

comment:5 by arzie@…, 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 skamithi, 20 years ago

Status: newassigned
Summary: Adds ACPI CPU temperature to mythbackend status (and MythWeb -> backend status as well)cpu temp status for mythbackend (acpi + lmsensor)

by skamithi, 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 David Asher <david.asher@…>, 20 years ago

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.

by anonymous, 20 years ago

Attachment: updated_temp_sensor.patch added

comment:8 by skamithi, 20 years ago

Resolution: fixed
Status: assignedclosed

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

Note: See TracTickets for help on using tickets.