1 1
Igor

Updated htop

Recommended Posts

23 minutes ago, ftp-bin2fex said:

but the new htop shows temperatures now?

yes it does ;)

The following packages will be upgraded:
  htop
Need to get 75.8 kB of archives.
Get:1 https://apt.armbian.com stretch/main arm64 htop arm64 2.1.2-3 [75.8 kB]
Fetched 75.8 kB in 1s (56.4 kB/s)
Unpacking htop (2.1.2-3) over (2.1.1-3) ...

 

NanoPi_A64_htop_temp.jpg

Share this post


Link to post
Share on other sites

that's good, I setup up custom watercooling for poweredge 1950 harpertown cpu and I had setup an app to check lm-sensors from android, would always be 49 degrees, so the server never made noise again but sometimes it would get pretty hot and shutdown, even blew off the water on the mobo and the end. Specific core temperatures would be even better for htop.

Share this post


Link to post
Share on other sites

That's really an open minded extension for htop. Fast and simple!

I've recognized an issue with temperature on my clearfog pro with Debian buster and stretch.

Clearfog Base (Debian Buster) works

htop version buster: 2.2.0-3~armbian5.92+1
395087299_Screenshotfrom2019-08-2913-37-41.png.21586ed45f9512408324133762690c80.png


bpi-m64 (Debian Buster) works

htop version buster: 2.2.0-3~armbian5.92+12.1.2-3
716622017_Screenshotfrom2019-08-2913-40-01.png.5bcc38db1d1c46a95f7e4cfde99ec026.png

 

bpi-m2+ (Debian Stretch) works

htop version stretch: 2.1.2-3
1568704699_Screenshotfrom2019-08-2913-42-19.png.4e27f428b2bea208c30123956e8cfb79.png

 

 

Clearfog pro (Debian Buster and Stretch) doesn't work on a stretch and a buster installation
htop version buster: 2.2.0-3~armbian5.92+1
htop version stretch: 2.1.2-3
319880050_Screenshotfrom2019-08-2913-40-52.png.c104d934e95a186b6bd0b075af19932c.png

Share this post


Link to post
Share on other sites
3 hours ago, _r9 said:

doesn't work on a stretch and a buster installation


This probably related to the fact that temp values are not on the (standard) locations where htop searches for values. A workaround could be implemented or fix htop ... once :) 

Share this post


Link to post
Share on other sites
2 hours ago, guidol said:

maybe symbolic-links as workaround?

some time ago I had this on a NanoPi K1 Plus:
 

temperature for armbian-monitor and welcome-screen (NPi K1 Plus stable):
cd  /etc/armbianmonitor/datasources/
ln -s /sys/devices/virtual/thermal/thermal_zone0/temp soctemp
ln -s /sys/class/hwmon/hwmon0/temp1_input /etc/armbianmonitor/datasources/soctemp


Missing temp in armbianmonitor:

find /sys/devices/ -name temp                                       
/sys/devices/virtual/thermal/thermal_zone0/temp
/sys/devices/virtual/thermal/thermal_zone1/temp

Switch zone0 to zone1 for soctemp:
rm /etc/armbianmonitor/datasources/soctemp
ln -s /sys/devices/virtual/thermal/thermal_zone1/temp /etc/armbianmonitor/datasources/soctemp

===================================================================================
cd  /etc/armbianmonitor/datasources/
ln -s /sys/devices/virtual/thermal/thermal_zone0/temp soctemp

ln -s /sys/devices/virtual/thermal/thermal_zone0/temp /etc/armbianmonitor/datasources/soctemp

/usr/lib/file
ln -fs /sys/class/hwmon/hwmon0/temp1_input /etc/armbianmonitor/datasources/soctemp


My
ln -s /sys/class/hwmon/hwmon0/temp1_input /etc/armbianmonitor/datasources/soctemp

cat /sys/devices/virtual/thermal/thermal_zone0/temp
cat /sys/devices/virtual/thermal/thermal_zone0/temp

echo 'nameserver 192.168.6.3' >> /etc/resolv.conf
echo 200000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
ln -fs /sys/class/hwmon/hwmon0/temp1_input /etc/armbianmonitor/datasources/soctemp


/usr/lib/armbian/armbian-hardware-monitor

# SoC temp: check sun7i legacy exception first, then standard path(s)
        if [[ -f /sys/class/hwmon/hwmon0/temp1_input ]]; then
                # usual convention with modern kernels
                ln -fs /sys/class/hwmon/hwmon0/temp1_input /etc/armbianmonitor/datasources/soctemp
        fi
===================================================================================

 

Share this post


Link to post
Share on other sites

The path is hard coded in the HTOP for the cpu temp.

I think the problem is that some boards (kernel) use the hwmon driver and sometimes different kernel config.

I think the best approach would be to traverse /sys and try to find the label for the cputemp / gputemp / regulators, etc..

But what exactly look for to be Universal?

 

In my x64 for example, same Intel, different kernel configs (server vs desktop) points to different locations:

 

cat /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_label 
Core 0
cat /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_label 
Core 1
cat /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp2_label 
Core 0

 

Share this post


Link to post
Share on other sites

Hey guys,

 

thanks for helping me out and sorry for the late response.

 

I checked the thermal_zone as @guidoldescriped

 

cat /sys/devices/virtual/thermal/thermal_zone0/temp
84164

I also checked the link inside _/etc/armbianmonitor/datasources_
 

