Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 7 years ago

Closed 7 years ago

#3502 closed enhancement (duplicate)

Adds CPU, motherboard temperature and CPU fan speed to mythfrontend's status page

Reported by: anonymous Owned by: skamithi
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: low Keywords: hardware monitor cpu temperature
Cc: Ticket locked: no

Description

This patch will add ACPI/lm_sensors CPU temperature and if possible
lm_sensors CPU fan speed and motherboard temperature to mythfrontend's
status page under Machine Status.

To make it work, I had to add -lsensors to
mythtv/programs/mythfrontend/Makefile. Just add it to the end of the LIBS
variable.

I really have no idea how these configure scripts etc work so I don't know
if everybody has to add this manually or if it is done automatically
if you have installed lm_sensors prior to running configure.

If somebody can tell me where to add it so it will be added automatically,
I will do it and update the diff.

Attachments (3)

statusbox.diff (4.5 KB) - added by vdr@… 7 years ago.
sensors.diff (12.9 KB) - added by vdr@… 7 years ago.
See my post below
statusbox-new.diff (1.7 KB) - added by anonymous 7 years ago.

Download all attachments as: .zip

Change History (13)

Changed 7 years ago by vdr@…

comment:1 follow-up: Changed 7 years ago by devel@…

This ticket should be linked to http://svn.mythtv.org/trac/ticket/3500 as well.
Why not create functions for getting sensor data somewhere in libmythtv rather than duplicating the code in two places?

comment:2 in reply to: ↑ 1 Changed 7 years ago by vdr@…

Replying to devel@mrwire.co.uk:

This ticket should be linked to http://svn.mythtv.org/trac/ticket/3500 as well.
Why not create functions for getting sensor data somewhere in libmythtv rather than duplicating the code in two places?

I had also the idea to add it to libmythtv, but is it really worth to blow up libmythtv with code that is "only" used in two places?

If you want to have it added to libmythtv, I can do so next week. Just tell me :)

comment:3 Changed 7 years ago by anonymous

Duplication is bad.

I am working on putting it in libs/libmyth/util.cpp.
The problem with this is that everythink that uses libmyth also needs to be linked with -lsensors.
I'm still working on the configure changes for this.

comment:4 Changed 7 years ago by vdr@…

sensors.diff

sensors.diff integrates the whole sensor stuff in libmyth/util.cpp
It patches also libmyth.pro to append -lsensors when needed.

Furthermore it adds ACPI/lm_sensors CPU temperature and if possible lm_sensors CPU fan speed and motherboard temperature to mythfrontend's status page under Machine Status and changes the backend's status page to use the functions from libmyth.

This patch makes statusbox.diff and http://svn.mythtv.org/trac/ticket/3500 obsolete.

Changed 7 years ago by vdr@…

See my post below

comment:5 Changed 7 years ago by skamithi

  • Owner changed from ijr to skamithi
  • Status changed from new to assigned

Changed 7 years ago by anonymous

comment:6 Changed 7 years ago by anonymous

statusbox-new.cpp is my slight reworking of the frontend additions. The current one will try and internationalise strings that have the current temp and degrees at the end, which won't work (oh, and I had a different API for looking up the sensor data:
MPUBLIC bool getTherm(QString &source, QString &cpu, QString &fan, QString &mb); )

comment:7 Changed 7 years ago by stuartm

For what it's worth I not that interested in this addition.

Allan Stirling has suggested an alternative approach to tagging more and more information onto the status page. Allow a custom script to be run every time the page is viewed, the output of which is embedded into a space at the bottom. Therefore people can add whatever customised information they want to the page without it being cluttered up for everyone else. I think it's an extremely good idea and a perfect compromise between those people who want to display lots of information about their machines status and those who are happy with what is currently shown.

comment:8 Changed 7 years ago by skamithi

  • Milestone changed from 0.21 to unknown

comment:9 Changed 7 years ago by sphery <mtdean@…>

See #4049 for an implementation of the approach suggested by Alan Stirling/Stuart? Morgan.

comment:10 Changed 7 years ago by skamithi

  • Resolution set to duplicate
  • Status changed from assigned to closed

#4049 is a better solution. closing this ticket.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.