Giter Site home page Giter Site logo

rbonghi / jetson_stats Goto Github PK

View Code? Open in Web Editor NEW
2.1K 2.1K 250.0 29 MB

๐Ÿ“Š Simple package for monitoring and control your NVIDIA Jetson [Orin, Xavier, Nano, TX] series

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

License: GNU Affero General Public License v3.0

Shell 9.14% Python 90.68% Dockerfile 0.18%
cpu-monitoring gpu gpu-monitoring jetson jetson-config jetson-nano jetson-orin jetson-stats jetson-xavier jetson-xavier-nx jtop memory-monitoring nvidia nvidia-jetson pypi python tegra tegrastats

jetson_stats's Introduction

Hello There! General Kenobi!

I'm Raffaello Bonghi an ๐Ÿ‡ฎ๐Ÿ‡น Italian enthusiastic ๐Ÿค– robotics engineer, born in the eternal city of ๐Ÿ›ต Rome and now I'm living in ๐Ÿ‡ฌ๐Ÿ‡ง England.

I studied systems automation and robotics at ๐Ÿ‘จโ€๐ŸŽ“ University of Rome La Sapienza and ๐Ÿ‘จโ€๐ŸŽ“ Universite Paris-Sud, but I always made robots and open-source projects!

๐Ÿ† Panther

Panther is an outdoor tracked robot, with a ZED2 stereocamera and an NVIDIA Jetson AGX Xavier, this robot can interact with all objects around it. It's an AGV platform ROS based for Outdoor and Indoor enviroments.

๐Ÿฆ• nanosaur

nanosaur is a little tracked robot ROS2 enabled, made for an NVIDIA Jetson

๐Ÿ“Š jetson-stats

jetson-stats is a package for monitoring and control your NVIDIA Jetson [Orin, Xavier, Nano, TX] series. Works with all NVIDIA Jetson ecosystem.

jetson_stats's People

Contributors

alx avatar chitoku avatar cybrex86 avatar danielef avatar dependabot[bot] avatar dmbuck32 avatar griz1112 avatar gruentee avatar jaekyu-lee avatar johnnynunez avatar jthibbard avatar kitazaki avatar kyl0n avatar leonpano2006 avatar ligaz avatar mritun avatar notpallav avatar omerts avatar otherbarry avatar qqice avatar raymondcm avatar rbonghi avatar rbonghinv avatar snyk-bot avatar so0ni avatar thomas1430352 avatar velaia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jetson_stats's Issues

failed to start jtop

Hey,
The idea looks great but it failed to run on Jetson Xavier jetpack version 4.2 python 3.6.7

Extra logs info

  Running setup.py develop for jetson-stats
Successfully installed jetson-stats
   * Copy jetson_variables and jetson_performance
   * Copy jetson_env.sh in /etc/profile.d/
   * Copy jetson_variables and other scripts
DONE!
green@greeneye--dev2:~/stress/jetson_stats$ jtop
ERROR:jtop.jtop:Attribute error
Traceback (most recent call last):
  File "/home/green/stress/jetson_stats/jtop/jtop.py", line 222, in run
    self._jetsonstats = self.decode(tegrastats_data)
  File "/home/green/stress/jetson_stats/jtop/jtop.py", line 429, in decode
    ram_status, text = self._RAM(text)
  File "/home/green/stress/jetson_stats/jtop/jtop.py", line 375, in _RAM
    ram_string = re.search(r'RAM (.+?)B', text).group()
AttributeError: 'NoneType' object has no attribute 'group'
Traceback (most recent call last):
  File "/usr/local/bin/jtop", line 11, in <module>
    load_entry_point('jetson-stats', 'console_scripts', 'jtop')()
  File "/home/green/stress/jetson_stats/jtop/__main__.py", line 152, in main
    curses.wrapper(gui, args, jetson)
  File "/usr/lib/python3.6/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/green/stress/jetson_stats/jtop/__main__.py", line 96, in gui
    pages.draw(tegra)
  File "/home/green/stress/jetson_stats/jtop/jtopguilib.py", line 46, in wrapped
    return func(self, *args, **kwargs)
  File "/home/green/stress/jetson_stats/jtop/jtopgui.py", line 192, in draw
    page(self.stdscr, stat)
  File "/home/green/stress/jetson_stats/jtop/jtopgui.py", line 116, in all_info
    line_counter = plot_CPUs(stdscr, line_counter, jetson.stats['CPU'], width)
  File "/home/green/stress/jetson_stats/jtop/jtopguilib.py", line 81, in wrapped
    return func(*args, **kwargs)
  File "/home/green/stress/jetson_stats/jtop/jtopguimenu.py", line 53, in plot_CPUs
    linear_percent_gauge(stdscr, gauge, max_bar, offest + off_idx, start)
  File "/home/green/stress/jetson_stats/jtop/jtopguilib.py", line 81, in wrapped
    return func(*args, **kwargs)
  File "/home/green/stress/jetson_stats/jtop/jtopguilib.py", line 160, in linear_percent_gauge
    stdscr.addstr(offset, start, ("{short_name:" + str(name_size) + "}").format(short_name=gauge['name']), curses.color_pair(color_name))
