htop-dev / htop

htop - an interactive process viewer
https://htop.dev/
GNU General Public License v2.0
6.26k stars 423 forks source link

Meters for CPU average for each physical CPU #801

Open jkemp814 opened 2 years ago

jkemp814 commented 2 years ago

It would be good to have an Average of each CPU, plus the overall average of all CPU'S.

i.e. CPU 0, CPU 1 and so forth. (4,6,8,10 core systems. If motherboard sensors report such info)

Also, I notice there is no temp for CPU core hyperthreads. It just states N/A for the temp.

BenBE commented 2 years ago

Open the setup with F2 navigate to Meters and you should find all the Meters you desire … There are both variants with multiple cores per meter (in up to 8 smaller columns in one meter) or each and every CPU individually.

jkemp814 commented 2 years ago

image

I have been working in the setup (F2). When I list all 24 cores (12 are really hyperthreads), in htop it shows N/A . There is no temp listed for them. In bashtop it shows a temp but in purple instead of blue like the real cores.

image

jkemp814 commented 2 years ago

My main question was can another 'CPUs (1/1)' be added that would read an average of each CPU cores. Not just the system average? i.e. Average CPU 0 cores, Average CPU 1 cores.

CPU (1/1) first CPU, CPU (2/2) second CPU, without adding both to the same meter. (this is for the average of all cores in that CPU I'm referring to)

The layout I have as you can see above, if I add CPU's (1/1) again in the second CPU column, it is essentially the same data as the one to the left.

BenBE commented 2 years ago

htop currently does not split the CPU groups into per-physical CPU groups and thus there also are no accumulated per-physical-CPU meters. This effect can somehow also be seen in the temperature display on the per-thread meters, as normally the N/A values are filled in for certain (single-CPU) constellations.

jkemp814 commented 2 years ago

Oh, I see. Check out bashTOP. I think that package is just duplicating the TEMP for the hyperthread, but it changed the color so to indicate it's not really a core, but a duplicate TEMP for that hyperthread. Makes the list 'look' consistent. When you think about it, it is the real TEMP of the core, being the thread is a part of that core.

jkemp814 commented 2 years ago

I meant to add, every CPU core in the left column is CPU 0, every core listed in the right column is CPU 1. So the TEMP stats would be the same for: core 0 is the same temp as core 6 and so forth.

The data and stats are there. htop would have to be written to read the stats from the sensors for each CPU. (which it currently is but not the TEMP for the hyperthreads). That's the reason the top half has TEMP readings. The lower half are the hyperthreads of the cores above, so they would be the same temperature. Note in the image above, you can see htop reading all the cores load percentage.

Phones even have multiple CPU's now. Not just cores I'm referring to.