Page 1 of 1

CPU temp monitor - SUPERSEDED

Posted: Thu 18 Oct 2018, 09:38
by ozsouth
Was cumbersome to edit & had memory leak - IS NOW SUPERSEDED - see http://murga-linux.com/puppy/viewtopic. ... 87#1022287



This is a hacked version of 01micko's pmcputemp. If Mick's program works for you leave it alone. This new one will work for most Intel & AMD cpus, but very old pcs unlikely (could possibly hack the shell script used).
The shell script, allowing changes without a recompile, draws the temperature figure using the sensors program and writes it to a fixed data file. The main executable reads from the data file and posts it to the taskbar every 5 sec.
Pets are 64bit. Will need to first uninstall pmcputemp if installed. Reload window manager after install. If you already have /usr/bin/sensors, you likely only need pmcpucurt64.pet. Only 1 sensors pet is needed for a pc -
s is for slacko64 or any 64 bit pup using /usr/lib64 (NOT as a symlink);
x is for xenial64 or bionic64 or any 64bit pup using /usr/lib (NOT as a symlink). Use at own risk.

Posted: Thu 18 Oct 2018, 13:52
by Mike Walsh
@ ozsouth:-

Why?

I don't understand the need for a 'hacked' version of pmcputemp. Especially when the original functions perfectly in both 64- and 32-bit Pups.....

Unless, of course, it doesn't work for your particular hardware. I installed Puppy to a mate's old Dell 530s, and I couldn't get a single temp readout app to function at all. Then I found out that that particular motherboard didn't have any sensors.....



Mike. :wink:

Posted: Thu 18 Oct 2018, 15:12
by Terry H
Mike Walsh wrote:@ ozsouth:-

Why?

I don't understand the need for a 'hacked' version of pmcputemp. Especially when the original functions perfectly in both 64- and 32-bit Pups.....

Unless, of course, it doesn't work for your particular hardware. I installed Puppy to a mate's old Dell 530s, and I couldn't get a single temp readout app to function at all. Then I found out that that particular motherboard didn't have any sensors.....



Mike. :wink:
On newer Intel CPU's it does not display the correct value, it displays a constant temperature. So far reported either 25 (me on Core i3-5005U) or 27 (bigpup).

Posted: Thu 18 Oct 2018, 15:46
by Flash
Ozsouth, what did you do to pmcputemp to make it so it only works in 64-bit Puppies?

Posted: Thu 18 Oct 2018, 16:07
by sheldonisaac
Terry H wrote: On newer Intel CPU's it does not display the correct value, it displays a constant temperature. So far reported either 25 (me on Core i3-5005U) or 27 (bigpup).
Seemed OK on my i5 -M 360
http://murga-linux.com/puppy/viewtopic. ... 90#1007490

Posted: Thu 18 Oct 2018, 16:22
by bigpup
Bionicpup64 7.9.5

This seems to be working OK on my desktop computer.
This fixed it.
01micko's pmcputemp would not work on it.

01micko's pmcputemp works OK on my laptop.

For me, 01micko's pmcputemp did not work on desktop computer, but does work on laptop computer.

Posted: Thu 18 Oct 2018, 22:09
by ozsouth
@Mike Walsh - previous didn't work on any of my pcs, from an 8 yo AMD E-450 to a 1 yo HP N3060. The idea of a separate script file (/usr/bin/pmcpucurt.sh) that could be easily edited allowing for odd paths & different sensor programs to be used without a recompile appealed to me, as I struggle with C code. I'm hoping mine works on all computers with sensors. I did at first just edit pmcputemp.sh to include different paths, but thought that too specific.
@Flash - it may work in 32bit - I don't have a version to test. I compiled it in Slacko64 & the sensor lib is 64bit. If someone has 32bit libsensors.so.4.4.0, and 32bit sensors program, could try it.
@bigpup - hopefully this would work on your laptop too.

simple path fix

