context-labs / mactop Goto Github PK
View Code? Open in Web Editor NEWmactop - Apple Silicon Monitor Top written in pure Golang! Under 1,000 lines of code.
License: MIT License
mactop - Apple Silicon Monitor Top written in pure Golang! Under 1,000 lines of code.
License: MIT License
I'm running mactop v0.1.8 on a M1 Pro MacBook Pro and the P-Core Usage bar randomly spikes and overflows to the right of the terminal and the displayed percentage is absurdly hight (above 2000 %) and does not match with any real workload spike on the system (the system is at rest). During those spikes other tools such as top, Activity Monitor or Mx Power Gadget all show a flat and low P-Core usage and frequency.
At least brew update
and brew install mactop
are giving me a:
~ ❯ brew install mactop
Warning: No available formula with the name "mactop". Did you mean ctop, atop, mackup or mytop?
==> Searching for similarly named formulae and casks...
Mactop always shows ~50% P and E, even when the machine is otherwise idle. Here is what mactop and activity monitor show at the same time, note the P cores seem to be idle in AM and 50% active in mactop, the E cores are more active in AM but still not 50%:
I've tried htop, gotop, zenith and some others and they all largely agree with AM, only mactop shows this 50% CPU use...
% sw_vers
ProductName: macOS
ProductVersion: 14.4.1
BuildVersion: 23E224
Latest 0.1.6, same on behaviour after brew upgrade mactop
from 0.1.5 and after brew uninstall mactop && brew install mactop
.
New powermetrics
output is in the attached txt file
powermetrics_valeriylo.txt
I attempting to install mactop
with brew
on a M2 Max:
brew tap context-labs/mactop https://github.com/context-labs/mactop
brew install mactop
Error: formulae require at least a URL
/usr/local/Homebrew/Library/Homebrew/formula.rb:316:in `determine_active_spec'
/usr/local/Homebrew/Library/Homebrew/formula.rb:249:in `initialize'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:570:in `new'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:570:in `get_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:794:in `get_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:1009:in `factory'
/usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:124:in `block in load_formula_or_cask'
/usr/local/Homebrew/Library/Homebrew/api.rb:201:in `with_no_api_env_if_needed'
/usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:116:in `load_formula_or_cask'
/usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:81:in `block in to_formulae_and_casks'
/usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:79:in `each'
/usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:79:in `flat_map'
/usr/local/Homebrew/Library/Homebrew/cli/named_args.rb:79:in `to_formulae_and_casks'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:196:in `run'
/usr/local/Homebrew/Library/Homebrew/brew.rb:92:in `<main>'
Please report this issue:
https://docs.brew.sh/Troubleshooting
Get the following error, when trying to install using
brew install mactop
mactop: The arm64 architecture is required for this software.
Error: mactop: An unsatisfied requirement failed this build.
.
I noticed that mactop
has quite a high CPU use. If I compare mactop
and asitop
at the same time and measure with Activity monitor, you can see this stark difference, the python process running asitop uses ~1.5% and mactop is using ~79%.
I worried it might be some issue with activity monitor, but htop
shows the same differential (pid 12388 @0.7% vs pid 12342 @89%):
This isn't a contention issue, killing asitop
and mactop
still uses the same proportion of CPU.
macbook air M2 + macOS 14.5
STR:
sudo ./mactop --interval
Actual result:
panic: runtime error: index out of range [2] with length 2
goroutine 1 [running]:
main.main()
/Users/user/Work/mactop/main.go:348 +0x120f
/* 347 */ if len(os.Args) > 1 && os.Args[1] == "--interval" ...
/* 348 */ interval, err := strconv.Atoi(os.Args[2])
When running in a default white terminal, the text is grey on white. I can change the terrain via the profile for mactop, but would it be possible to change the text to be black so that it's easier to read on a default terminal?
BTW, great program - nice to see that info in a terminal when needed
For what it does, this tool uses an insane amount of compute resources. mactop
appears to have two threads, each using 50% of a CPU, so in total around 1 CPU constantly. Whereas similar tools, such as top
uses between 5-10% of a single CPU. We're talking 10-20x worse in performance for an (arguably) similar tool.
I don't know what the source is of the high cpu usage, you'd need to profile or perhaps disable certain widgets in your dashboard one at a time to isolate and determine which one(s) it is coming from. Once isolated, doing some research into why/how it is so poorly performant and fixing it would be great!
I saw this just now:
> brew update && brew upgrade
==> Updating Homebrew...
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
mactop
brew install mactop
is all I needed to get it downloaded. Congratulations on getting into Homebrew!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.