Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jetsonhacks/jetsonUtilities
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.1
Choose a base ref
...
head repository: jetsonhacks/jetsonUtilities
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Sep 13, 2018

  1. Update jetsonInfo.py

    simple fix to run the script with `python3`
    epifanio authored Sep 13, 2018
    Copy the full SHA
    32bc495 View commit details
  2. Merge pull request #1 from epifanio/python3

    python3 fix for jetsonInfo.py
    epifanio authored Sep 13, 2018
    Copy the full SHA
    7085629 View commit details

Commits on Nov 10, 2018

  1. Support for JetPack 4.1.1

    jetsonhacks committed Nov 10, 2018
    Copy the full SHA
    2260bfd View commit details
  2. Merge pull request #2 from epifanio/master

    python3 porting
    jetsonhacks authored Nov 10, 2018
    Copy the full SHA
    eb679e4 View commit details

Commits on Jan 8, 2020

  1. Update to JetPack 4.3

    jetsonhacks committed Jan 8, 2020
    Copy the full SHA
    0250361 View commit details
  2. Merge pull request #5 from jetsonhacks/L4T32.3.1

    Update to JetPack 4.3
    jetsonhacks authored Jan 8, 2020
    Copy the full SHA
    7623cb3 View commit details

Commits on Apr 17, 2020

  1. Update jetsonInfo.py

    Change JETSON_BOARD to JETSON_TYPE to get exact correct information about Jetson devices.
    mseth10 authored Apr 17, 2020
    Copy the full SHA
    9c20b7e View commit details

Commits on Jul 12, 2020

  1. Merge pull request #6 from mseth10/patch-1

    Update jetsonInfo.py
    jetsonhacks authored Jul 12, 2020
    Copy the full SHA
    69bc98f View commit details
  2. JetPack 4.4

    jetsonhacks committed Jul 12, 2020
    Copy the full SHA
    cb561fb View commit details
  3. Cleanup readme

    jetsonhacks committed Jul 12, 2020
    Copy the full SHA
    46d0d53 View commit details
  4. add issues

    jetsonhacks committed Jul 12, 2020
    Copy the full SHA
    7390bac View commit details

Commits on Jul 14, 2020

  1. fix bad init

    jetsonhacks committed Jul 14, 2020
    Copy the full SHA
    3255fca View commit details

Commits on Mar 9, 2021

  1. Fixes to support python3.

    Signed-off-by: Patti Vacek <pattivacek@gmail.com>
    pattivacek committed Mar 9, 2021
    Copy the full SHA
    f19f80e View commit details

Commits on May 19, 2021

  1. Merge pull request #10 from pattivacek/fix/python3

    Fixes to support python3.
    jetsonhacks authored May 19, 2021
    Copy the full SHA
    1a15513 View commit details
  2. Add Python3 support, Vulkan

    jetsonhacks committed May 19, 2021
    Copy the full SHA
    bac63d3 View commit details
  3. Update README

    jetsonhacks authored May 19, 2021
    Copy the full SHA
    56e1e83 View commit details
  4. Copy the full SHA
    fc9cdef View commit details

Commits on Aug 11, 2021

  1. Copy the full SHA
    1069fc8 View commit details
  2. Copy the full SHA
    78f8ba7 View commit details

Commits on Aug 23, 2022

  1. Copy the full SHA
    47407cb View commit details
  2. Copy the full SHA
    70b9a10 View commit details
  3. Update LICENSE

    jetsonhacks authored Aug 23, 2022
    Copy the full SHA
    f50f97b View commit details
  4. Copy the full SHA
    381ea94 View commit details
  5. Update jetsonInfo.py

    jetsonhacks authored Aug 23, 2022
    Copy the full SHA
    f9a9e10 View commit details
  6. Update jetsonInfo.py

    jetsonhacks authored Aug 23, 2022
    Copy the full SHA
    abfe0d3 View commit details
  7. Update jetsonInfo.py

    jetsonhacks authored Aug 23, 2022
    Copy the full SHA
    2fe4a3f View commit details
  8. Update README.md

    jetsonhacks authored Aug 23, 2022
    Copy the full SHA
    8472852 View commit details

Commits on Dec 29, 2022

  1. JetPack 4.6.3

    jetsonhacks authored Dec 29, 2022
    Copy the full SHA
    99e6d07 View commit details
Showing with 480 additions and 243 deletions.
  1. +27 −0 .github/ISSUE_TEMPLATE/bug_report.md
  2. +20 −0 .github/ISSUE_TEMPLATE/feature_request.md
  3. +12 −0 LICENSE
  4. +51 −12 README.md
  5. +40 −42 jetsonInfo.py
  6. +123 −0 scripts/jetson_libraries.sh
  7. +0 −167 scripts/jetson_variables
  8. +0 −22 scripts/jetson_variables LICENSE
  9. +207 −0 scripts/jetson_variables.sh
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Issue report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: ''

