rbonghi / jetson_stats

📊 Simple package for monitoring and control your NVIDIA Jetson [Orin, Xavier, Nano, TX] series

Home Page:https://rnext.it/jetson_stats

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash if dpkg is missing

evildeeds opened this issue · comments

Describe the bug

If dpkg is missing, for example if the system is a custom built yocto with meta-tegra then the following line will cuse an exception

dpkg = Command(['dpkg', '--get-selections'])
on line 204

To Reproduce

  1. Install jetson_stats on a system without dpkg; or forcefully unistall dpkg; or change line 203 to an invalid command
  2. Remove or rename /etc/nv_tegra_release if it exists
  3. (re-)start the jtop service
  4. See error in service log

Expected behavior

Looking at the function get_nvidia_l4t the intended behavior I would expect is to fail the version detection and return an empty string instead of crashing.

Perhaps check that dpkg exist first and if not then return false from check_dpkg_nvidia_l4t_core.

Board

  • jetson-stats version: 4.2.7
  • Jetpack: 5.1.3
  • L4T: 35.5.0

My solution will be to populate my image with /etc/nv_tegra_release