cpu temperature monitor with action features

Miscellaneous tools
Post Reply
Message
Author
artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

cpu temperature monitor with action features

#1 Post by artsown »

6/26/19 documentation update.
Outline of method. ST script in Startup. The technique keeps display on a
tray in spite of jwm restarts:
http://home.ptd.net/~artnpeg/overheat_doc.png
Showing display on a bottom tray:
http://home.ptd.net/~artnpeg/bottom.png
Download latest version:
http://home.ptd.net/~artnpeg/overheat_1.5.1.pet
Use version 1.4.2 on Fatdog:
http://home.ptd.net/~artnpeg/overheat_1.4.2.pet

Starting with version 1.5.1 the user can select from three different screen
locations for the mini urxvt 9x1 display. Edit /opt/tempalarm/config
The word top locates the display at top of screen centered
horizontally. The word right locates the display at lower right
of screen. Any other word results in the default bottom location
centered horizontally.

For improved appearance on bionicpup64 8.0 edit .config/compton.conf
line 1 to shadow = false;

Art
Last edited by artsown on Wed 26 Jun 2019, 10:15, edited 21 times in total.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#2 Post by bigpup »

This is small enough to be attached to this posting.
The forum attachment size max is 256KB.
You could make it into a pet package and it would also attach to posting.

I made a pet out of it.
Seems to install and work OK.

You are free to rename,edit, change, whatever.
Just showing you it can be done and posted.
Attachments
overheat.pet
(1.38 KiB) Downloaded 224 times
Last edited by bigpup on Sat 20 Apr 2019, 23:13, edited 3 times in total.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#3 Post by bigpup »

Not bad.
But this really would be better if it actually was on the tray.
One of the icons on the right side of the tray.

Right now I have the tray on the top.

The temp display is in the middle of the bottom of the desktop.
Attachments
Screenshot(3).jpg
(20.3 KiB) Downloaded 554 times
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

ozsouth
Posts: 858
Joined: Fri 01 Jan 2010, 22:08
Location: S.E Australia

#4 Post by ozsouth »

Like this concept! Some nice stuff for all the bashwork, Art. No memory leak either. Had to make some edits, as my 2yo Celeron N3060 doesn't report temp1_input in any pup I tried. (Is why I had to get multiple inputs in cpucurtemp also). Attached pic is from ScPup64-19.01+5.
Attachments
celeron-n3060.jpg
(19.22 KiB) Downloaded 519 times

artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

#5 Post by artsown »

@bigpup

Yes, a pet is a possibilty since Fatdog can convert and use them. My
install script has been working on many different pups so I lost
interest in providing a pet.

Speaking of Fatdog, it's the only "pup" that resists overlay of my
mini-terminal over a tray that I've found so far. So when a tray
is on the bottom (Fatdog default) I use a stoverheat option that
places the mini-terminal just above the tray. I'm thinking though
that Fatdog fans are astute enough to modify my scripts to their
liking ... and I'm not thinking in terms of my program evolving into
something suitable for the "great unwashed" :) OTOH, I am interested
in getting feedback on problems people encounter, of course.

Art

artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

#6 Post by artsown »

@ozsouth

Thanks. I'm puzzled by the lack of temp1. Seems it must have to do
with the version of lm-sensors you have installed ... and therefore
be dependent on what's in the repo of the pup you use. So I must
ask if you experience this issue with any and all pups you try? If so,
I don't have a clue :)

Art

ozsouth
Posts: 858
Joined: Fri 01 Jan 2010, 22:08
Location: S.E Australia

#7 Post by ozsouth »

Art, have since tried (all 64 bit) Xenialpup64, Bionicpup64, ScPup64. Re-downloaded lm-sensors & sensorslib pkgs for all - same result - it is my cpu. By adding temp2_input to the overheat program, it works. An i3 cpu I tested works with the original, as it has temp1_input. You've done well.
Last edited by ozsouth on Fri 03 May 2019, 04:46, edited 1 time in total.

artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

#8 Post by artsown »

@ozsouth

Thanks for the feedback and info on the temp1 issue. I might simply
use temp2 as you suggest ... we'll see :) It's Easter and kids &
grandkids day. So I'll soon be off the internet for awhile. Thanks again.

Art

artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

#9 Post by artsown »

@ozsouth

I've created a new test version of the overheat script that finds and
uses the max core temp of temp2, temp3,temp4, ... up to temp11
(arbitrary choice for no good reason of 10 cores limit):

http://home.ptd.net/~artnpeg/testoverheat.tar

I've only checked it on my i5 (4 cores) so far. I hope it handles your
celeron situation ok.

Of course anyone else is free and invited to test this as well.