ls -l
total 0
lrwxrwxrwx 1 root root 47 Aug 28 10:40 soctemp -> /sys/devices/virtual/thermal/thermal_zone0/temp

It's all the same on the Clearfog pro as it is on the Clearfog base

@lex I cannot find a value like *temp[0-9]_label* But maybe this output can help
 

find /sys/devices/ |grep temp[0-9]
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:0f/hwmon/hwmon7/temp1_max_alarm
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:0f/hwmon/hwmon7/temp1_crit
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:0f/hwmon/hwmon7/temp1_input
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:04/hwmon/hwmon6/temp1_max_alarm
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:04/hwmon/hwmon6/temp1_crit
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:04/hwmon/hwmon6/temp1_input
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:02/hwmon/hwmon4/temp1_max_alarm
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:02/hwmon/hwmon4/temp1_crit
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:02/hwmon/hwmon4/temp1_input
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:00/hwmon/hwmon2/temp1_max_alarm
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:00/hwmon/hwmon2/temp1_crit
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:00/hwmon/hwmon2/temp1_input
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:03/hwmon/hwmon5/temp1_max_alarm
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:03/hwmon/hwmon5/temp1_crit
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:03/hwmon/hwmon5/temp1_input
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:01/hwmon/hwmon3/temp1_max_alarm
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:01/hwmon/hwmon3/temp1_crit
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:04/mdio_bus/mv88e6xxx-0/mv88e6xxx-0:01/hwmon/hwmon3/temp1_input
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:00/hwmon/hwmon0/temp1_max_alarm
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:00/hwmon/hwmon0/temp1_crit
/sys/devices/platform/soc/soc:internal-regs/f1072004.mdio/mdio_bus/f1072004.mdio-mii/f1072004.mdio-mii:00/hwmon/hwmon0/temp1_input
/sys/devices/virtual/thermal/thermal_zone0/hwmon1/temp1_input

@Igor I have also noticed that the *CpuFreq[1-9]: ... MHz* section is missing in the htop frontend too, on all of my _Clearfog Pro_ devices

When I open up the /usr/bin/htop it looks like that there you can see the hardcoded files
 

u: ^@^@^@show processes of a single user^@      H: ^@^@^@hide/show user process threads^@^@      K: ^@^@^@hide/show kernel threads^@^@^@^@      F: ^@^@^@cursor follows process^@^@ F6 + -: ^@^@^@expand/collapse tree^@^@^@^@  P M T: ^@^@^@sort by CPU%, MEM% or TIME^@^@      I: ^@^@^@invert sort order^@^@^@ F6 > .: ^@^@^@select sort column^@^@Environment of process %d - %s^@^@Could not read process environment.^@Refresh^@"^@^@^@/sys/class/thermal/thermal_zone0/temp^@^@^@/sys/devices/virtual/thermal/thermal_zone0/temp^@/sys/class/hwmon/hwmon0/temp1_input^@/sys/devices/system/cpu/cpu%d/cpufreq/cpuinfo_cur_freq^@^@/sys/devices/platform/soc/7081400.i2c/i2c-0/0-0036/regulator/regulator.1/microvolts^@/sys/devices/platform/soc/1f02400.i2c/i2c-4/4-0065/regulator/regulator.5/microvolts^@/sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/regulator/regulator.12/microvolts^@^@^@/sys/devices/platform/ff3c0000.i2c/i2c-0/0-0040/regulator/regulator.9/microvolts^@^@^@^@/sys/devices/system/cpu/cpu%d/cpufreq/cpuinfo_max_freq^@^@/proc/uptime^@^@^@^@%64lf^@^@^@/proc/loadavg^@^@^@%32lf %32lf %32lf %32d/%32d %32d^@^@^@^@/proc/sys/kernel/pid_max^@^@^@^@/proc/%d/environ^@^@^@^@ 0 Cancel^@^@^@ 1 SI

 

The following files are available
 

cat /sys/devices/virtual/thermal/thermal_zone0/temp
66548
cat /sys/class/hwmon/hwmon0/temp1_input
62000
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
cat: /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq: No such file or directory
cat /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq
cat: /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq: No such file or directory

 

This is all exactly the same on my Clearfog Base. But now I can see that on the Clearfog Base the CpuFreq is 0 Mhz. So the issue changed to

Clearfog Base:  Shows 0 MHz because the hardcoded files are missing

837702962_Screenshotfrom2019-09-1315-25-26.png.2080532d45a9d9423b9dc4844e0d5976.png


Clerafog Pro: Doesn't show that sections at all. It looks like this htop doesn't have this features at all
2110368750_Screenshotfrom2019-09-1315-26-49.png.cfab6b96e24057913d2a5b8d1a41d959.png

 

Aaaaaahhhhhh!!!! :D

Ok inside htop on the Clearfog Pro's I had to configure the Frequency and Temperature.

Solution

Enter htop
Press F2

759420985_Screenshotfrom2019-09-1315-36-29.thumb.png.98e976be2a9af1ed056cb257ec6c68e4.png

 

 

Another Update

 

On my Clearfog Pro does the file **/sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq** exist and its content switches between 800 and 1600 this is shown in htop
On the Clearfog Base is the whole directory **/sys/devices/system/cpu/cpufreq/** empty

Share this post


Link to post
Share on other sites

@lex yes this file exists on both devices with following content

cat /sys/class/hwmon/hwmon0/name
f1072004mdiomii00

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
1 1