---

**Describe the issue**
Please describe the issue

**What version of L4T/JetPack**
L4T/JetPack version:

**Which Jetson**
Jetson:

**To Reproduce**
Steps to reproduce the behavior:
For example, what command line did you run?

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE REQUEST]"
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
12 changes: 12 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -19,3 +19,15 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

--------------


jetson_variables.sh
See scripts/jetson_variables.sh for full copyright info
Copyright (c) 2020 Raffaello Bonghi.
jetson_libraries.sh
See scripts/jetson_libraries.sh for full copyright info
Copyright (c) 2020 Raffaello Bonghi.
Part of the jetson_stats package (https://github.com/rbonghi/jetson_stats or http://rnext.it).

63 changes: 51 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,18 +2,22 @@
This repository holds utilities for working with NVIDIA Jetson Development Kit

# jetsonInfo
Get information about the NVIDIA Jetson OS environment on NVIDIA Jetson Development Kits (TK1, TX1, TX2, Xavier)
Get information about the NVIDIA Jetson OS environment on NVIDIA Jetson Development Kits (TX1, TX2, AGX Xavier, Xavier NX, Nano, Nano 2GB)

The information about the NVIDIA Jetson Development Kit operating system is spread over a few files. This is a handy tool to use for reference.

The Python script jetsoninfo.py will list the hardware, version of L4T that is running, Ubuntu version, and the Linux kernel revision. To execute:

```
$ python jetsonInfo.py

```
or

$ ./jetsonInfo.py

```
$ python3 jetsonInfo.py
```
or
```
$ ./jetsonInfo.py
```
The hardware designator is derived from the file: '/proc/cpuinfo'

The L4T version is derived from the file: '/etc/nv_tegra_release'
@@ -22,24 +26,59 @@ The Ubuntu version is derived from the file: '/etc/os-release'

The Linux kernel version is derived from the file: '/proc/version'

Release Notes:
October, 2018
Thank you Raffaello Bonghi @rbonghi for jetson_variables and jetson_libraries scripts

### Release Notes:

### August, 2021
* v2.4
* Add support for JetPack 5
* Update to @rbonghi jetson_variables, jetson_libraries

### August, 2021
* v2.3
* Add support for JetPack 4.6
* Update to @rbonghi jetson_variables

### May, 2021
* v2.2
* Add support for JetPack 4.5
* Add support for Python3 - Thank you Patti Vacek! @pattivacek
* Add Vulcan version
* Update to @rbonghi jetson_variables

### July, 2020
* v2.1
* Add support for JetPack 4.4
* Fix issue with TX1/Nano identification
Thank you Manu Seth! @mseth10
* Update to @rbonghi jetson_libraries and jetson_variables

### January, 2020
* v2.0
* Add support for JetPack 4.3

### November, 2018
* v1.1.2
* Add support for JetPack 4.1.1 (L4T 31.1.0)

### October, 2018
* v1.1.1
* Add support for JetPack 4.1 (L4T 31.0.2)

September, 2018
### September, 2018
* v1.1
* Add support for JetPack 3.3 (L4T 28.2.1)
* Add support for Jetson AGX Xavier
* Add support for JetPack 4.0 (L4T 31.0.1)

July, 2018
### July, 2018
* v1.0
* Add support for JetPack 3.2.1 (L4T 28.2.1)

The shell script jetson_variables is derived from jetson_easy: https://github.com/rbonghi/jetson_easy
Original shell script jetson_variables is derived from jetson_easy: https://github.com/rbonghi/jetson_easy ; Now in jtop package

Copyright (c) 2015-2018 Raffaello Bonghi
Copyright (c) 2015-2021 Raffaello Bonghi

See license for jetson_easy in scripts folder

82 changes: 40 additions & 42 deletions jetsonInfo.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# MIT License
# Copyright (c) 2017-2018 Jetsonhacks
# Copyright (c) 2017-2022 Jetsonhacks
# Please see accompanying license information

from __future__ import print_function
import os,sys

class terminalColors:
@@ -14,65 +14,63 @@ class terminalColors:
import pprint
import subprocess

command = ['bash', '-c', 'source scripts/jetson_variables && env']
command = ['bash', '-c', 'source scripts/jetson_variables.sh && env']

proc = subprocess.Popen(command, stdout = subprocess.PIPE)

environment_vars = {}
for line in proc.stdout:
(key, _, value) = line.partition("=")
os.environ[key] = value
(key, _, value) = line.partition(b"=")
environment_vars[key.decode()] = value.decode()

proc.communicate()
proc.communicate()

# Jetson Model
print " NVIDIA Jetson " + os.environ["JETSON_BOARD"].strip()
print("NVIDIA " + environment_vars["JETSON_MODEL"].strip())

#L4T Version
if os.path.exists('/etc/nv_tegra_release'):
with open("/etc/nv_tegra_release","r") as l4tVersionFile:
l4tVersionFileText=l4tVersionFile.read()
textLines=l4tVersionFileText.splitlines()
l4tVersionInfo=textLines[0].split(',')
for entry in l4tVersionInfo:
if 'release' in entry:
# Example: '# R24 (release)'
l4tRelease=entry.split(' ')[1]
l4tRelease=filter(str.isdigit,l4tRelease)
elif 'REVISION' in entry:
# Example: 'REVISION: 2.1'
l4tRevision=entry.split(' ')[2]
elif 'BOARD' in entry:
# Example: 'BOARD: t210ref'
board=entry.split(' ')[2]
print ' L4T ' + l4tRelease + '.' + l4tRevision + " [ JetPack " +os.environ["JETSON_JETPACK"].strip()+" ]"
print ' Board: ' + board
else:
print terminalColors.FAIL + "Error: Unable to find L4T Version" + terminalColors.ENDC
print "Reason: Unable to find file /etc/nv_tegra_release"

print(' L4T ' + environment_vars['JETSON_L4T'].strip() + ' [ JetPack ' +environment_vars['JETSON_JETPACK'].strip()+' ]')
# Ubuntu version
if os.path.exists('/etc/os-release'):
with open("/etc/os-release","r") as ubuntuVersionFile:
with open('/etc/os-release', 'r') as ubuntuVersionFile:
ubuntuVersionFileText=ubuntuVersionFile.read()
for line in ubuntuVersionFileText.splitlines():
if 'PRETTY_NAME' in line:
# PRETTY_NAME="Ubuntu 16.04 LTS"
ubuntuRelease=line.split('"')[1]
print ' ' + ubuntuRelease
print(' ' + ubuntuRelease)
else:
print terminalColors.FAIL + "Error: Unable to find Ubuntu Version" + terminalColors.ENDC
print "Reason: Unable to find file /etc/os-release"


print(terminalColors.FAIL + 'Error: Unable to find Ubuntu Version' + terminalColors.ENDC)
print('Reason: Unable to find file /etc/os-release')

# Kernel Release
if os.path.exists('/proc/version'):
with open("/proc/version","r") as versionFile:
with open('/proc/version', 'r') as versionFile:
versionFileText=versionFile.read()
kernelReleaseArray=versionFileText.split(" ")
print " Kernel Version: " + kernelReleaseArray[2]
kernelReleaseArray=versionFileText.split(' ')
print(' Kernel Version: ' + kernelReleaseArray[2])
else:
print terminalColors.FAIL + "Error: Unable to find Linux kernel version" + terminalColors.ENDC
print "Reason: Unable to find file /proc/version"
print(terminalColors.FAIL + 'Error: Unable to find Linux kernel version' + terminalColors.ENDC)
print('Reason: Unable to find file /proc/version')


command1 = ['bash', '-c', 'source scripts/jetson_libraries.sh && env']

proc1 = subprocess.Popen(command1, stdout = subprocess.PIPE)
# environment_vars = {}
for line in proc1.stdout:
(key, _, value) = line.partition(b"=")
environment_vars[key.decode()] = value.decode()



print(' CUDA ' + environment_vars['JETSON_CUDA'].strip())
print(' CUDA Architecture: ' + environment_vars['JETSON_CUDA_ARCH_BIN'].strip())
print(' OpenCV version: ' + environment_vars['JETSON_OPENCV'].strip())
print(' OpenCV Cuda: ' + environment_vars['JETSON_OPENCV_CUDA'].strip())
print(' CUDNN: ' + environment_vars['JETSON_CUDNN'].strip())
print(' TensorRT: ' + environment_vars['JETSON_TENSORRT'].strip())
print(' Vision Works: ' + environment_vars['JETSON_VISIONWORKS'].strip())
print(' VPI: ' + environment_vars['JETSON_VPI'].strip())
print(' Vulcan: ' + environment_vars['JETSON_VULKAN_INFO'].strip())


print " CUDA " + os.environ["JETSON_CUDA"].strip()
123 changes: 123 additions & 0 deletions scripts/jetson_libraries.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
#!/bin/bash
# This file is part of the jetson_stats package (https://github.com/rbonghi/jetson_stats or http://rnext.it).
# Copyright (c) 2020 Raffaello Bonghi.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.


# Read CUDA version
if [ -f /usr/local/cuda/version.txt ]; then
JETSON_CUDA=$(cat /usr/local/cuda/version.txt | sed 's/\CUDA Version //g')
elif [ -f /usr/local/cuda/bin/nvcc ]; then
JETSON_CUDA=$(/usr/local/cuda/bin/nvcc --version | egrep -o "V[0-9]+.[0-9]+.[0-9]+" | cut -c2-)
else
JETSON_CUDA="NOT_INSTALLED"
fi
# Jetson CUDA version
export JETSON_CUDA

# Read from OpenCV if is installed CUDA
opencv_read_cuda()
{
# Red if use CUDA or not
local OPENCV_VERSION_VERBOSE=$(opencv_version --verbose | grep "Use Cuda" )
if [ ! -z "$OPENCV_VERSION_VERBOSE" ]; then
# Read status of CUDA
local OPENCV_CUDA_FLAG=$(echo $OPENCV_VERSION_VERBOSE | cut -f2 -d ':' | tr -s ' ' | cut -d' ' -f2 )
if [ "$OPENCV_CUDA_FLAG" == "NO" ]; then
# Set NO if cuda is not installed
echo "NO"
else
# Set YES if cuda is installed
echo "YES"
fi
return
fi
# read NVIDIA CUDA version
OPENCV_VERSION_VERBOSE=$(opencv_version --verbose | grep "NVIDIA CUDA" )
if [ ! -z "$OPENCV_VERSION_VERBOSE" ]; then
# get information
local OPENCV_CUDA_FLAG=$(echo $OPENCV_VERSION_VERBOSE | cut -f2 -d ':' | tr -s ' ' | cut -d' ' -f4 | cut -d',' -f1 )
OPENCV_CUDA_FLAG=${OPENCV_CUDA_FLAG//[[:blank:]]/}
# Set YES if cuda is installed
echo "YES"
return
fi
echo "NO"
return
}

if hash opencv_version 2>/dev/null; then
JETSON_OPENCV="$(opencv_version)"
# Read information about cuda status
JETSON_OPENCV_CUDA=$(opencv_read_cuda)
else
JETSON_OPENCV="NOT_INSTALLED"
JETSON_OPENCV_CUDA="NO"
fi
# Opencv variables
export JETSON_OPENCV
export JETSON_OPENCV_CUDA

# Extract cuDNN version
JETSON_CUDNN=$(dpkg -l 2>/dev/null | grep -m1 "libcudnn")
if [ ! -z "$JETSON_CUDNN" ] ; then
JETSON_CUDNN=$(echo $JETSON_CUDNN | sed 's/.*libcudnn[0-9] \([^ ]*\).*/\1/' | cut -d '-' -f1 )
else
JETSON_CUDNN="NOT_INSTALLED"
fi
# Export NVIDIA CuDNN Library
export JETSON_CUDNN

# Extract TensorRT version
JETSON_TENSORRT=$(dpkg -l 2>/dev/null | grep -m1 " tensorrt ")
if [ ! -z "$JETSON_TENSORRT" ] ; then
JETSON_TENSORRT=$(echo $JETSON_TENSORRT | sed 's/.*tensorrt \([^ ]*\).*/\1/' | cut -d '-' -f1 )
else
JETSON_TENSORRT="NOT_INSTALLED"
fi
# Export NVIDIA CuDNN TensorRT
export JETSON_TENSORRT

# Extract Visionworks version
JETSON_VISIONWORKS=$(dpkg -l 2>/dev/null | grep -m1 "libvisionworks")
if [ ! -z "$JETSON_VISIONWORKS" ] ; then
JETSON_VISIONWORKS=$(echo $JETSON_VISIONWORKS | sed 's/.*libvisionworks \([^ ]*\).*/\1/' )
else
JETSON_VISIONWORKS="NOT_INSTALLED"
fi
# Export NVIDIA CuDNN VisionWorks
export JETSON_VISIONWORKS

# Extract VPI
JETSON_VPI=$(dpkg -l 2>/dev/null | grep -m1 "vpi")
if [ ! -z "$JETSON_VPI" ] ; then
JETSON_VPI=$(echo $JETSON_VPI | sed 's/.*vpi[0-9] \([^ ]*\).*/\1/' | cut -d '-' -f1 )
else
JETSON_VPI="NOT_INSTALLED"
fi
# Export VPI
export JETSON_VPI

# Vulkan
JETSON_VULKAN_INFO=$(which vulkaninfo)
if [ ! -z $JETSON_VULKAN_INFO ] ; then
JETSON_VULKAN_INFO=$($JETSON_VULKAN_INFO 2> /dev/null | grep -m1 "Vulkan Instance Version")
JETSON_VULKAN_INFO=$(echo $JETSON_VULKAN_INFO | sed 's/.*: \([^ ]*\).*/\1/' )
else
JETSON_VULKAN_INFO="NOT_INSTALLED"
fi
# Export VPI
export JETSON_VULKAN_INFO
#EOF
Loading