TypeError: integer argument expected, got float
green@greeneye--dev2:~/stress/jetson_stats$ sudo ./install.sh --uninstall

sudo jtop --debug
Traceback (most recent call last):
  File "/usr/local/bin/jtop", line 11, in <module>
    load_entry_point('jetson-stats', 'console_scripts', 'jtop')()
  File "/home/green/stress/jetson_stats/jtop/__main__.py", line 152, in main
    curses.wrapper(gui, args, jetson)
  File "/usr/lib/python3.6/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/green/stress/jetson_stats/jtop/__main__.py", line 96, in gui
    pages.draw(tegra)
  File "/home/green/stress/jetson_stats/jtop/jtopguilib.py", line 46, in wrapped
    return func(self, *args, **kwargs)
  File "/home/green/stress/jetson_stats/jtop/jtopgui.py", line 187, in draw
    self.header()
  File "/home/green/stress/jetson_stats/jtop/jtopguilib.py", line 81, in wrapped
    return func(*args, **kwargs)
  File "/home/green/stress/jetson_stats/jtop/jtopgui.py", line 210, in header
    board_info = os.environ["JETSON_DESCRIPTION"] + " - Jetpack " + os.environ["JETSON_JETPACK"] + " [L4T " + os.environ["JETSON_L4T"] + "]"
  File "/usr/lib/python3.6/os.py", line 669, in __getitem__
    raise KeyError(key) from None
KeyError: 'JETSON_DESCRIPTION'

does not find tegrastats despite its installed

tegrastats is installed under a custom user, which is also the main user running the program.
Tegrastats is located in "/usr/sbin/tegrastats" and can be executed from the commandline as "tegrastats".

But the output of jtop only shows "Tegrastats is not availabe on this board".

  • Does jtop use only the path defined in jtop.py or are there other paths defined else where?
  • Is there an option to point it to the tegrastats path besides the TEGRASTATS variable in jtop.py ?

If the paths in the TEGRASTATS variable are changed, jtop crashes.

Changing the paths from

# List of available fan
    JTOP_FOLDER = '/opt/jetson_stats/'
    LIST_FANS = [('/sys/kernel/debug/tegra_fan/', False), ('/sys/devices/pwm-fan/', True)]
    TEGRASTATS = ['/usr/bin/tegrastats', '/home/nvidia/tegrastats']

to the current path

# List of available fan
    JTOP_FOLDER = '/opt/jetson_stats/'
    LIST_FANS = [('/sys/kernel/debug/tegra_fan/', False), ('/sys/devices/pwm-fan/', True)]
    TEGRASTATS = ['/usr/sbin/tegrastats']

crashes the program

dist-pacuser@vm:/usr/local/lib/python3.5/dist-packages/jtop$ sudo jtop
Traceback (most recent call last):
  File "/usr/local/bin/jtop", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/jtop/__main__.py", line 62, in main
    curses.wrapper(JTOPGUI, args.refresh, jetson, [ALL, GPU, CTRL, INFO], init_page=args.page)
  File "/usr/lib/python3.5/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/local/lib/python3.5/dist-packages/jtop/gui/jtopgui.py", line 78, in __init__
    self.run()
  File "/usr/local/lib/python3.5/dist-packages/jtop/gui/jtopgui.py", line 99, in run
    self.draw()
  File "/usr/local/lib/python3.5/dist-packages/jtop/gui/jtopguilib.py", line 71, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/jtop/gui/jtopgui.py", line 110, in draw
    page.draw(self.key)
  File "/usr/local/lib/python3.5/dist-packages/jtop/gui/pall.py", line 43, in draw
    line_counter = plot_CPUs(self.stdscr, line_counter, self.jetson.stats['CPU'], width)
  File "/usr/local/lib/python3.5/dist-packages/jtop/gui/jtopguilib.py", line 107, in wrapped
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/jtop/gui/jtopguimenu.py", line 48, in plot_CPUs
    return int(offest + idx + 1)
