asitop
asitop copied to clipboard
KeyError: 'machdep.cpu.brand_string' on M1 Macbook Air (2020)
➤ asitop
ASITOP - Performance monitoring CLI tool for Apple Silicon
You can update ASITOP by running `pip install asitop --upgrade`
Get help at `https://github.com/tlkh/asitop`
P.S. You are recommended to run ASITOP with `sudo asitop`
[1/3] Loading ASITOP
/bin/sh: sysctl: command not found
/bin/sh: sysctl: command not found
Traceback (most recent call last):
File "/opt/homebrew/bin/asitop", line 8, in <module>
sys.exit(main())
^^^^^^
File "/opt/homebrew/Cellar/asitop/0.0.24/libexec/lib/python3.12/site-packages/asitop/asitop.py", line 36, in main
soc_info_dict = get_soc_info()
^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/asitop/0.0.24/libexec/lib/python3.12/site-packages/asitop/utils.py", line 140, in get_soc_info
"name": cpu_info_dict["machdep.cpu.brand_string"],
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'machdep.cpu.brand_string'
Instead of running asitop
, try running sudo asitop
. This fixed the issue for me.