-
-
Notifications
You must be signed in to change notification settings - Fork 269
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
831 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,186 +1,81 @@ | ||
# Jetson stats | ||
[](https://pypistats.org/packages/jetson-stats) [](https://badge.fury.io/py/jetson-stats) [](https://www.python.org/) [](https://pypi.org/project/jetson-stats/) [](/LICENSE) [](https://hub.docker.com/r/rbonghi/jetson_stats) [](https://github.com/rbonghi/jetson_stats/actions?query=workflow%3A%22CI+%26+CD%22) | ||
<h1 align="center"> | ||
|
||
[](https://twitter.com/raffaello86) [](https://www.instagram.com/robo.panther/) [](https://discord.gg/BFbuJNhYzS) | ||
 | ||
|
||
**jetson-stats** is a package for **monitoring** and **control** your [NVIDIA Jetson][NVIDIA Jetson] [Orin, Xavier, Nano, TX] series. Works with all NVIDIA Jetson [ecosystem](#compability). | ||
</h1> | ||
|
||
**Consider to** [:sparkling_heart: **Sponsor** jetson-stats](https://github.com/sponsors/rbonghi) | ||
<p align="center"> | ||
<a href="https://pypistats.org/packages/jetson-stats"><img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dw/jetson-stats.svg" /></a> | ||
<a href="https://badge.fury.io/py/jetson-stats"><img alt="PyPI version" src="https://badge.fury.io/py/jetson-stats.svg" /></a> | ||
<a href="https://www.python.org/"><img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/jetson-stats.svg" /></a> | ||
<a href="https://pypi.org/project/jetson-stats/"><img alt="PyPI - Format" src="https://img.shields.io/pypi/format/jetson-stats.svg" /></a> | ||
<a href="/LICENSE"><img alt="GitHub" src="https://img.shields.io/github/license/rbonghi/jetson_stats" /></a> | ||
<a href="https://snyk.io/advisor/python/jetson-stats"><img alt="jetson-stats" src="https://snyk.io/advisor/python/jetson-stats/badge.svg" /></a> | ||
<a href="https://hub.docker.com/r/rbonghi/jetson_stats"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/rbonghi/jetson_stats" /></a> | ||
<a href="https://github.com/rbonghi/jetson_stats/actions?query=workflow%3A%22CI+%26+CD%22"><img alt="CI & CD" src="https://github.com/rbonghi/jetson_stats/workflows/CI%20&%20CD/badge.svg" /></a> | ||
<a href="https://github.com/rbonghi/jetson_stats/actions/workflows/github-code-scanning/codeql"><img alt="CodeQL" src="https://github.com/rbonghi/jetson_stats/actions/workflows/github-code-scanning/codeql/badge.svg?branch=master" /></a> | ||
</p> | ||
|
||
When you install jetson-stats are included: | ||
- [Jetson stats](#jetson-stats) | ||
- [Install](#install) | ||
- [Virtual environment](#virtual-environment) | ||
- [Docker](#docker) | ||
- [Troubleshooting](#troubleshooting) | ||
- [jtop](#jtop) | ||
- [Pages](#pages) | ||
- [Controls](#controls) | ||
- [jetson\_config](#jetson_config) | ||
- [jetson\_release](#jetson_release) | ||
- [jetson\_swap](#jetson_swap) | ||
- [jetson variables](#jetson-variables) | ||
- [Compability](#compability) | ||
<p align="center"> | ||
<a href="https://twitter.com/raffaello86"><img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/raffaello86?style=social" /></a> | ||
<a href="https://www.instagram.com/robo.panther/"><img alt="robo.panther" src="https://img.shields.io/badge/Follow:-robo.panther-E4405F?style=social&logo=instagram" /></a> | ||
<a href="https://discord.gg/BFbuJNhYzS"><img alt="Join our Discord" src="https://img.shields.io/discord/1060563771048861817?color=%237289da&label=discord" /></a> | ||
</p> | ||
|
||
Read the [Wiki](https://github.com/rbonghi/jetson_stat/wiki) for more detailed information or read the package [documentation](https://rnext.it/jetson_stats). | ||
**jetson-stats** is a package for **monitoring** and **control** your [NVIDIA Jetson](https://developer.nvidia.com/buy-jetson) [Orin, Xavier, Nano, TX] series. | ||
|
||
# Install | ||
## Install | ||
|
||
jetson-stats can be installed with [pip](https://pip.pypa.io), but need **superuser**: | ||
|
||
```console | ||
sudo -H pip3 install -U jetson-stats | ||
``` | ||
**🚀 That's it! 🚀** | ||
|
||
_PS: Don't forget to **reboot** your board_ | ||
|
||
**You can run jtop in your python script [read here][library]** | ||
**🚀 That's it! 🚀** | ||
|
||
## Virtual environment | ||
_PS: Don't forget to **logout** or **reboot** your board_ | ||
|
||
If you need to install in a virtual environment like *virtualenv*, you **must** install before in your host **and after** in your environment, like: | ||
``` | ||
virtualenv venv | ||
source venv/bin/activate | ||
pip install -U jetson-stats | ||
``` | ||
## Run | ||
|
||
## Docker | ||
Start jtop it's pretty simple just write `jtop`! | ||
|
||
You can run jtop from a docker container, but you **must** install jetsons-stats as well on your host! Try with the command below: | ||
```console | ||
docker run --rm -it -v /run/jtop.sock:/run/jtop.sock rbonghi/jetson_stats:latest | ||
jtop | ||
``` | ||
|
||
or you can add in your Dockerfile writing: | ||
A simple interface will appear on your terminal | ||
|
||
```docker | ||
FROM python:3-buster | ||
RUN pip install -U jetson-stats | ||
``` | ||
<div align="center"> | ||
|
||
## Troubleshooting | ||
 | ||
|
||
If you reach the error below: | ||
</div> | ||
|
||
**sudo: pip: command not found** | ||
## Library | ||
|
||
You need to install **pip** before to install jetson-stats | ||
You can use jtop such a python library to integrate in your software | ||
|
||
```console | ||
sudo apt-get install python3-pip | ||
sudo -H pip3 install -U jetson-stats | ||
``` | ||
```python | ||
from jtop import jtop | ||
|
||
**REMIND** to pass `/run/jtop.sock:/run/jtop.sock` when you run your docker container. | ||
with jtop() as jetson: | ||
# jetson.ok() will provide the proper update frequency | ||
while jetson.ok(): | ||
# Read tegra stats | ||
print(jetson.stats) | ||
``` | ||
|
||
# [jtop][jtop] | ||
It is a system monitoring utility that runs on the terminal and see and **control** realtime the status of your [NVIDIA Jetson][NVIDIA Jetson]. CPU, RAM, GPU status and frequency and other... | ||
More information available at [advanced usage](https://rnext.it/jetson_stats/advanced-usage.html) page. | ||
|
||
The prompt interface will be show like this image, **now clickable!**: | ||
 | ||
## Sponsorship | ||
|
||
You can run the jtop simple using a simple command `jtop` | ||
If your company benefits from this library, please consider [:sparkling_heart: sponsoring its development](https://github.com/sponsors/rbonghi). | ||
|
||
YES! Sudo is **not** more required! | ||
```console | ||
nvidia@agx-orin:~/$ jtop | ||
``` | ||
## Documentation | ||
|
||
Other options are available with `-h` option: | ||
```console | ||
nvidia@agx-orin:~/$ jtop -h | ||
usage: jtop [-h] [--no-warnings] [--restore] [--loop] [--color-filter] [-r REFRESH] [-p PAGE] [-v] | ||
|
||
jtop is system monitoring utility and runs on terminal | ||
|
||
optional arguments: | ||
-h, --help show this help message and exit | ||
--no-warnings Do not show warnings (default: False) | ||
--restore Reset Jetson configuration (default: False) | ||
--loop Automatically switch page every 5s (default: False) | ||
--color-filter Change jtop base colors, you can use also JTOP_COLOR_FILTER=True (default: False) | ||
-r REFRESH, --refresh REFRESH | ||
refresh interval (default: 500) | ||
-p PAGE, --page PAGE Open fix page (default: 1) | ||
-v, --version show program's version number and exit | ||
``` | ||
You can change page using _left_, _right_ arrow or _TAB_ to change page. | ||
## Pages | ||
**jtop** have four different pages to control your NVIDIA Jetson: | ||
1. **ALL** Are collected all information about your board: CPUs status, Memory, *GPU*, disk, fan and all status about jetson_clocks, NVPmodel and other | ||
2. **GPU** A real time GPU history about your NVIDIA Jetson | ||
3. **CPU** A real time CPU plot of NVIDIA Jetson | ||
4. **MEM** A real time Memory chart and swap monitor | ||
5. **CTRL** Enable/Disable **jetson_clocks**, **nvpmodel** or **fan** directly from here | ||
6. **INFO** All information about libraries, CUDA, Serial Number, interfaces, ... | ||
## Controls | ||
To control the your NVIDIA Jetson are available this keyboard commands: | ||
|
||
In page **4 MEM**: | ||
* **c** Clear cache | ||
* **s** Enable/Disable extra swap | ||
* **+** and **-** Increase and decrease swap size | ||
|
||
In page **5 CTRL**: | ||
* **a** Start/Stop jetson_clocks service (Note: jetson_clocks start only after 60s from up time) | ||
* **e** Enable/Disable jetson_clocks on board boot | ||
* **+** and **-** Increase and decrease the NVPmodel | ||
* **f** Manual/jetson_clocks mode for your fan | ||
* **p** and **m** Increase and decrease the Fan speed | ||
|
||
# [jetson_config][jetson_config] | ||
|
||
Check _jetson-stats_ **health**, enable/disable **desktop**, enable/disable **jetson_clocks**, improve the performance of your **wifi** are available only in one click using **jetson_config** | ||
|
||
 | ||
# [jetson_release][jetson_release] | ||
The command show the status and all information about your [NVIDIA Jetson][NVIDIA Jetson] | ||
|
||
 | ||
# [jetson_swap][jetson_swap] | ||
Simple manager to switch on and switch off a swapfile in your jetson. | ||
jetson-stats documentation has usage and reference documentation at <https://rnext.it/jetson_stats>. | ||
|
||
```console | ||
nvidia@jetson-nano:~/$ sudo jetson_swap -h | ||
usage: createSwapFile [[[-d directory ] [-s size] -a] | [-h] | [--off]] | ||
-d | --dir <directoryname> Directory to place swapfile | ||
-n | --name <swapname> Name swap file | ||
-s | --size <gigabytes> | ||
-a | --auto Enable swap on boot in /etc/fstab | ||
-t | --status Check if the swap is currently active | ||
--off Switch off the swap | ||
-h | --help This message | ||
``` | ||
## Community | ||
|
||
# [jetson variables][jetson_variables] | ||
When you install jetson-stats in your bash will be available a list of new environment variables to know which which hardware version is available are you working, which Jetpack is installed and other variable show below | ||
|
||
 | ||
|
||
[library]: https://github.com/rbonghi/jetson_stats/wiki/library | ||
[jtop]: https://github.com/rbonghi/jetson_stats/wiki/jtop | ||
[jetson_config]: https://github.com/rbonghi/jetson_stats/wiki/jetson_config | ||
[jetson_swap]: https://github.com/rbonghi/jetson_stats/wiki/jetson_swap | ||
[jetson_variables]: https://github.com/rbonghi/jetson_stats/wiki/jetson_variables | ||
[jetson_release]: https://github.com/rbonghi/jetson_stats/wiki/jetson_release | ||
[jetson_performance]: https://github.com/rbonghi/jetson_stats/wiki/jetson_performance | ||
[jetson_docker]: https://github.com/rbonghi/jetson_stats/wiki/jetson_docker | ||
[NVIDIA]: https://www.nvidia.com/ | ||
[NVIDIA Jetson]: https://developer.nvidia.com/buy-jetson | ||
|
||
# Compability | ||
|
||
jetson-stats is compatibile with: | ||
* NVIDIA Jetson AGX Orin | ||
* NVIDIA Jetson Orin Series | ||
* NVIDIA Jetson AGX Xavier Industrial | ||
* NVIDIA Jetson AGX Xavier | ||
* NVIDIA Jetson Xavier NX | ||
* NVIDIA Jetson Xavier Series | ||
* NVIDIA Jetson Nano | ||
* NVIDIA Jetson TX2 NX | ||
* NVIDIA Jetson TX2i | ||
* NVIDIA Jetson TX2 | ||
* NVIDIA Jetson TX1 | ||
|
||
If you need a specific compability open an [issue](https://github.com/rbonghi/jetson_stats/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=) | ||
jetson-stats has a [community Discord channel](https://discord.gg/BFbuJNhYzS) for asking questions and collaborating with other contributors. Drop by and say hello 👋 |
Oops, something went wrong.