jetson-stats 1.7.6__tar.gz → 2.0.0.dev4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/LICENSE +0 -0
  2. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/MANIFEST.in +10 -0
  3. {jetson-stats-1.7.6/jetson_stats.egg-info → jetson-stats-2.0.0.dev4}/PKG-INFO +20 -15
  4. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/README.md +14 -11
  5. jetson-stats-2.0.0.dev4/docs/Makefile +20 -0
  6. jetson-stats-2.0.0.dev4/docs/make.bat +35 -0
  7. jetson-stats-2.0.0.dev4/docs/source/conf.py +64 -0
  8. jetson-stats-2.0.0.dev4/docs/source/index.rst +22 -0
  9. jetson-stats-2.0.0.dev4/docs/source/jtop.rst +19 -0
  10. jetson-stats-2.0.0.dev4/docs/source/modules.rst +7 -0
  11. jetson-stats-2.0.0.dev4/examples/jtop_callback.py +39 -0
  12. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/examples/jtop_server.py +0 -0
  13. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/examples/log_data.py +0 -0
  14. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/examples/quick_read.py +2 -2
  15. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4/jetson_stats.egg-info}/PKG-INFO +20 -15
  16. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jetson_stats.egg-info/SOURCES.txt +16 -7
  17. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jetson_stats.egg-info/dependency_links.txt +0 -0
  18. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jetson_stats.egg-info/entry_points.txt +0 -0
  19. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jetson_stats.egg-info/not-zip-safe +0 -0
  20. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jetson_stats.egg-info/top_level.txt +0 -0
  21. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jtop/__init__.py +5 -3
  22. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jtop/__main__.py +49 -9
  23. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jtop/core/__init__.py +1 -0
  24. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jtop/core/common.py +2 -2
  25. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jtop/core/fan.py +57 -16
  26. jetson-stats-2.0.0.dev4/jtop/core/jetson_clocks.py +204 -0
  27. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jtop/core/nvpmodel.py +3 -4
  28. jetson-stats-2.0.0.dev4/jtop/core/swap.py +148 -0
  29. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jtop/core/tegra_parse.py +4 -4
  30. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jtop/core/tegrastats.py +8 -6
  31. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jtop/gui/__init__.py +1 -0
  32. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jtop/gui/jtopgui.py +58 -16
  33. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jtop/gui/jtopguilib.py +50 -19
  34. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jtop/gui/jtopguimenu.py +73 -18
  35. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jtop/gui/pall.py +10 -7
  36. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jtop/gui/pcontrol.py +54 -23
  37. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jtop/gui/pgpu.py +31 -14
  38. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jtop/gui/pinfo.py +15 -8
  39. jetson-stats-2.0.0.dev4/jtop/gui/pmem.py +206 -0
  40. {jetson-stats-1.7.6/scripts → jetson-stats-2.0.0.dev4/jtop}/jetson_variables +123 -82
  41. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/jtop/jtop.py +109 -104
  42. jetson-stats-2.0.0.dev4/scripts/jetson_config +856 -0
  43. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/scripts/jetson_docker +0 -0
  44. jetson-stats-2.0.0.dev4/scripts/jetson_release +161 -0
  45. jetson-stats-2.0.0.dev4/scripts/jetson_swap +131 -0
  46. {jetson-stats-1.7.6/scripts → jetson-stats-2.0.0.dev4/services}/jetson_env.sh +14 -2
  47. {jetson-stats-1.7.6/scripts → jetson-stats-2.0.0.dev4/services}/jetson_performance.service +3 -3
  48. {jetson-stats-1.7.6/scripts → jetson-stats-2.0.0.dev4/services}/jetson_performance.sh +6 -11
  49. jetson-stats-1.7.6/scripts/jetson_fan.service → jetson-stats-2.0.0.dev4/services/jetson_stats_boot.service +1 -1
  50. jetson-stats-1.7.6/scripts/jetson_fan.sh → jetson-stats-2.0.0.dev4/services/jetson_stats_boot.sh +4 -7
  51. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/setup.cfg +0 -1
  52. {jetson-stats-1.7.6 → jetson-stats-2.0.0.dev4}/setup.py +57 -15
  53. jetson-stats-1.7.6/jtop/core/jetson_clocks.py +0 -69
  54. jetson-stats-1.7.6/scripts/install.sh +0 -411
  55. jetson-stats-1.7.6/scripts/jetson_release +0 -73
  56. jetson-stats-1.7.6/scripts/jetson_swap +0 -74
