
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
KTemperature is an application to monitor the system temperature. I was motivated to develop this utility because I could not find a simple system tray resident application for monitoring the system temperature using the ACPI interface.
The application obtains the system temperature from the file /proc/acpi/thermal_zone/THRM/temperature .
I have been using Linux and Open Source for quite sometime and this is my first contribution. I hope this will lead to
many more contributions from me.
SuSE 9.2 rpm for the i686 platform is available for download.
The available rpm also works for SuSE 9.3.
The rpm available for download can be installed on SuSE 10.0 as well.
15 years ago
Version 1.1
Added check for the presence of /proc/acpi/thermal_zone/THRM/temperature file. If the file is not present the temperature will be displayed as NA.
Version 1.2
Corrected typo.
Visual representation of the "hotness" of the system.
The system maximum temperature can be provided as an input. The system tray icon will change redness depending on the ratio of provided maximum temperature to the current temperature.
Version 1.3
Configurable temperature monitoring interface, can be anything as long as the temperature can be obtained by doing a read operation on the file.
Stored configuration. The configuration is stored in $HOME/.ktemperatue and read on startup.
Increased sensitivity of redness to temperature changes.
Version 1.4
Auto adjusting text font. The color of the text adjusts to a compliment of the background color, This ensures that the text is clearly visible irrespective of the redness of the systray icon.
More prominent text. The text is bold faced and the font of the text is bigger.
Version 1.5
Changes of parameters (polling interval and max, temperature) take instantaneous effect without having to restart the application.
Boundary values cases of redness, the calculation of redness difference between the background and the foreground has been modified to ensure a minimum difference.
Text alignment, the temperature text will be aligned in the middle both vertically and horizontally.
Version 1.6
Auto loading of the neccessary ACPI thermal module and its dependencies if, required. The root password is checked prior to loading the modules.
Detection of two variants of the thermal interface, namely
/proc/acpi/thermal_zone/THRM and
/proc/acpi/thermal_zone/THM
Version 1.7
The ACPI thermal interface was being detected by searching the /proc/modules file. However, that approach will lead to an irritating request for root password in cases where the module in compiled into the kernel. The thermal interface detection has been modified to take care of the above case.
Version 1.8
Added Pause, Restart and Update options in the right click menu for more control of polling.
Cleaned the auto detection of ACPI thermal interface. The first file in the thermal_zone directory(other than .. and .)is taken as the temperature file.
Fixed the width of the main window to be always greater than the width of widest child window.
Version 1.9
Changed the implementation of 'redness' from RGB space to HSV space for greater sensitivity.
The background color changes from green at minimum temperature to red at maximum temperature.
The text is always constant and will have a clear contrast all temperatures.
Replace memcpy with strcpy in monitor interface selection.
Interface(s) selected in the drop down list will be honoured when the Set button is clicked after the selection.
Used grid layout for the main widget.
Version 1.9-1
Created archive to include version information.
Added keyboard shortcuts to right click menu options.
Added caption to root password dialog.
I would like to acknowledge the suggestions that I have received. The changes have been made taking into account these suggestions.
15 years ago
Version 1.1
Added check for the presence of /proc/acpi/thermal_zone/THRM/temperature file. If the file is not present the temperature will be displayed as NA.
Version 1.2
Corrected typo.
Visual representation of the "hotness" of the system.
The system maximum temperature can be provided as an input. The system tray icon will change redness depending on the ratio of provided maximum temperature to the current temperature.
Version 1.3
Configurable temperature monitoring interface, can be anything as long as the temperature can be obtained by doing a read operation on the file.
Stored configuration. The configuration is stored in $HOME/.ktemperatue and read on startup.
Increased sensitivity of redness to temperature changes.
Version 1.4
Auto adjusting text font. The color of the text adjusts to a compliment of the background color, This ensures that the text is clearly visible irrespective of the redness of the systray icon.
More prominent text. The text is bold faced and the font of the text is bigger.
Version 1.5
Changes of parameters (polling interval and max, temperature) take instantaneous effect without having to restart the application.
Boundary values cases of redness, the calculation of redness difference between the background and the foreground has been modified to ensure a minimum difference.
Text alignment, the temperature text will be aligned in the middle both vertically and horizontally.
Version 1.6
Auto loading of the neccessary ACPI thermal module and its dependencies if, required. The root password is checked prior to loading the modules.
Detection of two variants of the thermal interface, namely
/proc/acpi/thermal_zone/THRM and
/proc/acpi/thermal_zone/THM
Version 1.7
The ACPI thermal interface was being detected by searching the /proc/modules file. However, that approach will lead to an irritating request for root password in cases where the module in compiled into the kernel. The thermal interface detection has been modified to take care of the above case.
Version 1.8
Added Pause, Restart and Update options in the right click menu for more control of polling.
Cleaned the auto detection of ACPI thermal interface. The first file in the thermal_zone directory(other than .. and .)is taken as the temperature file.
Fixed the width of the main window to be always greater than the width of widest child window.
Version 1.9
Changed the implementation of 'redness' from RGB space to HSV space for greater sensitivity.
The background color changes from green at minimum temperature to red at maximum temperature.
The text is always constant and will have a clear contrast all temperatures.
Replace memcpy with strcpy in monitor interface selection.
Interface(s) selected in the drop down list will be honoured when the Set button is clicked after the selection.
Used grid layout for the main widget.
Version 1.9-1
Created archive to include version information.
Added keyboard shortcuts to right click menu options.
Added caption to root password dialog.
I would like to acknowledge the suggestions that I have received. The changes have been made taking into account these suggestions.
Nisaea
12 years ago
First things first, I love the idea. Really. It's exactly what I was looking for. Good job.
However, I can't make it work. The problem comes from me I guess.
I have the /proc/acpi/thermal_zone directory, but... it's empty!
How come? Is there a way to fix it?
Thank you.
Report
hit102
13 years ago
Put any png-file in the file-field.
It works.
Report
flyinsquirrel992
13 years ago
Report
danielskeenan
13 years ago
Report
TroyWatson
15 years ago
1) The temperature display font needs to be user adjustable, or better yet, somehow auto-adjusted to fit, as it doesn't fit on all size panels. Screenshot here: http://users.tpg.com.au/drtwox/ktemp.png
2) Perhaps this type of app would be more suited to being a panel applet.
Report
sodamnmad
15 years ago
Report
zero1
15 years ago
Report
CrAcKeDBoY
15 years ago
$ dir -R
.:
ac_adapter button event info thermal_zone
alarm dsdt fadt power_resource video
battery embedded_controller fan processor wakeup
./ac_adapter:
./battery:
./button:
power
./button/power:
PWRB PWRF
./button/power/PWRB:
info
./button/power/PWRF:
info
./embedded_controller:
./fan:
./power_resource:
./processor:
CPU0
./processor/CPU0:
info limit power throttling
./thermal_zone:
./video:
When i load ktemperature ut it return me:
$ ktemperature
libpng error: Not a PNG file
any idea ??
Report
avasaralak
15 years ago
The interface can be selected using the file selection.
Report
CrAcKeDBoY
15 years ago
This is my config:
http://phpfi.com/84405
Any idea ?
Report
avasaralak
15 years ago
I hope this helps.
Report
CrAcKeDBoY
15 years ago
i've the same problem. my acpi module is static in kernel and i have this dir tree:
$ dir -R
.:
ac_adapter button event info thermal_zone
alarm dsdt fadt power_resource video
battery embedded_controller fan processor wakeup
./ac_adapter:
./battery:
./button:
power
./button/power:
PWRB PWRF
./button/power/PWRB:
info
./button/power/PWRF:
info
./embedded_controller:
./fan:
./power_resource:
./processor:
CPU0
./processor/CPU0:
info limit power throttling
./thermal_zone:
./video:
When i load ktemperature ut it return me:
$ ktemperature
libpng error: Not a PNG file
any idea ??[/quote]
Report
thowe
13 years ago
I had the same problem. The reason was that the temperature file can be in different locations. In my case it was in /proc/acpi/thermal_zone/THM0/temperature
You can set the location of the file in the control menu, that pops up, if you left click on KTemperature's toolbar icon (the one that shows NA)
The "Not a PNG file" bug, mentioned by someone else, I experience, too, when I start from command line, but it does not keep KTemperature from running properly.
Best
thowe
Report
avasaralak
15 years ago
If ACPI is supported then check if there is a /proc/acpi directory. If there is no ACPI directory try loading the acpi, processor and thermal modules.
Report
sunfreak
15 years ago
~> ktemperature
libpng error: Not a PNG file
I'm running SuSE 9.3 with KDE 3.4.2 Level "b".
Any halp?
Report
avasaralak
15 years ago
As far as the NA is concerned, do you have the acpi thermal module loaded ? If it is loaded check if there is a /proc/acpi/thermal_zone/TH*M/temperature and if there is an entry, right click on the system tray select restore and configure the monitoring interface.
I hope this helps.
Report
sunfreak
15 years ago
# ls /proc/acpi/thermal_zone/THR*
/proc/acpi/thermal_zone/THRC:
. .. cooling_mode polling_frequency state temperature trip_points
/proc/acpi/thermal_zone/THRS:
. .. cooling_mode polling_frequency state temperature trip_points
Now the display of the temp sensor works fine.
Thanx.
Regards,
Juergen
Report
yggdrasil
15 years ago
Report
cyb
15 years ago
Is there a way to have a popup when a critical temperature is reached ? If not, it would be nice.
Report
avasaralak
15 years ago
I did not add an alarm since, I was not sure whether it would be a good idea to force more work (and increase temperature further) when the system is at its maximum temperature.
Report
RND
15 years ago
Report
avasaralak
15 years ago
Report
suckerpvn
15 years ago
PS. The program is great though, the best I found! I wanted this functionality after my pc locked when the CPU got overheated on a hot summer day while playing Enemy Territory. :-D
Report
avasaralak
15 years ago
If you can ensure that the ACPI thermal module is loaded by the time utility runs or if you compile it into the kernel then the root password will not be asked.
In the next version I will try to make changes so that the root password will not be asked if not required.
Report
suckerpvn
15 years ago
Report