You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following code in python 3.10 with jtop 4.3.0:
importjtopjetson=NonewhileTrue:
try:
ifjetsonisNone:
print("Initializing jtop client...")
jetson=jtop.jtop()
jetson.start()
whilejetson.ok():
# Temperaturetemperatures=jetson.temperaturetemp_cpu=temperatures['cpu']['temp']
temp_gpu=temperatures['gpu']['temp']
print(f"Temperature CPU: {temp_cpu}ºC and GPU: {temp_gpu}ºC")
exceptjtop.JtopExceptionase:
print(f"Jtop error: {e}")
exceptExceptionase:
print(f"Error getting metrics: {e}")
finally:
try:
jetson.close() # Ensure the client is closedexceptExceptionasclose_error:
print(f"Error while closing jtop client: {close_error}")
jetson=None# Reset the reference
It works correctly until I stop and start again the jtop.service with systemctl command. I know from issue #261 that the jtop client must be restarted so that the SyncManager is restarted. However, I cannot get it working once the jtop service restarts.
Are I missing something? What should be the correct approach to restart jtop client?
Thanks
The text was updated successfully, but these errors were encountered:
This issue is related to the issue #261
I have the following code in python 3.10 with jtop 4.3.0:
It works correctly until I stop and start again the
jtop.service
withsystemctl
command. I know from issue #261 that the jtop client must be restarted so that the SyncManager is restarted. However, I cannot get it working once the jtop service restarts.Are I missing something? What should be the correct approach to restart jtop client?
Thanks
The text was updated successfully, but these errors were encountered: