jetson-nano环境查询

1.查看jetson的原始环境,当前环境组件版本和使用状态。

答应我,NVIDIA Jetson这个小工具一定要装上! (qq.com)

使用该命令需要下载 jetson-stats。

pip install jetson-stats
 jetson_release

该命令是一个脚本文件。

如果没有可以自行添加,文件说明中有说是jetson_stats包的一部分。因为我使用的是亚博配置好 的镜像。并没有验证下载这个包后是否可以使用。

创建脚本文件

#创建文件,添加权限
touch jetson_release
chmod +x jetson_release

添加下面的脚本

gedit jetson_release

在当前文件夹执行

./jetson_release

添加到系统命令环境中即/usr/local/bin/下面,权限不够的话使用sudo命令。

cp ./jetson_release  /usr/local/bin/jetson_release

可以在任何地方调用

脚本文件:

#!/bin/bash
# This file is part of the jetson_stats package (https://github.com/rbonghi/jetson_stats or http://rnext.it).
# Copyright (c) 2019 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/>.

bold=`tput bold`
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`


jetson_release()
{
    local VERBOSE=$1

    # Load JETSON environment variables
    JTOP_VARIABLE=""
    JTOP_PYTHON=""
    if type -P python3 >/dev/null 2>&1 ; then
        JTOP_VARIABLE=$(python3 -c "import jtop; print(jtop.__path__[0])" 2> /dev/null)
        JTOP_PYTHON="$(python3 -V 2>&1)"
    fi
    if type -P python >/dev/null 2>&1 && [ -z $JTOP_VARIABLE ] ; then
        JTOP_VARIABLE=$(python -c "import jtop; print(jtop.__path__[0])" 2> /dev/null)
        JTOP_PYTHON="$(python -V 2>&1)"
    fi
    if [ -z $JTOP_VARIABLE ] ; then
        echo "${red}I cannot locate jetson_variables${reset}"
        exit 1
    fi
    source $JTOP_VARIABLE/jetson_variables
    source $JTOP_VARIABLE/jetson_libraries

    # Load NVP model status
    if hash nvpmodel 2>/dev/null; then
        NVPModel="$(nvpmodel -q 2>/dev/null)"
        NVPModel=$(echo $NVPModel | sed 's/.*Mode://')
        # Extract model and type
        NVPModel_type=$(echo $NVPModel | cut -d' ' -f 2)
        NVPModel=$(echo $NVPModel | cut -d' ' -f 1)
    fi
    # Read status jetson_performance service
    JETSON_STATS_SERVICE_STATUS="$(systemctl is-active jetson_stats.service)"
    # Extract jetson-stats version
    JETSON_STATS_VERSION="$(jtop -v  2>&1 | cut -d " " -f2)"


    # Print Jetson version
    echo "${bold} - $JETSON_MACHINE${reset}"
    # Print Jetpack and kernel
    echo "   * Jetpack $JETSON_JETPACK [L4T $JETSON_L4T]"
    # Print status NVPModel
    if [ ! -z ${NVPModel+x} ] ; then
        echo "   * NV Power Mode: ${green}$NVPModel${reset} - Type: ${green}$NVPModel_type${reset}"
    fi
    # Print status Jetson Performance service
    if [ $JETSON_STATS_SERVICE_STATUS = "active" ] ; then
        echo "   * jetson_stats.service: ${green}$JETSON_STATS_SERVICE_STATUS${reset}"
    else
        echo "   * jetson_stats.service: ${red}$JETSON_STATS_SERVICE_STATUS${reset}"
    fi

    if $VERBOSE ; then
        # Board information
        echo "${bold} - Board info:${reset}"
        echo "   * Type: $JETSON_TYPE"
        echo "   * SOC Family: $JETSON_SOC - ID:$JETSON_CHIP_ID"
        echo "   * Module: $JETSON_MODULE - Board: $JETSON_BOARD"
        echo "   * Code Name: $JETSON_CODENAME"
        # If available print the Board IDS
        if [ ! -z "$JETSON_BOARDIDS" ] ; then
            echo "   * Boardids: $JETSON_BOARDIDS"
        fi
        # Print CUDA GPU architecture
        echo "   * CUDA GPU architecture (ARCH_BIN): $JETSON_CUDA_ARCH_BIN"
        # Print serial number
        if [ ! -z $JETSON_SERIAL_NUMBER ] ; then
            echo "   * Serial Number: ${JETSON_SERIAL_NUMBER^^}" # Make string to upper case
        fi
    fi

    # Libraries
    echo "${bold} - Libraries:${reset}"
    # Print Cuda version
    echo "   * CUDA: $JETSON_CUDA"
    # Print cuDNN version
    echo "   * cuDNN: $JETSON_CUDNN"
    # Print TensorRT version
    echo "   * TensorRT: $JETSON_TENSORRT"
    # Print VisionWorks version
    echo "   * Visionworks: $JETSON_VISIONWORKS"
    # Print OpenCv version and cuda compiled
    if [ $JETSON_OPENCV_CUDA = "YES" ] ; then
        echo "   * OpenCV: $JETSON_OPENCV compiled CUDA: ${green}$JETSON_OPENCV_CUDA${reset}"
    else
        echo "   * OpenCV: $JETSON_OPENCV compiled CUDA: ${red}$JETSON_OPENCV_CUDA${reset}"
    fi
    # Print VPI version
    echo "   * VPI: $JETSON_VPI"
    # Print Vulkan version
    echo "   * Vulkan: $JETSON_VULKAN_INFO"
    if $VERBOSE ; then
        # jetson-stats version
        echo "${bold} - jetson-stats:${reset}"
        echo "   * Version $JETSON_STATS_VERSION"
        echo "   * Works on $JTOP_PYTHON"
    fi
}

usage()
{
    if [ "$1" != "" ]; then
        echo "${red}$1${reset}"
    fi

    echo "jetson_release. [-v | --verbose] | [-h]"
    echo "   Show detailed information about this board. Machine, Jetpack, libraries and other."
    echo "Usage:"
    echo "$0 [options]"
    echo "options,"
    echo "   -h|--help     | This help"
    echo "   -v|--verbose  | Detailed information about this board"
}

main()
{
    local VERBOSE=false
    # Decode all information from startup
    while [ -n "$1" ]; do
        case "$1" in
            -h|--help)
                usage
                exit 0
                ;;
            -v | --verbose)
                VERBOSE=true
                ;;
            *)
                usage "[ERROR] Unknown option: $1"
                exit 1
            ;;
        esac
            shift 1
    done

    # Run jetson_release
    jetson_release $VERBOSE
}

main $@
exit 0
# EOF

2.生成简单的环境变量,了解硬件版本和已安装的jetpack

 export | grep JETSON 

3. 查看jetson的机器学习环境,检查已经安装的系统组件

Jetson-nano的OS镜像已经自带了JetPack,cuda,cudnn,opencv等都已经安装好,并有例子,这些例子安装路径如下所示

  • TensorRT /usr/src/tensorrt/samples/
  • CUDA /usr/local/cuda-10.2/samples/
  • cuDNN /usr/src/cudnn_samples_v8/

  • VisionWorks
    •  /usr/share/visionworks/sources/samples/
    • /usr/share/visionworks-tracking/sources/samples/
    • /usr/share/visionworks-sfm/sources/samples/
  • OpenCV /usr/share/opencv4/samples/

参考下列(1条消息) Jetson Nano(二):检查已安装组件_热爱学习的栾宝宝的博客-CSDN博客


deepstream

文件位置

/opt/nvidia/deepstream/deepstream-5.0/

deepstream_sdk文件夹解析

deepstream配置文件解析

安装库的一些网站,很多开发者都需要再安装Tensorflow和Pytorch,可以收藏一下这个网站:https://www.elinux.org/Jetson_Zoo:

一.Linux常用命令

Linux下的命令有几千条,但真正在实际开发中运用的就只有那些。

在jetson开始的时候,root密码是没有设置的。在有的时候,传文件的过程中,需要在系统文件夹下传递,这时开机创建的用户没有权限。

使用命令,设置root密码。

sudo passwd

1.查看操作系统版本

cat /proc/version

2.查看主板版本

cat /proc/cpuinfo

3.查看SD存储卡剩余空间

df -h

4.查看ip地址

ifconfig

5.压缩:tar –zcvf  filename.tar.gz dirname

解压:tar –zxvf filename.tar.gz

6.linux系统常用apt(Advanced Package Tool)高级软件工具来安装软件

              sudo apt-get install xxx     安装软件。

              sudo apt-get update         更新软件列表。

              sudo apt-get upgrade       更新已安装软件。

              sudo apt-get remove xxx   删除软件。

具体有关linux命令的教程:

Linux 命令大全 | 菜鸟教程

  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
Jetson Nano是一款由NVIDIA推出的嵌入式计算平台,它具有强大的GPU性能和低功耗特性,适用于边缘计算和人工智能应用开发。在Jetson Nano上搭建开发环境可以使用PyCharm进行代码编辑和调试。首先,你可以通过SSH远程连接Jetson Nano,在终端中输入ifconfig命令查看动态IP地址,然后使用PuTTY等工具进行远程连接。接着,你可以输入账号密码登录Jetson Nano,并输入jtop命令查看GPU、CPU、内存等运行状况。如果你觉得在Jetson终端操作不方便截图,你可以使用远程连接代替。此外,为了方便中文搜索和书写中文注释,建议在Jetson Nano上安装中文输入法。Jetson Nano自带ibus中文输入法,你可以在终端中输入ibus命令进行简单配置,以实现中文输入功能。\[1\]\[2\]\[3\] #### 引用[.reference_title] - *1* [JetsonNano学习(二)环境配置](https://blog.csdn.net/weixin_45463952/article/details/124064198)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [国产Jetson Nano学习篇2—详细讲解Jetson Nano的开发环境配置和其 Ubuntu 18.04系统的操作,入门必看](https://blog.csdn.net/weixin_64260325/article/details/127826320)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值