File without changes
@@ -23,5 +23,15 @@ include LICENSE
23
23
  # Include the data files
24
24
  recursive-include scripts *
25
25
 
26
+ # Include services files
27
+ recursive-include services *.service
28
+ recursive-include services *.sh
29
+
26
30
  # Include examples files
27
31
  recursive-include examples *.py
32
+
33
+ # Documentation
34
+ recursive-include docs *.bat
35
+ recursive-include docs *.py
36
+ recursive-include docs *.rst
37
+ recursive-include docs Makefile
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jetson-stats
3
- Version: 1.7.6
3
+ Version: 2.0.0.dev4
4
4
  Summary: Interactive system-monitor and process viewer for all NVIDIA Jetson [Nano, AGX Xavier, TX1, TX2]
5
5
  Home-page: https://github.com/rbonghi/jetson_stats
6
6
  Author: Raffaello Bonghi
@@ -8,18 +8,20 @@ Author-email: raffaello@rnext.it
8
8
  License: AGPL-3.0
9
9
  Download-URL: https://github.com/rbonghi/jetson_stats/archive/master.zip
10
10
  Project-URL: Source, https://github.com/rbonghi/jetson_stats/tree/master
11
- Project-URL: How To, https://github.com/rbonghi/jetson_stats/tree/master/docs
11
+ Project-URL: How To, https://rbonghi.github.io/jetson_stats
12
12
  Project-URL: Bug Reports, https://github.com/rbonghi/jetson_stats/issues
13
13
  Project-URL: Examples, https://github.com/rbonghi/jetson_stats/tree/master/examples
14
14
  Description: # Jetson stats
