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.08k stars 250 forks source link

Fix the crash caused by newly started process while jtop is running #519

Closed gztong closed 1 month ago

gztong commented 1 month ago

Fixes #499

rbonghi commented 1 month ago

Hi @gztong

Thank you very much for your PR! I really appreciate any type of support :-)

Can you help me understand your fix? I see that you canceled the if condition on the processes table. Have you tried jtop when there are no GPU processes running?

gztong commented 1 month ago

Hi @rbonghi , Thanks for getting back to me!

Can you help me understand your fix?

The fix simply adds the ProcessTable even IF there is no GPU process at first during the ALL object init. So that while jtop is running, if a new GPU process starts, jtop can add it to the process table for drawing.

Have you tried jtop when there are no GPU processes running?

Yes, I did. In this case, the process table is simply empty. I don't see any issues.

rbonghi commented 1 month ago

Thank you @gztong I also noticed a similar call in another part of the code. Let me merge on develop branch