jetson-stats is a package for monitoring and control your NVIDIA Jetson [Thor, Orin, Xavier, Nano, TX] series.
jetson-stats is a powerful tool to analyze your board, you can use with a stand alone application with jtop or import in your python script, the main features are:
- Decode hardware, architecture, L4T and NVIDIA Jetpack
- Monitoring, CPU, GPU, Memory, Engines, fan
- Control NVP model, fan speed, jetson_clocks
- Importable in a python script
- Dockerizable in a container
- Do not need super user
- Tested on many different hardware configurations
- Works with all NVIDIA Jetpack
sudo apt update
sudo apt install python3-pip python3-setuptools -yOption 1: jetson-stats can be installed with pip, but need superuser:
sudo pip3 install -U jetson-statssudo pip3 install git+https://github.com/rbonghi/jetson_stats.gitsudo pip3 install --break-system-packages -U jetson-statsor
sudo pip3 install --break-system-packages git+https://github.com/rbonghi/jetson_stats.gitDownload "scripts/install_jtop_torun_without_sudo.sh"
Make it executable: chmod +x install_jtop_torun_without_sudo.sh
Run "sudo -v" -v, --validate does not run any command, but allows the use of sudo in the bash script.
Then install with ./install_jtop_torun_without_sudo.shSee the guide: How it "without sudo" works & why
Start jtop it's pretty simple just write jtop!
jtopA simple interface will appear on your terminal, more capabilities are documented at jtop page.
You can use jtop such a python library to integrate in your software
from jtop import jtop
with jtop() as jetson:
# jetson.ok() will provide the proper update frequency
while jetson.ok():
# Read tegra stats
print(jetson.stats)You can also use jtop with your virualenv!
More information available at advanced usage page.
After sudo pip install ... run:
sudo jtop_install_servicesThis copies/enables:
- jtop.service (IPC socket)
- jtop_exporter.service (JSON stats exporter)
Then verify:
systemctl status jtop.service
systemctl status jtop_exporter.serviceA lightweight systemd service jtop_exporter.service can periodically dump jtop statistics into a JSON file for external consumers.
Install jetson-stats (host, with sudo) and enable the exporter:
sudo systemctl enable --now jtop_exporter.serviceDefault output path:
/run/jtop/jtop_stats.json
Preview stats (pretty print):
jq . /run/jtop/jtop_stats.jsonUpdate frequency: ~1s. Each write is atomic (temporary file rename) to avoid partial reads.
Change output path temporarily:
sudo systemctl stop jtop_exporter.service
sudo env JTOP_EXPORT_PATH=/run/jtop/custom.json systemctl start jtop_exporter.serviceOr persist by editing the service file to add an Environment=JTOP_EXPORT_PATH=/path/file.json line, then:
sudo systemctl daemon-reload
sudo systemctl restart jtop_exporter.serviceDocker usage: mount the JSON file read-only into a container:
docker run --rm -v /run/jtop/jtop_stats.json:/data/jtop_stats.json:ro alpine cat /data/jtop_stats.jsonIf you need higher frequency or alternative formats (e.g. Prometheus exposition), consider wrapping jtop_stats binary or extending jtop.stats_exporter.
You can run directly in Docker jtop, you need only to:
- Install jetson-stats on your host
- Install jetson-stats on your container as well
- Pass to your container
/run/jtop.sock:/run/jtop.sock
You can try running this command
docker run --rm -it -v /run/jtop.sock:/run/jtop.sock rbonghi/jetson_stats:latestMore information available at docker documentation page.
If your company benefits from this library, please consider π sponsoring its development.
jetson-stats has usage and reference documentation at https://rnext.it/jetson_stats, there is also a π troubleshooting page.
jetson-stats has a community Discord channel for asking questions and collaborating with other contributors. Drop by and say hello π

