rbonghi / jetson_stats

📊 Simple package for monitoring and control your NVIDIA Jetson [Orin, Xavier, Nano, TX] series
https://rnext.it/jetson_stats
GNU Affero General Public License v3.0
2.17k stars 264 forks source link

Conditionally show frequency gauge based on whether CPU core is active #570

Closed savf closed 1 month ago

savf commented 2 months ago

This pull request fixes a bug where jtop crashes upon switching to the CPU tab on Jetson devices that are running an nvpmodel that deactives some of the CPU cores:

Traceback (most recent call last):
  File "/usr/local/bin/jtop", line 8, in <module>
    sys.exit(main())
  ...
  File "/usr/local/lib/python3.8/dist-packages/jtop/gui/pcpu.py", line 122, in print_cpu
    freq = cpu['freq']
KeyError: 'freq'

Credit goes to https://github.com/kentdotn for the fix idea in https://github.com/rbonghi/jetson_stats/issues/556#issuecomment-2339718856

rbonghi commented 1 month ago

Thank you! I'm merging and release a new version

rbonghi commented 1 month ago

Released on jetson-stats 4.2.11

sudo pip3 install -U jetson-stats