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.14k stars 261 forks source link

jtop stops returning values while periodically logging #158

Closed C-monC closed 1 year ago

C-monC commented 3 years ago

Hi,

I use jtop to periodically log jetson stats. Jtop correctly returns the stats for an hour or two every 5 minutes after which it hangs. Killing the python program and running jtop in a terminal returns nothing and also hangs (after a reboot jtop works again). Although there is no output, running a minimal jtop test in a debugger shows it freezes on the following line s.connect(address). The code:

from jtop import jtop

with jtop() as jetson:
    stats = jetson.stats
    print(stats)

Line on which it freezes:

Traceback (most recent call last):
  File "/home/oob1/jetsonServer/server/test.py", line 3, in <module>
    with jtop() as jetson:
  File "/usr/local/lib/python3.6/dist-packages/jtop/jtop.py", line 1081, in __enter__
    self.start()
  File "/usr/local/lib/python3.6/dist-packages/jtop/jtop.py", line 927, in start
    self._broadcaster.connect()
  File "/usr/lib/python3.6/multiprocessing/managers.py", line 489, in connect
    conn = Client(self._address, authkey=self._authkey)
  File "/usr/lib/python3.6/multiprocessing/connection.py", line 487, in Client
    c = SocketClient(address)
  File "/usr/lib/python3.6/multiprocessing/connection.py", line 614, in SocketClient
    s.connect(address)
KeyboardInterrupt

jtop -v = 3.1.0

rbonghi commented 1 year ago

This error should now be fixed with the latest release 4.0 try to install and check again

sudo -H pip install -U jetson-stats