Upgrade jtop / jetson_stats to get GPU Memory use

Upgrade Thor jtop / jetson-stats to current release to get GPU Memory use and other improvements.

sudo -v
curl -LsSf https://raw.githubusercontent.com/rbonghi/jetson_stats/master/scripts/upgrade-jtop.sh | bash



If you don’t have a gpu using process running you can use this as proof of concept test. Replace “/usr/bin/env python” with the venv python path where you have pytorch installed.

#!/usr/bin/env python

import torch
import time

print("CUDA available:", torch.cuda.is_available())
print("Device:", torch.cuda.get_device_name(0))

# Allocate about 4 GiB on GPU
gb = 4
x = torch.empty((gb * 1024**3 // 4,), dtype=torch.float32, device="cuda")

print(f"Allocated approximately {gb} GiB on GPU.")
print("Sleeping. Press Ctrl-C to stop.")
while True:
    time.sleep(1)


Nvidia, I would have added to FAQ but I can’t edit it.

Hi,
Please check if you can push a commit to
Pull requests · rbonghi/jetson_stats · GitHub

We see you have pushed one: Handle old python3/pip3 versions and PATH variations in pip uninstall… by whitesscott · Pull Request #854 · rbonghi/jetson_stats · GitHub

Please do the same for this one. Thanks,

I already have. I posted this here since unless a person were to browse here, they won’t know of available upgrade path.

https://github.com/rbonghi/jetson_stats#upgrade-jtop

Thanks