Posted: Thu 18 Oct 2018, 23:27
by ozsouth
Alternative - (this will work with Mick's pmcputemp & works with my pcs) - download attatchment, remove .gz, ensure executable, rename /usr/bin/pmcputemp.sh to pmcputemp.sh.old, rename /root/.config/pmcputemp/pmcputemprc to pmcputemprc.old, copy downloaded pmcputemp.sh to /usr/bin & restart window manager. 32 or 64 bit fine. (NOTE: update option is 2 posts down).

Posted: Fri 19 Oct 2018, 01:04
by Terry H
Earlier today when I checked pmcputemp.sh, I noticed that the first file in the for statement is found, but does not contain a valid value(constant value '25'), so I made a simple change by swapping the order of the first 2 files, so the /sys/devices/platform is checked first.

Original:

Code: Select all

	for a in `find /sys/devices/virtual -type f -name 'temp'|sort` \
	        `find /sys/devices/platform -type f -name 'temp*_input'|sort` \
		`find /sys/devices/pci* -type f -name 'temp*_input'|sort`
changed to:

Code: Select all

	for a in `find /sys/devices/platform -type f -name 'temp*_input'|sort` \
		`find /sys/devices/virtual -type f -name 'temp'|sort` \
		`find /sys/devices/pci* -type f -name 'temp*_input'|sort`


This seems the simplest change and works on my core i3-5005U processor on both 32 bit upupbb and 64 bit bionicpup64.

Posted: Fri 19 Oct 2018, 02:16
by ozsouth
@Terry H - Glad you found a working solution. Both the first 2 paths have the data required, but the previously first one is unchanging, & the search stops with it. Paths seem to change with different & newer hardware, so either people have to find & change the path or use something like sensors for detection.

ALSO, FOR NON-WORKING ORIGINAL pmcputemp, can replace pmcputemp.sh & pmcputemprc by installing following simple path-fixing pet (should work for 32 or 64 bit).

Posted: Wed 24 Oct 2018, 00:37
by ozsouth
I see someone has uploaded pmcpucurt64.pet to the ibiblio.org site for bionicpup64. Great, but 7.9.5 will need the following pet (& pmcputemp uninstalled first).
*** NOTE: as of bionicpup64 7.9.6, this is unnecessary.

Posted: Thu 25 Oct 2018, 22:21
by ozsouth
Still have folk with sensor detection issues - notably some AMD processors. ONLY if pmcpucurt NOT working for you, could try simple 2 path pet here : http://murga-linux.com/puppy/viewtopic. ... 88#1008188

Posted: Fri 26 Oct 2018, 02:06
by ozsouth
Update 1 (updates pmcpucurt.sh) which puts variables at top for easier amendment & add k8temp module option. Not essential if current pet works, but may help if not working.

Posted: Fri 26 Oct 2018, 07:00
by bigpup
Thanks for working on this and trying to keep up with different hardware requirements!

A good working temp display program, has been needed in Puppy, for a long time.

Posted: Sat 27 Oct 2018, 12:28
by Mike Walsh
A thought has occurred to me. I think I know why pmcputemp doesn't work on my mate's old Dell Inspiron 530s....especially given that HWMonitor gave readouts under Vista on the same hardware when he first got it.

The install he's got was copied from my own machine, transplanted, via USB stick, then copied to to his hard drive, and Grub4DOS run.

His machine is Intel-based. My own is AMD-based, and uses the 'powernow k8' driver. I'm betting that's still loaded, even though the kernel is supposed to auto-adjust for this stuff. By all accounts, his Intel Pentium dual-core should use the 'coretemp' driver, so.....

I'm popping over to see him this weekend anyway, so I'll check what's happening there. Probably need to do a 'modprobe', an 'lsmod' (see what's loaded), and perhaps use the BootManager to force-load the correct driver if necessary. That board's definitely got sensors, or HWMonitor wouldn't have worked....I think the lack of function is my own doing.


Mike. :wink:

Posted: Sun 28 Oct 2018, 11:15
by Mike Walsh
@ ozsouth:-

You're a genius, mate. Thanks a bunch for this; we've now got pmcputemp working in Slacko 570 on my mate's old Dell Inspiron 530S desktop. Finally..!

Didn't even need to 'lsmod', or force-load any modules via the BootManager. It seems everything necessary was already loaded; pmcputemp simply wasn't able to access it. Like I said, thinking back to when this originally had Vista installed at the time it was purchased, HWMonitor did have temp readings showing for the CPU.....so the sensors are there. Interestingly, in addition to 'coretemp', this also has the same 'thermal_zone' module loaded that my old Dell P4 lappie uses. May experiment, and see what that gives.....

This definitely needs to go into the repositories, I think..! Listed as the 'alternative' version, but certainly alongside the 'standard' one, so that the option is there.

Cheers..!


Mike. :wink: