bottom icon indicating copy to clipboard operation
bottom copied to clipboard

Add non-normalized CPU usage to processes

Open ClementTsang opened this issue 4 years ago • 7 comments
trafficstars

Describe the feature request

What is the feature of interest? Be clear and concise.

Add a column to show non-normalized CPU usage. We currently only offer a normalized (over #cpu cores) usage.

Additional context/details

Provide any additional context or details here. What needs to be done, why, etc:

Originally based on #495. This should be very easy to do in terms of data collection and displaying, but is currently blocked on adding customization to process/table columns, as this would have to be optional.

ClementTsang avatar Jun 14 '21 05:06 ClementTsang

Hello

I was wondering if anyone actually wants both columns or if people would prefer to choose. In that case it wouldn't have to be a separate column, maybe just a command line switch, similar to how --current_usage works. For example, I wouldn't need the normalized column at all, but the non-normalized is useful. Having something running at 100% is obviously saturating one core and the CPU is a bottleneck for it, while going on 16% is much less obvious.

I don't feel like doing the refactoring for the customization of columns, but if the command-line option was enough, I could give it a try.

vorner avatar Aug 12 '21 06:08 vorner

Yeah, that would be the quick way of implementing it. I might do that for now once I'm a bit less busy with IRL, since it's fairly easy to add.

Should have clarified a bit more in the original issue though, I did eventually want to build more granular control of what columns are shown though (think like htop), so that's more of where the "add another column" comes in.

ClementTsang avatar Aug 12 '21 06:08 ClementTsang

Hello,

I'm interesting in this feature too, glad to see there's already an open issue for it! Regarding the implementation, another hopefully-easy alternative could be to use the same/similar mechanism as % which switches between absolute and percentage memory - some shortcut could be used to switch between normalised and not CPU usage.

kvelicka avatar Sep 08 '21 20:09 kvelicka

Yep, that's kinda what I had in mind for implementing this for now, and it would be pretty easy. Just currently a bit busy with work stuff (started a new job this week) and with some internal refactoring that's blocking working on... really any feature.

Hopefully soonish!

ClementTsang avatar Sep 09 '21 14:09 ClementTsang

No rush whatsoever, thanks for the quick response!

kvelicka avatar Sep 10 '21 09:09 kvelicka

Silly question: is this particular GH issue related to why I would see all my macOS CPUs maxing out (to the point where the fan is kicking in!) and yet the CPU column shows at most ~30% being used rather than what I would expect to see which is multiple processes all hitting 90+% CPU usage...

Screenshot 2021-12-17 at 11 35 38

Integralist avatar Dec 17 '21 11:12 Integralist

@Integralist looks like it.

ClementTsang avatar Dec 17 '21 12:12 ClementTsang

The lack of this is particularly significant when I'm working on a big server with 56 threads. I almost never see CPU usage above 100/56 = 1.8%. I far prefer the representation which considers 100% to be 1 core. This nicely captures the extent to which a process is parallelized. For the vast majority of processes I'm monitoring, so the range of [0, 1.7%] isn't that helpful.

ddrcoder avatar Oct 07 '22 19:10 ddrcoder

I just built a new desktop PC with i9-13900K (32 threads) and the lack of this feature now significantly affects my use of bottom.

I was wondering if anyone actually wants both columns or if people would prefer to choose. In that case it wouldn't have to be a separate column, maybe just a command line switch, similar to how --current_usage works. For example, I wouldn't need the normalized column at all, but the non-normalized is useful. Having something running at 100% is obviously saturating one core and the CPU is a bottleneck for it, while going on 16% is much less obvious.

I don't feel like doing the refactoring for the customization of columns, but if the command-line option was enough, I could give it a try.

This is exactly what I want. I made a quick attempt to implement it: https://github.com/database64128/bottom/tree/per-core-percentage

@ClementTsang What do you think? If you are OK with this approach, I can open a PR.

database64128 avatar Nov 16 '22 10:11 database64128

Marking this as done, available as --unnormalized_cpu.

ClementTsang avatar Nov 22 '22 09:11 ClementTsang