UnboundLocalError: local variable 'idx' referenced before assignment

jtop not working

The following error is occurring whenever i run sudo jtop

user@localhost:~$ sudo jtop
Traceback (most recent call last):
  File "/usr/local/bin/jtop", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/jtop/__main__.py", line 64, in main
    curses.wrapper(JTOPGUI, args.refresh, jetson, [ALL, GPU, MEM, CTRL, INFO], init_page=args.page)
  File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/local/lib/python2.7/dist-packages/jtop/gui/jtopgui.py", line 78, in __init__
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/jtop/gui/jtopgui.py", line 103, in run
    self.draw()
  File "/usr/local/lib/python2.7/dist-packages/jtop/gui/jtopguilib.py", line 71, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/jtop/gui/jtopgui.py", line 110, in draw
    self.header()
  File "/usr/local/lib/python2.7/dist-packages/jtop/gui/jtopguilib.py", line 107, in wrapped
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/jtop/gui/jtopgui.py", line 139, in header
    set_xterm_title("jtop" + xterm_line(self.jetson))
  File "/usr/local/lib/python2.7/dist-packages/jtop/gui/jtopguilib.py", line 31, in xterm_line
    str_xterm = " " + jetson.board["board"]["Type"]
  File "/usr/local/lib/python2.7/dist-packages/jtop/jtop.py", line 194, in board
    "SN": os.environ["JETSON_SERIAL_NUMBER"].upper()}
  File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
    raise KeyError(key)
KeyError: 'JETSON_SERIAL_NUMBER'

how ever jtop without sudo runs fine, it all happened after i upgraded jetson-stats
I am using Agx-Xavier.

Add new Drivers

Following the @Rafcin issue #8 I open this new Issue to reply directly about it:

If I flash the Jetpack 4.1.1 it won't overwrite my system right files right?

Also run this to fix the Mbs rate. By default its slow so even if you add a Ethernet cable it will be terribly slow.
echo "options iwlwifi 11n_disable=8" | sudo tee -a /etc/modprobe.d/iwlwifi.conf

Also sorry I might be mistaken, but if you have the ability to modify the kernel, can you enable V4L2 drivers.
Device Drivers -> Multimedia Support -> Media USB Adapters -> USB Video Class V4L2
Sorry if its confusing, its 5am ๐Ÿ’ฏ

ValueError with sudo jtop

Hello @rbonghi

I am getting started with the Jetson TX2 and I have the following error when running sudo jtop:

Traceback (most recent call last):
  File "/usr/local/bin/jtop", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/jtop/__main__.py", line 92, in main
    curses.wrapper(JTOPGUI, args.refresh, jetson, [ALL, GPU, MEM, CTRL, INFO], init_page=args.page)
  File "/usr/lib/python3.6/curses/__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/local/lib/python3.6/dist-packages/jtop/gui/jtopgui.py", line 97, in __init__
    self.run()
  File "/usr/local/lib/python3.6/dist-packages/jtop/gui/jtopgui.py", line 127, in run
    self.draw()
  File "/usr/local/lib/python3.6/dist-packages/jtop/gui/jtopguilib.py", line 71, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/jtop/gui/jtopgui.py", line 138, in draw
    page.draw(self.key)
  File "/usr/local/lib/python3.6/dist-packages/jtop/gui/pall.py", line 161, in draw
    mini(self.stdscr, idx * column_width, line_counter, column_width, self.jetson)
  File "/usr/local/lib/python3.6/dist-packages/jtop/gui/jtopguilib.py", line 107, in wrapped
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/jtop/gui/jtopguimenu.py", line 158, in compact_info
    jc_status = jc.status
  File "/usr/local/lib/python3.6/dist-packages/jtop/core/jetson_clocks.py", line 128, in status
    show = self.show()
  File "/usr/local/lib/python3.6/dist-packages/jtop/core/jetson_clocks.py", line 85, in show
    str(match.group(9)): int(match.group(10))}}
