Skip to content

Commit 500499d

Browse files
committed
Merge branch 'develop'
2 parents 1212756 + 095b999 commit 500499d

18 files changed

+144
-47
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,16 @@ journalctl -u jtop.service -n 100 --no-pager
5858

5959
### Log from jetson-stats installation
6060

61-
Attach here the output from: `sudo -H pip3 install --no-cache-dir -U jetson-stats`
61+
Attach here the output from: `sudo -H pip3 install --no-cache-dir -v -U jetson-stats`
6262

6363
<!-- Use:
64-
sudo -H pip3 install --no-cache-dir -U jetson-stats
65-
-->
64+
sudo -H pip3 install --no-cache-dir -v -U jetson-stats
65+
-->
66+
67+
### RAW Data
68+
69+
File from `jtop --error-log` attached
70+
71+
<!-- Please attach the output from:
72+
jtop --error-log
73+
-->

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
_build/
66
dist/
77
doc/
8+
build/
89

910
# Python egg metadata, regenerated from source files by setuptools.
1011
/*.egg-info

docs/jtop/jtop.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,3 +304,30 @@ INFO
304304
This page show all technical information about your board. This output is available :py:attr:`jtop.jtop.board`.
305305

306306
Compare all previous versions, now the Serial number is hidden and you can enable only clicking on the area or pressing the key **s**.
307+
308+
Uninstall
309+
---------
310+
311+
For a complete and *manual* uninstall of this package on your device there are few steps to do
312+
313+
.. warning::
314+
315+
You need **super user** to execute the commands
316+
317+
.. code-block:: bash
318+
319+
# Stop, disable and remove jtop.service
320+
systemctl stop jtop.service
321+
systemctl disable jtop.service
322+
rm /etc/systemd/system/jtop.service
323+
# reload services
324+
systemctl daemon-reload
325+
326+
# remove jtop pipe
327+
rm /run/jtop.sock
328+
329+
# Remove enviroment variables
330+
rm /etc/profile.d/jtop_env.sh
331+
332+
# Uninstall python package
333+
pip3 uninstall jetson-stats

docs/troubleshooting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Before to open an `issue`_, try to reinstall the latest version with this comman
9797

9898
.. code-block:: bash
9999
100-
sudo pip3 install --no-cache-dir -U jetson-stats
100+
sudo pip3 install --no-cache-dir -v -U jetson-stats
101101
102102
Save the output somewhere, if this command doesn't fix can be helpful when you one an `issue`_.
103103

jtop/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
__copyright__ = "(c) 2024, Raffaello Bonghi"
3232
# Version package
3333
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#choosing-a-versioning-scheme
34-
__version__ = "4.2.4"
34+
__version__ = "4.2.5"
3535
# EOF

jtop/__main__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import signal
2020
import os
2121
import sys
22-
import locale
22+
# import locale
2323
import argparse
2424
# control command line
2525
import curses
@@ -94,8 +94,6 @@ def main():
9494
# Initialize signals
9595
# signal.signal(signal.SIGINT, exit_signal) # Do not needed equivalent to exception KeyboardInterrupt
9696
signal.signal(signal.SIGTERM, exit_signal)
97-
# https://stackoverflow.com/questions/56373360/n-curses-within-python-how-to-catch-and-print-non-ascii-character
98-
locale.setlocale(locale.LC_ALL, '')
9997
# Run jtop service
10098
if os.getenv('JTOP_SERVICE', False):
10199
# Initialize logging level
@@ -142,6 +140,9 @@ def main():
142140
sys.exit(0)
143141
# jtop client start
144142
try:
143+
# https://stackoverflow.com/questions/56373360/n-curses-within-python-how-to-catch-and-print-non-ascii-character
144+
# Commented for issues #466 #393
145+
# locale.setlocale(locale.LC_ALL, '')
145146
# Open jtop client
146147
with jtop(interval=interval) as jetson:
147148
# Call the curses wrapper

jtop/core/engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def read_engine(path):
5555

5656
class EngineService(object):
5757

58-
ENGINES = ['ape', 'dla', 'pva', 'vic', 'nvjpg', 'nvenc', 'nvdec', 'se.', 'cvnas', 'msenc']
58+
ENGINES = ['ape', 'dla', 'pva', 'vic', 'nvjpg', 'nvenc', 'nvdec', 'se.', 'cvnas', 'msenc', 'ofa']
5959

6060
def __init__(self):
6161
# Sort list before start

jtop/core/gpu.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
from .command import Command
2424
# Create logger
2525
logger = logging.getLogger(__name__)
26+
# default ipgu path for Jetson devices
27+
DEFAULT_IGPU_PATH = "/sys/class/devfreq/"
2628

2729

2830
def check_nvidia_smi():
@@ -95,6 +97,22 @@ def igpu_read_status(path):
9597
return gpu
9698

9799

100+
def get_raw_igpu_devices():
101+
igpu_path = DEFAULT_IGPU_PATH
102+
raw_output = {}
103+
for item in os.listdir(igpu_path):
104+
item_path = os.path.join(igpu_path, item)
105+
if os.path.isfile(item_path) or os.path.islink(item_path):
106+
# Check name device
107+
name_path = "{item}/device/of_node/name".format(item=item_path)
108+
if os.path.isfile(name_path):
109+
# Decode name
110+
name = cat(name_path)
111+
# path and file
112+
raw_output[name_path] = "{}".format(name)
113+
return raw_output
114+
115+
98116
def find_igpu(igpu_path):
99117
# Check if exist a integrated gpu
100118
# if not os.path.exists("/dev/nvhost-gpu") and not os.path.exists("/dev/nvhost-power-gpu"):
@@ -260,7 +278,7 @@ class GPUService(object):
260278

261279
def __init__(self):
262280
# Detect integrated GPU
263-
igpu_path = "/sys/class/devfreq/"
281+
igpu_path = DEFAULT_IGPU_PATH
264282
if os.getenv('JTOP_TESTING', False):
265283
igpu_path = "/fake_sys/class/devfreq/"
266284
logger.warning("Running in JTOP_TESTING folder={root_dir}".format(root_dir=igpu_path))

jtop/core/jetson_libraries.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
FileNotFoundError = IOError
2727

2828

29-
MODULES = ['cuDNN', 'TensorRT', 'VPI'] # 'Visionworks'
29+
MODULES = ['cuDNN', 'TensorRT.', 'VPI'] # 'Visionworks'
3030
CUDA_FILE_RE = re.compile(r'CUDA Version (.*)')
3131
CUDA_NVCC_RE = re.compile(r'V([0-9]+.[0-9]+.[0-9]+)')
3232

@@ -100,17 +100,24 @@ def get_libraries():
100100
# Find all modules
101101
modules = get_all_modules()
102102
for name in MODULES:
103-
os_variables[name] = ''
103+
# Fix TensorRT search #462
104+
name_dict = name[:-1] if name.endswith('.') else name
105+
os_variables[name_dict] = ''
104106
# Find version if installed
105107
for module, version in modules.items():
108+
if name.endswith('.') and name.lower()[:-1] == module:
109+
os_variables[name_dict] = version.split('-')[0]
110+
break
106111
if name.lower() in module:
107-
os_variables[name] = version.split('-')[0]
112+
os_variables[name_dict] = version.split('-')[0]
108113
break
109114
# Get Vulkan output
110115
cmd_vulkaninfo = Command(['which', 'vulkaninfo'])
111116
try:
112117
lines = cmd_vulkaninfo()
113118
# Extract version
119+
if not lines:
120+
raise Command.CommandException("Missing command", -3)
114121
cmd_vulkan = Command(lines)
115122
lines = cmd_vulkan()
116123
for line in lines:

jtop/core/jetson_variables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def read_i2c_raw_data(bus, registry, size_block):
177177
return string_data
178178

179179

180-
def get_raw_output():
180+
def get_jetson_raw_output():
181181
raw_output = {}
182182
# Catch all output from all files
183183
for file in RAW_FILES:

0 commit comments

Comments
 (0)