安装jetson-stats(前提:安装pip3)
sudo pip3 install jetson-stats
执行jtop,根据提示需要重启服务
-
sudo systemctl restart jtop.service
-
sudo jtop
正常显示jtop界面,如遇到下面报错信息:
File "/usr/local/bin/jtop", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/jtop/main.py", line 160, in main
curses.wrapper(JTOPGUI, jetson, pages, init_page=args.page,
File "/usr/lib/python3.8/curses/init.py", line 105, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/jtopgui.py", line 100, in init
self.run(loop, seconds)
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/jtopgui.py", line 129, in run
self.draw()
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/jtopgui.py", line 143, in draw
page.draw(self.key, self.mouse)
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/pall.py", line 190, in draw
func(self.stdscr, pos_y_mini_menu, column_width * nline, column_width, column_height, self.jetson)
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/pengine.py", line 115, in compact_engines
size_eng = size_table // len(row) - 1
ZeroDivisionError: integer division or modulo by zero
修改 /usr/local/lib/python3.8/dist-packages/jtop/gui/pengine.py 文件中的下面函数,即可正常。
def pass_orin(engine):
return [
add_engine_in_list('APE', engine, 'APE', 'APE') + add_engine_in_list('PVA0a', engine, 'PVA0', 'PVA0_CPU_AXI'),
add_engine_in_list('DLA0c', engine, 'DLA0', 'DLA0_CORE') + add_engine_in_list('DLA1c', engine, 'DLA1', 'DLA1_CORE') + add_engine_in_list('DLA1c', engine, 'DLA', 'DLA1_CORE'),
add_engine_in_list('NVENC', engine, 'NVENC', 'NVENC') + add_engine_in_list('NVDEC', engine, 'NVDEC', 'NVDEC'),
add_engine_in_list('NVJPG', engine, 'NVJPG', 'NVJPG') + add_engine_in_list('NVJPG1', engine, 'NVJPG', 'NVJPG1'),
add_engine_in_list('SE', engine, 'SE', 'SE') + add_engine_in_list('VIC', engine, 'VIC', 'VIC'),
]