ValueError: invalid literal for int() with base 10: '1 c7=1 '

Just running jtop gives no error though.
I have the version 2.0.1 and already tried to reinstall with:

sudo -H pip3 uninstall jetson-stats
sudo -H pip3 install --no-cache-dir jetson-stats --upgrade

This did not solved the problem.
As I saw in similar issues, this might be related to the environment variables so here are mine:

~$ env | grep JETSON
JETSON_TYPE=TX2
JETSON_BOARDIDS=3310:0000:A0
JETSON_CUDA_ARCH_BIN=6.2
JETSON_CHIP_ID=24
JETSON_OPENCV=4.1.1
JETSON_L4T_RELEASE=32
JETSON_L4T=32.3.1
JETSON_VISIONWORKS=1.6.0.500n
JETSON_OPENCV_CUDA=NO
JETSON_SOC=tegra186
JETSON_MACHINE=NVIDIA Jetson TX2
JETSON_JETPACK=4.3
JETSON_CODENAME=quill
JETSON_CUDA=10.0.326
JETSON_L4T_REVISION=3.1
JETSON_SERIAL_NUMBER=1420120029923
JETSON_BOARD=P3310-1000
JETSON_TENSORRT=6.0.1.10
JETSON_CUDNN=7.6.3.28

Thanks in advance!

jtop should not print Total value as sum of POM_5V_IN, POM_5V_GPU and POM_5V_CPU

When running jtop I noticed that Total Power is greater than POM_5V_IN:
Screenshot_20200321_210452
According to https://forums.developer.nvidia.com/t/power-consumption-monitoring/73608/8 "POM_5V_IN measures the overall 5V input to the board, it represents the total power consumption. You donโ€™t need to add POM_5V_GPU and POM_5V_CPU to it. The GPU/CPU rails are provided for extra reference."

That means Total row is always wrong and correct total value is given by POM_5V_IN. I suggest to either remove Total row or make it equal to POM_5V_IN, or rename "POM_5V_IN" to "POM_5V_IN (Total)".

Run on Jetson Nano got error

sudo jtop --debug
Traceback (most recent call last):
File "/usr/local/bin/jtop", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/jtop/main.py", line 152, in main
curses.wrapper(gui, args, tegra)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python2.7/dist-packages/jtop/main.py", line 98, in gui
pages.draw(stat)
File "/usr/local/lib/python2.7/dist-packages/jtop/jtopgui.py", line 173, in draw
page(self.stdscr, stat)
File "/usr/local/lib/python2.7/dist-packages/jtop/jtopgui.py", line 99, in all_info
line_counter = plot_CPUs(stdscr, line_counter, jetsonstats['CPU'], width)
File "/usr/local/lib/python2.7/dist-packages/jtop/jtopguilib.py", line 135, in plot_CPUs
linear_percent_gauge(stdscr, gauge, max_bar, offest + off_idx, start)
File "/usr/local/lib/python2.7/dist-packages/jtop/jtopguilib.py", line 115, in linear_percent_gauge
stdscr.addstr(offset, start + 6 + size_bar - len(grey_part), grey_part, curses.A_DIM)
_curses.error: addstr() returned ERR

Uninstaller step in Wiki

nvidia@tegra-ubuntu:~/jetson_stats$ ./install_jetson_easy.sh -uninstallshould be replaced with nvidia@tegra-ubuntu:~/jetson_stats$ ./install_jetson_stats.sh -uninstall

crash

hey @rbonghi

