Comments (10)
Yah, gotop divides the CPU usage by the number of cores to show overall CPU usage which differs from the way htop/top works. I hadn't noticed that descrepency before so thanks for pointing that out. Is one way better than the other? If people want per-core CPU usage then maybe we could add a cli option to allow choosing between the two.
from gotop.
afaik, it's common that cores go to 100%, CPU goes to 100%*nr of cores. So a process using 150% CPU in a quad-core will, in fact, be using one core at 100% and another at 50% - or any other combination of it.
Good reference: https://unix.stackexchange.com/questions/145247/understanding-cpu-while-running-top-command
from gotop.
It is common and it's used by top/htop, but other resource monitors use gotop's method too like ksysguard. I think it's mostly preference. I personally prefer displaying overall % CPU and I think the default should stay that way, but if we want to add an option or keybind to switch between the two then that sounds good to me!
from gotop.
I'd really like to have an option to switch between both ways of showing CPU usage.
from gotop.
It seems to me there is more discrepancy than can be explained by the above reason.
I have a VMBox with windows inside running on OSX. gotop showed me max 10% on the VirtualBoxVM provess (mostly around 5%). That would be approx 1 core on my 12 core machine. htop easily goes up to 300-500% (3-5 cores).
Any idea what that could be?
Very nice tool none the less! I love it!
from gotop.
@tehsphinx So assuming htop is correctly reporting that information, that discrepancy sounds like a gotop bug and must have something to do with the way we're gather CPU usage information. I'm not immediately sure what that could be, since we're just running ps
, so feel free to create an issue for that. I'd also recommend cross referencing the information given with some other resource monitors like top and ksysguard to make sure it's a gotop error.
from gotop.
@cjbassi Since this is currently hard to compare (because of the different measuring mentioned in this issue) I'm going wait for the suggested option. Keeping an eye out in the meantime.
from gotop.
@suroa FYI
from gotop.
I see two topics in this ticket.
- Is gotop's CPU usage correct? There's some indication that it might, in some environments, at least. Correcting this will require building a test, because eyeballing against a different top tool isn't going to cut it.
- Provide alternate views for CPU data. I see three possible values:
- AVG over all CPU processing power in the machine (already implemented with AVG)
- Per-core view. Currently, the labels imply a CPU view when it's really showing cores. This is likely just a label change.
- Per-CPU view. This is the sum of the core usage percents per each CPU.
I'm not interested in displaying paradoxical values > 100%. Not only is it a very silly thing, to know how much CPU is really being used, the user still has to do mental math to know what the max value is. Therefore, given:
- A CPU p
- Cp, the set of usage percentages, 0-1, of all cores of CPU p
- |Cp|, the number of cores of CPU p
Then:
2.1 - ∑C/Δt (actually, it should be a rolling average over a time window, so slightly more complex than that)
2.2 - ∀p, ∑Cp
2.3 - ∀p, (∑Cp) / (|Cp|)
So: I'm short-cutting this ticket to the first issue; are the CPU usages reported by gotop correct? The other one, I'll create a feature request for.
from gotop.
I'd also like to report cpu usage different from htop
, and inconsistent whitin gotop
itself.
from gotop.
Related Issues (20)
- Battery information is not displayed. HOT 1
- Statusbar set to true in the configuration file but is not displayed
- $TERM rendering bug HOT 6
- 4.2.0 is broken HOT 1
- Temperature not showing for M2 Air HOT 5
- build from source failed on macOS HOT 1
- Only show one widget or create custom layout
- RX e TX Network for all time HOT 2
- Disk report problem on each run HOT 3
- gotop only opens keybinding overview HOT 1
- Please bump the golang.org/x/sys dependency
- 404/301 errors when trying to emerge gotop from gentoo guru repo
- Build fails because go.mod requests an outdated Go version HOT 1
- Detected as Trojan
- --nvidia and --export cannot be used at the same time
- AMD GPU support HOT 1
- gotop doesn't work in tmux HOT 3
- Issue with Absolute Path for Layout File in Termux
- Build error on Mac
- Cannot compile to AIX ppc64
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gotop.