tlkh/asitop

Error when running on an Apple Virtual Machine

a1sarao opened this issue · 1 comments

I am trying to run this on a macOS Virtual Machine to monitor usage; the base machine is a mac mini with an M1 chip. I am getting the error below.

min@admins-Mac ~ % sudo asitop
Password:

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


[2/3] Starting powermetrics process


[3/3] Waiting for first reading...

ERROR: cannot find the IO registry entry for IODeviceTree:/arm-io/pmgr
ERROR: cannot find the IO registry entry for IODeviceTree:/arm-io/pmgr
Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.9/site-packages/asitop/utils.py", line 18, in parse_powermetrics
    cpu_metrics_dict = parse_cpu_metrics(powermetrics_parse)
  File "/opt/homebrew/lib/python3.9/site-packages/asitop/parsers.py", line 79, in parse_cpu_metrics
    cpu_metrics = powermetrics_parse["processor"]
KeyError: 'processor'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/homebrew/bin/asitop", line 8, in <module>
    sys.exit(main())
  File "/opt/homebrew/lib/python3.9/site-packages/asitop/asitop.py", line 121, in main
    ready = get_reading()
  File "/opt/homebrew/lib/python3.9/site-packages/asitop/asitop.py", line 118, in get_reading
    ready = parse_powermetrics(timecode=timecode)
  File "/opt/homebrew/lib/python3.9/site-packages/asitop/utils.py", line 28, in parse_powermetrics
    cpu_metrics_dict = parse_cpu_metrics(powermetrics_parse)
  File "/opt/homebrew/lib/python3.9/site-packages/asitop/parsers.py", line 79, in parse_cpu_metrics
    cpu_metrics = powermetrics_parse["processor"]
KeyError: 'processor'
admin@admins-Mac ~ % 

tlkh commented