From time to time I have this crash (not all the time that's the weird part) :

nvidia@tegra-ubuntu:~$ sudo jtop
[sudo] password for nvidia:
Traceback (most recent call last):
File "/usr/local/bin/jtop", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/jtop/main.py", line 162, in main
curses.wrapper(gui, args, tegra)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python2.7/dist-packages/jtop/main.py", line 115, in gui
key = stdscr.getch()
File "/usr/local/lib/python2.7/dist-packages/jtop/main.py", line 65, in signal_handler
tegra.close()
NameError: global name 'tegra' is not defined

ValueError: invalid literal for int() with base 10: 'NV Power Mode: 5W'

Can't run jtop on Jetson Nano running L4T 32.2 from JetPack 4.2.1

sudo jtop fails with an error:
Traceback (most recent call last):
File "/usr/local/bin/jtop", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/jtop/main.py", line 108, in main
with jtop(interval=args.refresh) as jetson:
File "/usr/local/lib/python3.6/dist-packages/jtop/jtop.py", line 76, in init
self.nvp = NVPmodel(os.environ["JETSON_TYPE"], jetson_clocks=self.jc)
File "/usr/local/lib/python3.6/dist-packages/jtop/core/nvpmodel.py", line 102, in init
self.update()
File "/usr/local/lib/python3.6/dist-packages/jtop/core/nvpmodel.py", line 155, in update
self.num = int(lines[1])
ValueError: invalid literal for int() with base 10: 'NV Power Mode: 5W'

I've installed jetson-stats-1.7.3.tar.gz using pip
The kernel is 4.9.140-tegra

Jtop not working

Thanks for building this useful tool. Unfortunately, jtop doesn't run on my Jetson. I get this error:

Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner self.run()
File "/etc/jetson_easy/jtop/jtoplib.py", line 69, in run self.jetsonstats = self.decode(tegrastats_data)
File "/etc/jetson_easy/jtop/jtoplib.py", line 217, in decode lines = nvpmodel.split("\n")
TypeError: a bytes-like object is required, not 'str'

Here's my output 'from jetson_release':

  • NVIDIA Jetson TX2
    • Jetpack 3.3 | 3.2.1 [L4T 28.2.1]
    • CUDA GPU architecture 6.2
    • NV Power Mode: MAXN - Type: 0
  • Libraries:
    • CUDA 9.0.252
    • cuDNN 7.1.5.14-1+cuda9.0
    • TensorRT 4.0.2.0-1+cuda9.0
    • Visionworks NOT_INSTALLED
    • OpenCV 3.3.1 compiled CUDA: NO
  • Jetson Performance: inactive
  • Jetson Easy v1.5.2

jetson_release shows OpenCV 4.1.1 + CUDA installed but only header files are installed

The jetson_release script (which depends on output of jetson_variables which in turn depends on output of opencv_version shows that (on my system) OpenCV 4.1.1 is installed and compiled with CUDA support but I could not find any OpenCV 4.1.1 files other than the header files for C++, no native libraries or Python bindings. This might actually be an opencv_version bug but starting here.

$ jetson_release
- NVIDIA Jetson NANO/TX1
- Jetpack 4.3 [L4T 32.3.1]
- CUDA GPU architecture 5.3
- Libraries:
- CUDA 10.0.326
- cuDNN 7.6.3.28-1+cuda10.0
- TensorRT 6.0.1.10-1+cuda10.0
- Visionworks 1.6.0.500n
- OpenCV 4.1.1 compiled CUDA: YES
- Jetson Performance: inactive

Typo in README.md

Just a quick fix.

The readme shows "jetson-release" instead of "jetson_release"

cannot start jtop

There is the error I get:

`Traceback (most recent call last):
  File "/usr/local/bin/jtop", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/jtop/__main__.py", line 139, in main
    with jtop(interval=args.refresh) as jetson:
  File "/usr/local/lib/python3.6/dist-packages/jtop/jtop.py", line 81, in __init__
    self.qfan = Fan(path, interval, time)
  File "/usr/local/lib/python3.6/dist-packages/jtop/core/fan.py", line 69, in __init__
    for line in pwm_rpm_table.split("\n"):
TypeError: a bytes-like object is required, not 'str'
`

Thanks!

Cannot restore default fan settings

After using jtop, I cannot restore the default fan settings.

Before I used jtop, the fan came on automatically around 59C and shut off automatically around 43C. After using jtop, this I cannot restore the default settings to go back to this behavior.

Thanks

Restore temperature control in jetson_clocks

Use the variable in /sys/devices/pwm-fan/temp_control to set and unset the temperature control.

  • Add in loop temperature control status
  • Add label in GUI
  • Improve jetson_performance service to read value fan and temperature control and set every jetson_clocks startup

Running from terminal support

Could it be possible running jtop from a terminal?

From cygwin I get

Traceback (most recent call last):
File "/usr/local/bin/jtop", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/jtop/main.py", line 99, in main
curses.wrapper(JTOPGUI, args.refresh, jetson, [ALL, GPU, CTRL, INFO], init_page=args.page)
File "/usr/lib/python3.6/curses/init.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python3.6/dist-packages/jtop/gui/jtopgui.py", line 76, in init
self.run()
File "/usr/local/lib/python3.6/dist-packages/jtop/gui/jtopgui.py", line 86, in run
curses.curs_set(0)
_curses.error: curs_set() returned ERR

Removing line 86 from jtopgui.py fixes this. But some characters are strange.

Jtop Error Entering CTRL Screen

Hi,

Your last update seems to have broken the jtop ctrl page. Every time I try getting into it it gives me the following error. I am running JetPack 4.2 on the Nvidia Jetson TX2.

nvidia@nvidia-desktop:~$ sudo jtop
Traceback (most recent call last):
  File "/usr/local/bin/jtop", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/jtop/__main__.py", line 62, in main
    curses.wrapper(JTOPGUI, args.refresh, jetson, [ALL, GPU, CTRL, INFO], init_page=args.page)
  File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/local/lib/python2.7/dist-packages/jtop/gui/jtopgui.py", line 78, in __init__
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/jtop/gui/jtopgui.py", line 99, in run
    self.draw()
  File "/usr/local/lib/python2.7/dist-packages/jtop/gui/jtopguilib.py", line 71, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/jtop/gui/jtopgui.py", line 110, in draw
    page.draw(self.key)
  File "/usr/local/lib/python2.7/dist-packages/jtop/gui/jtopguilib.py", line 107, in wrapped
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/jtop/gui/pcontrol.py", line 83, in draw
    ctrl_stat = "Enable" if fan['ctrl'] else "Disable" if 'ctrl' in fan else ""
KeyError: 'ctrl'

"Flickering" values

Values are updated pretty often on screen (at least using ssh) and they are sometimes hard to read.
A suggestion may be to perform a moving average of all values in background and show the averaged result once/twice per second.

my only complain about JTop

hey Raffaello,

My only complain about this tool, is where your name is shown in the UI. I understand that it have to be in, but maybe at the top right would be better because when I share a screenshot, it's like I am sharing that with your name on it :)

Remove jetson-docker

Now from jetpack 4.2.1 the jetson-docker is not required.

From this jetpack the jetson-docker will be not installed anymore

Jetson_clocks.sh delay required even with R28.2

Despite what is stated in this post:
https://devtalk.nvidia.com/default/topic/1027388/jetson-tx2/jetson_clock-sh-1-minute-delay/
the 60 seconds of delay after boot are still required in R28.2 to get all the CPUs and the GPU clocked at max frequency.

I tested removing the version control at line
https://github.com/rbonghi/jetson_easy/blob/master/jetson/jetson_performance.sh#L102
and I reinstalled the service. During the next reboot the fan started to spin after 60 seconds and the clocks of all the CPUs and of the GPU has been correctly set to max frequency.

jtop raises IndexError

I saw there were a couple of other complaints around this tool recently.
This is what I get when running on the Jetson Nano:

$ sudo jtop --debug
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.6/dist-packages/jtop/core/tegrastats.py", line 117, in run
    stats = self.decode(tegrastats_data)
  File "/usr/local/lib/python3.6/dist-packages/jtop/core/tegrastats.py", line 368, in decode
    volt['average'].append(float(value[1]))
IndexError: list index out of range

Edit:
On a side note, as a fellow Python programmer, it may be wise to use dict.get() when reading uncertain keys from a dictionary.

ZSWAP support.

Could be possible add stats for ZSWAP if is activated in kernel? It is a nice peace of software,congrats

unbound local error

jtop fails to start on nvidia TX2.
installed via sudo -H pip3 install jetson-stats

โžœ ~ sudo jtop Traceback (most recent call last): File "/usr/local/bin/jtop", line 11, in <module> sys.exit(main()) File "/usr/local/lib/python3.5/dist-packages/jtop/__main__.py", line 64, in main curses.wrapper(JTOPGUI, args.refresh, jetson, [ALL, GPU, CTRL, INFO], init_page=args.page) File "/usr/lib/python3.5/curses/__init__.py", line 94, in wrapper return func(stdscr, *args, **kwds) File "/usr/local/lib/python3.5/dist-packages/jtop/gui/jtopgui.py", line 78, in __init__ self.run() File "/usr/local/lib/python3.5/dist-packages/jtop/gui/jtopgui.py", line 99, in run self.draw() File "/usr/local/lib/python3.5/dist-packages/jtop/gui/jtopguilib.py", line 71, in wrapped return func(self, *args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/jtop/gui/jtopgui.py", line 110, in draw page.draw(self.key) File "/usr/local/lib/python3.5/dist-packages/jtop/gui/pall.py", line 43, in draw line_counter = plot_CPUs(self.stdscr, line_counter, self.jetson.stats['CPU'], width) File "/usr/local/lib/python3.5/dist-packages/jtop/gui/jtopguilib.py", line 107, in wrapped return func(*args, **kwargs) File "/usr/local/lib/python3.5/dist-packages/jtop/gui/jtopguimenu.py", line 48, in plot_CPUs return int(offest + idx + 1) UnboundLocalError: local variable 'idx' referenced before assignment

ModuleNotFoundError: No module named 'jtopguilib'

Thanks for making this tool available.

I installed jetson_stats as instructed (sudo -H pip install -U jetson-stats), then I ran jtop, only to get the following error:

$ sudo jtop
Traceback (most recent call last):
  File "/usr/local/bin/jtop", line 6, in <module>
    from jtop.__main__ import main
  File "/usr/local/lib/python3.6/dist-packages/jtop/__main__.py", line 54, in <module>
    from .jtopgui import JTOPGUI, all_info, GPU, Variables
  File "/usr/local/lib/python3.6/dist-packages/jtop/jtopgui.py", line 31, in <module>
    from jtopguilib import *
ModuleNotFoundError: No module named 'jtopguilib'

Some additional info:

$ sudo nvpmodel -q
NV Power Mode: MAXN
0

Please advise, thanks.

Support for Xavier

Hi @rbonghi ,
Very nice and useful utility, thanks :)
Any chance to get an update so it also covers the Xavier ?

"Q" key to close

Use "Q" key to close as it is standard among all *top utilities

Add CPU page

More details about CPU architecture

  • Architecture
  • Platform

NameError

Running the pip version, I get that error :

Traceback (most recent call last): File "/usr/local/bin/jtop", line 11, in <module> sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/jtop/__main__.py", line 162, in main curses.wrapper(gui, args, tegra) File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper return func(stdscr, *args, **kwds) File "/usr/local/lib/python2.7/dist-packages/jtop/__main__.py", line 108, in gui stat = tegra.read File "/usr/local/lib/python2.7/dist-packages/jtop/jtop.py", line 142, in read while not self._jetsonstats: File "/usr/local/lib/python2.7/dist-packages/jtop/__main__.py", line 65, in signal_handler tegra.close() NameError: global name 'tegra' is not defined

I am running it on a TX1:

declare -x JETSON_BOARD="TX1"
declare -x JETSON_CUDA="9.0.252"
declare -x JETSON_CUDA_ARCH_BIN="5.3"
declare -x JETSON_CUDNN="7.1.5.14-1+cuda9.0"
declare -x JETSON_DESCRIPTION="NVIDIA Jetson NANO/TX1"
declare -x JETSON_JETPACK="3.2"
declare -x JETSON_L4T="28.2.0"
declare -x JETSON_L4T_RELEASE="28"
declare -x JETSON_L4T_REVISION="2.0"
declare -x JETSON_OPENCV="4.1.0"
declare -x JETSON_OPENCV_CUDA="YES"
declare -x JETSON_TENSORRT="4.0.2.0-1+cuda9.0"
declare -x JETSON_TYPE="NANO/TX1"
declare -x JETSON_VISIONWORKS="1.6.0.500n"

nvidia@tegra-ubuntu:~/Desktop$ jetson-release
/usr/local/bin/jetson-release: line 40: /etc/jetson_easy/jetson_variables: No such file or directory

  • NVIDIA Jetson NANO/TX1
    • Jetpack 3.2 [L4T 28.2.0]
    • CUDA GPU architecture 5.3
  • Libraries:
    • CUDA 9.0.252
    • cuDNN 7.1.5.14-1+cuda9.0
    • TensorRT 4.0.2.0-1+cuda9.0
    • Visionworks 1.6.0.500n
    • OpenCV 4.1.0 compiled CUDA: YES
  • Jetson Performance: inactive

How to use in virtual env?

I have installed jetson_stats as per the README with sudo -H pip install -U jetson-stats.

I want to use the jetson stats as a library inside my own python script which I develop in a python virtual env. I'm unable to do from jtop import jtop as per your examples.

I tried doing the pip install from within my virtual env but it made no difference and I suspect its because of running it with sudo.

Any ideas how I could use jtop in a python virtual environment?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.