Ticket #3502 (closed enhancement: duplicate)
Opened 6 years ago
Last modified 6 years ago
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
Change History
comment:1 follow-up: ↓ 2 Changed 6 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 6 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 6 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 6 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.
comment:5 Changed 6 years ago by skamithi
- Owner changed from ijr to skamithi
- Status changed from new to assigned
comment:6 Changed 6 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 6 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:9 Changed 6 years ago by sphery <mtdean@…>
See #4049 for an implementation of the approach suggested by Alan Stirling/Stuart? Morgan.
comment:10 Changed 6 years ago by skamithi
- Status changed from assigned to closed
- Resolution set to duplicate
#4049 is a better solution. closing this ticket.