15
- [![PyPI - Downloads](https://img.shields.io/pypi/dw/jetson-stats.svg)](https://pypistats.org/packages/jetson-stats) [![PyPI version](https://badge.fury.io/py/jetson-stats.svg)](https://badge.fury.io/py/jetson-stats) [![Build Status](https://travis-ci.org/rbonghi/jetson_stats.svg?branch=master)](https://travis-ci.org/rbonghi/jetson_stats) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/jetson-stats.svg)](https://www.python.org/) [![PyPI - Format](https://img.shields.io/pypi/format/jetson-stats.svg)](https://pypi.org/project/jetson-stats/)
15
+ [![PyPI - Downloads](https://img.shields.io/pypi/dw/jetson-stats.svg)](https://pypistats.org/packages/jetson-stats) [![PyPI version](https://badge.fury.io/py/jetson-stats.svg)](https://badge.fury.io/py/jetson-stats) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/jetson-stats.svg)](https://www.python.org/) [![PyPI - Format](https://img.shields.io/pypi/format/jetson-stats.svg)](https://pypi.org/project/jetson-stats/)
16
+
17
+ ![Build](https://github.com/rbonghi/jetson_stats/workflows/Build/badge.svg) ![Docs](https://github.com/rbonghi/jetson_stats/workflows/Docs/badge.svg) ![Publish](https://github.com/rbonghi/jetson_stats/workflows/Publish/badge.svg)
16
18
 
17
19
  **jetson-stats** is a package to **monitoring** and **control** your [NVIDIA Jetson][NVIDIA Jetson] [Nano, Xavier, TX2i, TX2, TX1] embedded board. When you install jetson-stats are included:
18
20
  * [jtop](#jtop)
19
- * [jetson-release](#jetson-release)
21
+ * [jetson_release](#jetson_release)
20
22
  * [jetson_variables](#jetson_variables)
21
23
 
22
- Read the [Wiki](https://github.com/rbonghi/jetson_stat/wiki) for more detailed information
24
+ Read the [Wiki](https://github.com/rbonghi/jetson_stat/wiki) for more detailed information or read the package [documentation](https://rbonghi.github.io/jetson_stats).
23
25
 
24
26
  ## Install
25
27
 
@@ -51,16 +53,17 @@ Description: # Jetson stats
51
53
  Other options are availables with `-h` option:
52
54
  ```console
53
55
  nvidia@jetson-nano:~/$ sudo jtop -h
54
- usage: jtop [-h] [-r REFRESH] [--debug] [--page PAGE] [--version]
56
+ usage: jtop [-h] [-r REFRESH] [--debug] [--page PAGE] [--restore] [-v]
55
57
 
56
- jtop is a system monitoring utility and control. Runs on terminal
58
+ jtop is system monitoring utility and runs on terminal
57
59
 
58
60
  optional arguments:
59
- -h, --help show this help message and exit
60
- -r REFRESH refresh interval
61
- --debug Run with debug logger
62
- --page PAGE Open fix page
63
- --version show program's version number and exit
61
+ -h, --help show this help message and exit
62
+ -r REFRESH refresh interval
63
+ --debug Run with debug logger
64
+ --page PAGE Open fix page
65
+ --restore Reset Jetson configuration
66
+ -v, --version show program's version number and exit
64
67
  ```
65
68
  ### Controls
66
69
  To control the your NVIDIA Jetson are available this keyboard commands:
@@ -74,7 +77,7 @@ Description: # Jetson stats
74
77
  2. **GPU** A real time GPU history about your NVIDIA Jetson
75
78
  3. **CTRL** You can control the status of you
76
79
  4. **INFO** Are collected all information about libraries, CUDA, Serial Number, interfaces, ...
77
- ## [**jetson-release**][jetson_release]
80
+ ## [**jetson_release**][jetson_release]
78
81
  The command show the status and all information about your [NVIDIA Jetson][NVIDIA Jetson]
79
82
 
80
83
  ![jtop](https://github.com/rbonghi/jetson_stats/wiki/images/jetso_release.png)
@@ -95,7 +98,7 @@ Keywords: jetson_stats jtop python system-monitor docker nvidia J
95
98
  Platform: linux
96
99
  Platform: linux2
97
100
  Platform: darwin
98
- Classifier: Development Status :: 4 - Beta
101
+ Classifier: Development Status :: 5 - Production/Stable
99
102
  Classifier: Intended Audience :: Developers
100
103
  Classifier: Topic :: Software Development :: Embedded Systems
101
104
  Classifier: Topic :: Software Development :: Debuggers
@@ -109,7 +112,8 @@ Classifier: Topic :: System :: Operating System Kernels
109
112
  Classifier: Topic :: System :: Shells
110
113
  Classifier: Topic :: System :: Systems Administration
111
114
  Classifier: Topic :: Terminals
112
- Classifier: License :: OSI Approved :: MIT License
115
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
116
+ Classifier: Programming Language :: Unix Shell
113
117
  Classifier: Programming Language :: Python :: 2
114
118
  Classifier: Programming Language :: Python :: 2.7
115
119
  Classifier: Programming Language :: Python :: 3
@@ -117,6 +121,7 @@ Classifier: Programming Language :: Python :: 3.4
117
121
  Classifier: Programming Language :: Python :: 3.5
118
122
  Classifier: Programming Language :: Python :: 3.6
119
123
  Classifier: Programming Language :: Python :: 3.7
124
+ Classifier: Programming Language :: Python :: 3.8
120
125
  Classifier: Operating System :: POSIX :: Linux
121
126
  Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4
122
127
  Description-Content-Type: text/markdown
@@ -1,12 +1,14 @@
1
1
  # Jetson stats
2
- [![PyPI - Downloads](https://img.shields.io/pypi/dw/jetson-stats.svg)](https://pypistats.org/packages/jetson-stats) [![PyPI version](https://badge.fury.io/py/jetson-stats.svg)](https://badge.fury.io/py/jetson-stats) [![Build Status](https://travis-ci.org/rbonghi/jetson_stats.svg?branch=master)](https://travis-ci.org/rbonghi/jetson_stats) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/jetson-stats.svg)](https://www.python.org/) [![PyPI - Format](https://img.shields.io/pypi/format/jetson-stats.svg)](https://pypi.org/project/jetson-stats/)
2
+ [![PyPI - Downloads](https://img.shields.io/pypi/dw/jetson-stats.svg)](https://pypistats.org/packages/jetson-stats) [![PyPI version](https://badge.fury.io/py/jetson-stats.svg)](https://badge.fury.io/py/jetson-stats) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/jetson-stats.svg)](https://www.python.org/) [![PyPI - Format](https://img.shields.io/pypi/format/jetson-stats.svg)](https://pypi.org/project/jetson-stats/)
3
+
4
+ ![Build](https://github.com/rbonghi/jetson_stats/workflows/Build/badge.svg) ![Docs](https://github.com/rbonghi/jetson_stats/workflows/Docs/badge.svg) ![Publish](https://github.com/rbonghi/jetson_stats/workflows/Publish/badge.svg)
3
5
 
4
6
  **jetson-stats** is a package to **monitoring** and **control** your [NVIDIA Jetson][NVIDIA Jetson] [Nano, Xavier, TX2i, TX2, TX1] embedded board. When you install jetson-stats are included:
5
7
  * [jtop](#jtop)
6
- * [jetson-release](#jetson-release)
8
+ * [jetson_release](#jetson_release)
7
9
  * [jetson_variables](#jetson_variables)
8
10
 
9
- Read the [Wiki](https://github.com/rbonghi/jetson_stat/wiki) for more detailed information
11
+ Read the [Wiki](https://github.com/rbonghi/jetson_stat/wiki) for more detailed information or read the package [documentation](https://rbonghi.github.io/jetson_stats).
10
12
 
11
13
  ## Install
12
14
 
@@ -38,16 +40,17 @@ sudo jtop
38
40
  Other options are availables with `-h` option:
39
41
  ```console
40
42
  nvidia@jetson-nano:~/$ sudo jtop -h
41
- usage: jtop [-h] [-r REFRESH] [--debug] [--page PAGE] [--version]
43
+ usage: jtop [-h] [-r REFRESH] [--debug] [--page PAGE] [--restore] [-v]
42
44
 
43
- jtop is a system monitoring utility and control. Runs on terminal
45
+ jtop is system monitoring utility and runs on terminal
44
46
 
45
47
  optional arguments:
46
- -h, --help show this help message and exit
47
- -r REFRESH refresh interval
48
- --debug Run with debug logger
49
- --page PAGE Open fix page
50
- --version show program's version number and exit
48
+ -h, --help show this help message and exit
49
+ -r REFRESH refresh interval
50
+ --debug Run with debug logger
51
+ --page PAGE Open fix page
52
+ --restore Reset Jetson configuration
53
+ -v, --version show program's version number and exit
51
54
  ```
52
55
  ### Controls
53
56
  To control the your NVIDIA Jetson are available this keyboard commands:
@@ -61,7 +64,7 @@ To control the your NVIDIA Jetson are available this keyboard commands:
61
64
  2. **GPU** A real time GPU history about your NVIDIA Jetson
62
65
  3. **CTRL** You can control the status of you
63
66
  4. **INFO** Are collected all information about libraries, CUDA, Serial Number, interfaces, ...
64
- ## [**jetson-release**][jetson_release]
67
+ ## [**jetson_release**][jetson_release]
65
68
  The command show the status and all information about your [NVIDIA Jetson][NVIDIA Jetson]
66
69
 
67
70
  ![jtop](https://github.com/rbonghi/jetson_stats/wiki/images/jetso_release.png)
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = source
9
+ BUILDDIR = build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,35 @@
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=sphinx-build
9
+ )
10
+ set SOURCEDIR=source
11
+ set BUILDDIR=build
12
+
13
+ if "%1" == "" goto help
14
+
15
+ %SPHINXBUILD% >NUL 2>NUL
16
+ if errorlevel 9009 (
17
+ echo.
18
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19
+ echo.installed, then set the SPHINXBUILD environment variable to point
20
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
21
+ echo.may add the Sphinx directory to PATH.
22
+ echo.
23
+ echo.If you don't have Sphinx installed, grab it from
24
+ echo.http://sphinx-doc.org/
25
+ exit /b 1
26
+ )
27
+
28
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29
+ goto end
30
+
31
+ :help
32
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33
+
34
+ :end
35
+ popd
@@ -0,0 +1,64 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # This file only contains a selection of the most common options. For a full
4
+ # list see the documentation:
5
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
6
+
7
+ # -- Path setup --------------------------------------------------------------
8
+
9
+ # If extensions (or modules to document with autodoc) are in another directory,
10
+ # add these directories to sys.path here. If the directory is relative to the
11
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
12
+ import os
13
+ import sys
14
+ sys.path.insert(0, os.path.abspath('../../'))
15
+
16
+ # -- Project information -----------------------------------------------------
17
+
18
+ # Fix travis
19
+ # https://github.com/readthedocs/readthedocs.org/issues/2569
20
+ master_doc = 'index'
21
+
22
+ project = 'jetson-stats'
23
+ copyright = '2020, Raffaello Bonghi'
24
+ author = 'Raffaello Bonghi'
25
+
26
+ # The full version, including alpha/beta/rc tags
27
+ release = '1.8.0'
28
+
29
+ # -- General configuration ---------------------------------------------------
30
+
31
+ # Add any Sphinx extension module names here, as strings. They can be
32
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
33
+ # ones.
34
+ extensions = [
35
+ 'sphinx.ext.autodoc',
36
+ 'sphinx.ext.todo',
37
+ 'sphinx.ext.mathjax',
38
+ 'sphinx.ext.githubpages',
39
+ 'm2r',
40
+ ]
41
+
42
+ source_suffix = ['.rst', '.md']
43
+
44
+ # Add any paths that contain templates here, relative to this directory.
45
+ templates_path = ['_templates']
46
+
47
+ # List of patterns, relative to source directory, that match files and
48
+ # directories to ignore when looking for source files.
49
+ # This pattern also affects html_static_path and html_extra_path.
50
+ exclude_patterns = []
51
+
52
+
53
+ # -- Options for HTML output -------------------------------------------------
54
+
55
+ # The theme to use for HTML and HTML Help pages. See the documentation for
56
+ # a list of builtin themes.
57
+ #
58
+ html_theme = 'sphinx_rtd_theme'
59
+
60
+ # Add any paths that contain custom static files (such as style sheets) here,
61
+ # relative to this directory. They are copied after the builtin static files,
62
+ # so a file named "default.css" will overwrite the builtin "default.css".
63
+ html_static_path = []
64
+ # EOF
@@ -0,0 +1,22 @@
1
+ .. jetson-stats documentation master file, created by
2
+ sphinx-quickstart on Sat Feb 8 18:51:29 2020.
3
+ You can adapt this file completely to your liking, but it should at least
4
+ contain the root `toctree` directive.
5
+
6
+ Welcome to jetson-stats's documentation!
7
+ ========================================
8
+
9
+ .. toctree::
10
+ :maxdepth: 2
11
+ :caption: Contents:
12
+
13
+
14
+
15
+ Indices and tables
16
+ ==================
17
+
18
+ * :ref:`genindex`
19
+ * :ref:`modindex`
20
+ * :ref:`search`
21
+
22
+ .. mdinclude:: ../../README.md
@@ -0,0 +1,19 @@
1
+ jtop package
2
+ ============
3
+
4
+ jtop.jtop module
5
+ ----------------
6
+
7
+ .. automodule:: jtop.jtop
8
+ :members:
9
+ :undoc-members:
10
+ :show-inheritance:
11
+
12
+
13
+ Module contents
14
+ ---------------
15
+
16
+ .. automodule:: jtop
17
+ :members:
18
+ :undoc-members:
19
+ :show-inheritance:
@@ -0,0 +1,7 @@
1
+ jetson_stats
2
+ ============
3
+
4
+ .. toctree::
5
+ :maxdepth: 4
6
+
7
+ jtop
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: UTF-8 -*-
3
+ # This file is part of the jetson_stats package (https://github.com/rbonghi/jetson_stats or http://rnext.it).
4
+ # Copyright (c) 2019 Raffaello Bonghi.
5
+ #
6
+ # This program is free software: you can redistribute it and/or modify
7
+ # it under the terms of the GNU Affero General Public License as published by
8
+ # the Free Software Foundation, either version 3 of the License, or
9
+ # (at your option) any later version.
10
+ #
11
+ # This program is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU Affero General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU Affero General Public License
17
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
18
+
19
+ from jtop import jtop
20
+
21
+
22
+ def read_stats(stats):
23
+ """
24
+ This is your callback function where you can read all files when are availables.
25
+ """
26
+ print(stats)
27
+
28
+
29
+ if __name__ == "__main__":
30
+ print("Initialize jtop")
31
+ # Open the jtop
32
+ jetson = jtop()
33
+ # Attach a function where you can read the status of your jetson
34
+ jetson.attach(read_stats)
35
+
36
+ # Nothing to do, now you can read
37
+ while True:
38
+ pass
39
+ # EOF
@@ -30,8 +30,8 @@ if __name__ == "__main__":
30
30
  # Status disk
31
31
  print(jetson.disk)
32
32
  # Status fans
33
- if hasattr(jetson, 'fans'):
34
- print(jetson.fans)
33
+ if hasattr(jetson, 'fan'):
34
+ print(jetson.fan)
35
35
  # uptime
36
36
  print(jetson.uptime)
37
37
  # nvpmodel
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: jetson-stats
3
- Version: 1.7.6
3
+ Version: 2.0.0.dev4
4
4
  Summary: Interactive system-monitor and process viewer for all NVIDIA Jetson [Nano, AGX Xavier, TX1, TX2]
5
5
  Home-page: https://github.com/rbonghi/jetson_stats
6
6
  Author: Raffaello Bonghi
@@ -8,18 +8,20 @@ Author-email: raffaello@rnext.it
8
8
  License: AGPL-3.0
9
9
  Download-URL: https://github.com/rbonghi/jetson_stats/archive/master.zip
10
10
  Project-URL: Source, https://github.com/rbonghi/jetson_stats/tree/master
11
- Project-URL: How To, https://github.com/rbonghi/jetson_stats/tree/master/docs
11
+ Project-URL: How To, https://rbonghi.github.io/jetson_stats
12
12
  Project-URL: Bug Reports, https://github.com/rbonghi/jetson_stats/issues
13
13
  Project-URL: Examples, https://github.com/rbonghi/jetson_stats/tree/master/examples
14
14
  Description: # Jetson stats
15
- [![PyPI - Downloads](https://img.shields.io/pypi/dw/jetson-stats.svg)](https://pypistats.org/packages/jetson-stats) [![PyPI version](https://badge.fury.io/py/jetson-stats.svg)](https://badge.fury.io/py/jetson-stats) [![Build Status](https://travis-ci.org/rbonghi/jetson_stats.svg?branch=master)](https://travis-ci.org/rbonghi/jetson_stats) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/jetson-stats.svg)](https://www.python.org/) [![PyPI - Format](https://img.shields.io/pypi/format/jetson-stats.svg)](https://pypi.org/project/jetson-stats/)
15
+ [![PyPI - Downloads](https://img.shields.io/pypi/dw/jetson-stats.svg)](https://pypistats.org/packages/jetson-stats) [![PyPI version](https://badge.fury.io/py/jetson-stats.svg)](https://badge.fury.io/py/jetson-stats) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/jetson-stats.svg)](https://www.python.org/) [![PyPI - Format](https://img.shields.io/pypi/format/jetson-stats.svg)](https://pypi.org/project/jetson-stats/)
16
+
17
+ ![Build](https://github.com/rbonghi/jetson_stats/workflows/Build/badge.svg) ![Docs](https://github.com/rbonghi/jetson_stats/workflows/Docs/badge.svg) ![Publish](https://github.com/rbonghi/jetson_stats/workflows/Publish/badge.svg)
16
18
 
17
19
  **jetson-stats** is a package to **monitoring** and **control** your [NVIDIA Jetson][NVIDIA Jetson] [Nano, Xavier, TX2i, TX2, TX1] embedded board. When you install jetson-stats are included:
18
20
  * [jtop](#jtop)
19
- * [jetson-release](#jetson-release)
21
+ * [jetson_release](#jetson_release)
20
22
  * [jetson_variables](#jetson_variables)
21
23
 
22
- Read the [Wiki](https://github.com/rbonghi/jetson_stat/wiki) for more detailed information
24
+ Read the [Wiki](https://github.com/rbonghi/jetson_stat/wiki) for more detailed information or read the package [documentation](https://rbonghi.github.io/jetson_stats).
23
25
 
24
26
  ## Install
25
27
 
@@ -51,16 +53,17 @@ Description: # Jetson stats
51
53
  Other options are availables with `-h` option:
52
54
  ```console
53
55
  nvidia@jetson-nano:~/$ sudo jtop -h
54
- usage: jtop [-h] [-r REFRESH] [--debug] [--page PAGE] [--version]
56
+ usage: jtop [-h] [-r REFRESH] [--debug] [--page PAGE] [--restore] [-v]
55
57
 
56
- jtop is a system monitoring utility and control. Runs on terminal
58
+ jtop is system monitoring utility and runs on terminal
57
59
 
58
60
  optional arguments:
59
- -h, --help show this help message and exit
60
- -r REFRESH refresh interval
61
- --debug Run with debug logger
62
- --page PAGE Open fix page
63
- --version show program's version number and exit
61
+ -h, --help show this help message and exit
62
+ -r REFRESH refresh interval
63
+ --debug Run with debug logger
64
+ --page PAGE Open fix page
65
+ --restore Reset Jetson configuration
66
+ -v, --version show program's version number and exit
64
67
  ```
65
68
  ### Controls
66
69
  To control the your NVIDIA Jetson are available this keyboard commands:
@@ -74,7 +77,7 @@ Description: # Jetson stats
74
77
  2. **GPU** A real time GPU history about your NVIDIA Jetson
75
78
  3. **CTRL** You can control the status of you
76
79
  4. **INFO** Are collected all information about libraries, CUDA, Serial Number, interfaces, ...
77
- ## [**jetson-release**][jetson_release]
80
+ ## [**jetson_release**][jetson_release]
78
81
  The command show the status and all information about your [NVIDIA Jetson][NVIDIA Jetson]
79
82
 
80
83
  ![jtop](https://github.com/rbonghi/jetson_stats/wiki/images/jetso_release.png)
@@ -95,7 +98,7 @@ Keywords: jetson_stats jtop python system-monitor docker nvidia J
95
98
  Platform: linux
96
99
  Platform: linux2
97
100
  Platform: darwin
98
- Classifier: Development Status :: 4 - Beta
101
+ Classifier: Development Status :: 5 - Production/Stable
99
102
  Classifier: Intended Audience :: Developers
100
103
  Classifier: Topic :: Software Development :: Embedded Systems
101
104
  Classifier: Topic :: Software Development :: Debuggers
@@ -109,7 +112,8 @@ Classifier: Topic :: System :: Operating System Kernels
109
112
  Classifier: Topic :: System :: Shells
110
113
  Classifier: Topic :: System :: Systems Administration
111
114
  Classifier: Topic :: Terminals
112
- Classifier: License :: OSI Approved :: MIT License
115
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
116
+ Classifier: Programming Language :: Unix Shell
113
117
  Classifier: Programming Language :: Python :: 2
114
118
  Classifier: Programming Language :: Python :: 2.7
115
119
  Classifier: Programming Language :: Python :: 3
@@ -117,6 +121,7 @@ Classifier: Programming Language :: Python :: 3.4
117
121
  Classifier: Programming Language :: Python :: 3.5
118
122
  Classifier: Programming Language :: Python :: 3.6
119
123
  Classifier: Programming Language :: Python :: 3.7
124
+ Classifier: Programming Language :: Python :: 3.8
120
125
  Classifier: Operating System :: POSIX :: Linux
121
126
  Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4
122
127
  Description-Content-Type: text/markdown
@@ -3,6 +3,13 @@ MANIFEST.in
3
3
  README.md
4
4
  setup.cfg
5
5
  setup.py
6
+ docs/Makefile
7
+ docs/make.bat
8
+ docs/source/conf.py
9
+ docs/source/index.rst
10
+ docs/source/jtop.rst
11
+ docs/source/modules.rst
12
+ examples/jtop_callback.py
6
13
  examples/jtop_server.py
7
14
  examples/log_data.py
8
15
  examples/quick_read.py
@@ -14,12 +21,14 @@ jetson_stats.egg-info/not-zip-safe
14
21
  jetson_stats.egg-info/top_level.txt
15
22
  jtop/__init__.py
16
23
  jtop/__main__.py
24
+ jtop/jetson_variables
17
25
  jtop/jtop.py
18
26
  jtop/core/__init__.py
19
27
  jtop/core/common.py
20
28
  jtop/core/fan.py
21
29
  jtop/core/jetson_clocks.py
22
30
  jtop/core/nvpmodel.py
31
+ jtop/core/swap.py
23
32
  jtop/core/tegra_parse.py
24
33
  jtop/core/tegrastats.py
25
34
  jtop/gui/__init__.py
@@ -30,13 +39,13 @@ jtop/gui/pall.py
30
39
  jtop/gui/pcontrol.py
31
40
  jtop/gui/pgpu.py
32
41
  jtop/gui/pinfo.py
33
- scripts/install.sh
42
+ jtop/gui/pmem.py
43
+ scripts/jetson_config
34
44
  scripts/jetson_docker
35
- scripts/jetson_env.sh
36
- scripts/jetson_fan.service
37
- scripts/jetson_fan.sh
38
- scripts/jetson_performance.service
39
- scripts/jetson_performance.sh
40
45
  scripts/jetson_release
41
46
  scripts/jetson_swap
42
- scripts/jetson_variables
47
+ services/jetson_env.sh
48
+ services/jetson_performance.service
49
+ services/jetson_performance.sh
50
+ services/jetson_stats_boot.service
51
+ services/jetson_stats_boot.sh
@@ -17,15 +17,17 @@
17
17
 
18
18
  # flake8: noqa
19
19
 
20
- from .jtop import jtop, get_version
20
+ from .jtop import jtop, import_jetson_variables
21
21
  # Import extra controllers
22
22
  from .core import Tegrastats
23
23
  from .core import Fan
24
24
  from .core import NVPmodel
25
25
  from .core import JetsonClocks
26
26
  # Import os variable importer
27
- from .core import import_os_variables, StatusObserver
27
+ from .core import StatusObserver
28
28
 
29
29
  __author__ = "Raffaello Bonghi <raffaello@rnext.it>"
30
- __version__ = "1.7.6"
30
+ # Version package
31
+ # https://packaging.python.org/guides/distributing-packages-using-setuptools/#choosing-a-versioning-scheme
32
+ __version__ = "2.0.0.dev4"
31
33
  # EOF
@@ -33,18 +33,29 @@ import curses
33
33
  # Tegrastats objext reader
34
34
  from .jtop import jtop, get_version
35
35
  # GUI jtop interface
36
- from .gui import JTOPGUI, ALL, GPU, CTRL, INFO
37
-
36
+ from .gui import JTOPGUI, ALL, GPU, MEM, CTRL, INFO
38
37
  # Create logger for jplotlib
39
38
  logger = logging.getLogger(__name__)
40
39
 
41
40
 
41
+ class bcolors:
42
+ HEADER = '\033[95m'
43
+ OKBLUE = '\033[94m'
44
+ OKGREEN = '\033[92m'
45
+ WARNING = '\033[93m'
46
+ FAIL = '\033[91m'
47
+ ENDC = '\033[0m'
48
+ BOLD = '\033[1m'
49
+ UNDERLINE = '\033[4m'
50
+
51
+
42
52
  def main():
43
53
  # Add arg parser
44
- parser = argparse.ArgumentParser(description='jtop is system monitoring utility and runs in the terminal')
54
+ parser = argparse.ArgumentParser(description='jtop is system monitoring utility and runs on terminal')
45
55
  parser.add_argument('-r', dest="refresh", help='refresh interval', type=int, default='500')
46
56
  parser.add_argument('--debug', dest="debug", help='Run with debug logger', action="store_true", default=False)
47
57
  parser.add_argument('--page', dest="page", help='Open fix page', type=int, default=1)
58
+ parser.add_argument('--restore', dest="restore", help='Reset Jetson configuration', action="store_true", default=False)
48
59
  parser.add_argument('-v', '--version', action='version', version='%(prog)s {version}'.format(version=get_version()))
49
60
  # Parse arguments
50
61
  args = parser.parse_args()
@@ -57,12 +68,41 @@ def main():
57
68
  # Open tegrastats reader and run the curses wrapper
58
69
  try:
59
70
  with jtop(interval=args.refresh) as jetson:
60
- try:
61
- # Call the curses wrapper
62
- curses.wrapper(JTOPGUI, args.refresh, jetson, [ALL, GPU, CTRL, INFO], init_page=args.page)
63
- except KeyboardInterrupt:
64
- # Catch keyboard interrupt and close
65
- logger.info("Closed with CTRL-C")
71
+ if not args.restore:
72
+ try:
73
+ # Call the curses wrapper
74
+ curses.wrapper(JTOPGUI, args.refresh, jetson, [ALL, GPU, MEM, CTRL, INFO], init_page=args.page)
75
+ except KeyboardInterrupt as x:
76
+ # Catch keyboard interrupt and close
77
+ logger.info("Closed with CTRL-C [{status}]".format(status=x))
78
+ except SystemExit as x:
79
+ # Catch keyboard interrupt and close
80
+ logger.info("System exit {status}".format(status=x))
81
+ else:
82
+ if jetson.userid == 0:
83
+ # If enable restore:
84
+ # * Disable jetson_clocks
85
+ status = bcolors.OKGREEN + "OK" + bcolors.ENDC
86
+ if jetson.jetson_clocks:
87
+ jetson.jetson_clocks.start = False
88
+ print("[{status}] Stop jetson_clocks service".format(status=status))
89
+ jetson.jetson_clocks.enable = False
90
+ print("[{status}] Disable jetson_clocks service".format(status=status))
91
+ # * Set fan speed to 0
92
+ if jetson.fan:
93
+ jetson.fan.speed = 0
94
+ print("[{status}] Fan speed = 0".format(status=status))
95
+ jetson.fan.control = True
96
+ print("[{status}] Fan temp_control = 1".format(status=status))
97
+ # * Delete fan_configuration
98
+ if jetson.fan.clear():
99
+ print("[{status}] Clear Fan Configuration".format(status=status))
100
+ # * Delete jetson_clocks configuration
101
+ if jetson.jetson_clocks:
102
+ if jetson.jetson_clocks.clear():
103
+ print("[{status}] Clear Jetson Clock Configuration".format(status=status))
104
+ else:
105
+ print("Please run with sudo")
66
106
  except jtop.JtopException as e:
67
107
  # Print error and close
68
108
  print(e)