I had a thought about your celeron processor. I recalled that some
user here talked about a phase intel went through back when two
cores were just beginning to be produced. There was no "package or
physical id sensor" as I understood it. That same thing may then have
continued to later processors having two cores. I'm guessing something
like that might explain your celeron experience.

Art

ozsouth
Posts: 858
Joined: Fri 01 Jan 2010, 22:08
Location: S.E Australia

#10 Post by ozsouth »

Thanks Art. That works! Since temp1 works with all your pcs, maybe use temp1-11 (when I make i=1, still works). Love your 'while' loops! All that 'bashing' was worth it.
** Edit - have discovered Xine exports errors to terminal & kills overheat window. Their fix doesn't work. Checking other player options.

artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

#11 Post by artsown »

ozsouth, concerning the xine problem I found a urxvt option that may
"harden" the mini-window. Rather than me uploading a test stoverheat
I wonder if you would modify it and see if it does any good (at least it
did no harm when I tried it :))

Down near the end of the script I changed p=59 to p=65 and then
added +hold (adds 6 characters including a extra space) immediately
after "urxvt ... " so the line begins with "urxvt +hold ......

The description was:

urxvt will not immediately destroy its window when the program
executed within it exits. Instead it will wait until it is being killed or
closed by the user.


A long shot but who knows?

Art

ozsouth
Posts: 858
Joined: Fri 01 Jan 2010, 22:08
Location: S.E Australia

#12 Post by ozsouth »

Thanks Art, no luck with that, but I did discover xine's not killing the window. Anytime the window manager (jwm) restarts, the mini-terminal goes to the back & is covered by the taskbar. I made a shabby fix - shortening the taskbar by 35 pixels, aligning it left, and in stoverheat let x=x-30 let y=y-25. See pic below.
Attachments
taskbarfix.jpg
(22.78 KiB) Downloaded 432 times

artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

#13 Post by artsown »

Oz, I've never experienced any problems when jwm starts so what do
I have to do to try to duplicate what you are seeing? Is it your celeron?
Or what?

Art

ozsouth
Posts: 858
Joined: Fri 01 Jan 2010, 22:08
Location: S.E Australia

#14 Post by ozsouth »

Just tested in both ScPup64 & Bionicpup64.
If I open xine the taskbar refreshes over top of the temp display. If I open xpat2 cards & close with the top-right X, same. These actions restart the Window Manager. If I click Exit, then Restart Window Manager or in a terminal run jwm -restart, same.
Clicking Exit, then Restart Graphical Server restarts the temp display, as does rebooting and initial bootup. It's a shortcoming in JWM. I've played with JWM settings, as taskbar opacity would suffice, but opacity settings don't seem to do anything.

artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

#15 Post by artsown »

OK, if the mini-window isn't located on the task bar I can enter
jwm -restart without losing the window. Your idea of programatically
shortening the bar and locating the mini-terminal at the lower right
should be the solution then? Users may prefer that location anyway.

Art

artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

#16 Post by artsown »

Ozsouth, when someone or something does a jwm restart the overheat
script still keeps running ,,, so I see no serious problem. It's just a
matter of users having help info that instructs them that if the temp
display disappears from a bottom tray they can simply restart x.

I gave thought to messing around with a user's .jwmrc-tray and doing
some fancy adaptations to various tray locations. Fortunately, sanity
soon returned :)

Art

ozsouth
Posts: 858
Joined: Fri 01 Jan 2010, 22:08
Location: S.E Australia

#17 Post by ozsouth »

Yes, simple instruction good, as it's a bit tricky to fix.
My personal fix was to edit .jwmrc-tray (is in /root for Xenial/Bionicpup, but in /root/.jwm & is usually jwmrc-tray1 or 2 in Slackos), 3rd line to include width="-45" & halign="left" & then edit /root/Startup/stoverheat 'let' lines to read x=x-40 and y=y-25. That gets the image I posted before, with temp display in bottom right (top right would be y=0). Need JWM 2.3.4 or later.
Last edited by ozsouth on Fri 26 Apr 2019, 05:00, edited 1 time in total.

artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

#18 Post by artsown »

Please see my edited original post for a download of latest overheat
scripts.

Art

artsown
Posts: 403
Joined: Wed 12 Sep 2012, 18:35

#19 Post by artsown »

Calling attention to my 5-08-17 update in my original post. A pet is
now available for download. I'll note here that I've tested this on
Fatdog 801 as well as a variety of 32 and 64 bit puppies. I only have
one machine here, a laptop, having a AMD cpu upon which the temp
monitor works ok. Please post concerning any issues you encounter.

Art

Post Reply