site  contact  subhomenews

Pmcputemp modified to remove drive writes

June 20, 2020 — BarryK

Pmcputemp is a CPU temperature tray applet, very nice, and used in EasyOS and EasyPup. In the previous post, I explored why there are frequent periodic writes to the hard drive:

https://bkhome.org/news/202006/tracing-continuous-drive-activity.html

I discovered that pmcputemp is the main culprit. Yes, the ext4 journal driver is a contributor, but not the main one.

I obtained the latest source from here:

https://github.com/01micko/pmcputemp

Then modified the source and compiled it, these are my notes:

BK: v1.1
pmcputemp.c
change, interval range 1 - 100, default 20 seconds.
icon "temp.png" causing many drive writes, move into /tmp
pmcputemp.sh
aarch64 fix, ref:
https://bkhome.org/news/201902/easyos-version-104-for-rock64.html

# cd pmcputemp-1.1
# ./configure --prefix=/usr --libdir=/usr/lib --mandir=/usr/share/man --with-help
# make
# new2dir make install

The modified source is now version 1.1, here:

http://distro.ibiblio.org/easyos/source/alphabetical/p/

And the PET is here:

http://distro.ibiblio.org/easyos/amd64/packages/pet/pet_packages-buster/

The problem was, every time CPU temperature changed, read at intervals of 10 seconds (I bumped in latest PET, now 20), there would be a write to /root/.config/pmcputemp/temp.png.

It would probably be possible not to write "temp.png" to file at all, but anyway, I changed it to /tmp/pmcputemp/temp.png. Reason, is that in EasyOS, /tmp is a tmpfs (temporary filesystem, that is only in RAM).

Hey, what a change, my Lenovo PC is now mostly quiet, no little "brrps"! Ditto, there will be much less LED flashes on USB-sticks. 

Tags: easy