Jetson 运行模式及状态查询
2019-03-21 本文已影响75人
童年雅趣
1. nvpmodel (设置不同时钟以实现芯片的不同功耗模式)
切换NVP 模式:
$sudo nvpmodel -m xxx ( xxx 表示Jetson 支持的运行模式)
比如:sudo nvpmodel -m 0 (进入最高功耗模式)
nvpmodel -q 查看 nvpmodel对应的模式:
jetbot@jetbot:~$ nvpmodel -q
NV Power Mode: MAXN
0
nvpmodel 支持内容请查看文件:
/etc/nvpmodel.conf
2. Jetson_clocks.sh
运行脚本,进入超频模式并自动打开风扇FAN
$sudo ./jetson_clocks.sh
(Ubuntu 18.04 版本,直接运行: $sudo jetson_clocks)
系统进入最高功耗和高频速度运行状态需运行命令1和2,即:
$sudo nvpmodel -m 0
$sudo ./jetson_clocks.sh (或jetson_clocks)
3. Tegra 运行状态查看
$./tegrastats
$ tegrastats (Ubuntu 18.04 版本)
包含RAM\CPU\GPU\MEMORY运行状态,CPU\GPU\TBoard等温度数值,部分核心电压数据如VGPU
RAM 2814/7854MB (lfb 906x4MB) CPU [0%@2034,0%@2035,0%@2035,0%@2037,0%@2032,0%@2032] EMC_FREQ 33%@1866 GR3D_FREQ 47%@1300 APE 150 MTS fg 15% bg 31% BCPU@79.5C MCPU@79.5C GPU@79.5C PLL@79.5C Tboard@71C Tdiode@79.25C PMIC@100C thermal@79.3C VDD_IN 17150/17150 VDD_CPU 5290/5290 VDD_GPU 5215/5215 VDD_SOC 1840/1840 VDD_WIFI 0/0 VDD_DDR 3086/3086
4. Tegra L4T Version查看
Xavier JetPack4.1 Version
nvidia@jetson-0424418053914:~$ cat /etc/nv_tegra_release
# R31 (release), REVISION: 1.0, GCID: 13194883, BOARD: t186ref, EABI: aarch64, DATE: Wed Oct 31 22:26:16 UTC 2018
......Continue
nvidia@jetson-0424418053914:~$ cat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR 7
#define CUDNN_MINOR 3
#define CUDNN_PATCHLEVEL 1
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)
附录文件:
$sudo vi /etc/nvpmodel.conf
Jetson Nano nvpmodel.conf 文件详情:
#
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
# FORMAT:
# < PARAM TYPE=PARAM_TYPE NAME=PARAM_NAME >
# ARG1_NAME ARG1_PATH_VAL
# ARG2_NAME ARG2_PATH_VAL
# ...
# This starts a section of PARAM definitions, in which each line
# has the syntax below:
# ARG_NAME ARG_PATH_VAL
# ARG_NAME is a macro name for argument value ARG_PATH_VAL.
# PARAM_TYPE can be FILE, or CLOCK.
#
# < POWER_MODEL ID=id_num NAME=mode_name >
# PARAM1_NAME ARG11_NAME ARG11_VAL
# PARAM1_NAME ARG12_NAME ARG12_VAL
# PARAM2_NAME ARG21_NAME ARG21_VAL
# ...
# This starts a section of POWER_MODEL configurations, followed by
# lines with parameter settings as the format below:
# PARAM_NAME ARG_NAME ARG_VAL
# PARAM_NAME and ARG_NAME are defined in PARAM definition sections.
# ARG_VAL is an integer for PARAM_TYPE of CLOCK, and -1 is taken
# as INT_MAX. ARG_VAL is a string for PARAM_TYPE of FILE.
# This file must contain at least one POWER_MODEL section.
#
# < PM_CONFIG DEFAULT=default_mode >
# This is a mandatory section to specify one of the defined power
# model as the default.
###########################
# #
# PARAM DEFINITIONS #
# #
###########################
< PARAM TYPE=FILE NAME=CPU_ONLINE >
CORE_0 /sys/devices/system/cpu/cpu0/online
CORE_1 /sys/devices/system/cpu/cpu1/online
CORE_2 /sys/devices/system/cpu/cpu2/online
CORE_3 /sys/devices/system/cpu/cpu3/online
< PARAM TYPE=FILE NAME=GPU_POWER_CONTROL_ENABLE >
GPU_PWR_CNTL_EN /sys/devices/gpu.0/power/control
< PARAM TYPE=FILE NAME=GPU_POWER_CONTROL_DISABLE >
GPU_PWR_CNTL_DIS /sys/devices/gpu.0/power/control
< PARAM TYPE=CLOCK NAME=CPU_A57 >
FREQ_TABLE /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
MAX_FREQ /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
MIN_FREQ /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
FREQ_TABLE_KNEXT /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
MAX_FREQ_KNEXT /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
MIN_FREQ_KNEXT /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
< PARAM TYPE=CLOCK NAME=GPU >
FREQ_TABLE /sys/devices/gpu.0/devfreq/57000000.gpu/available_frequencies
MAX_FREQ /sys/devices/gpu.0/devfreq/57000000.gpu/max_freq
MIN_FREQ /sys/devices/gpu.0/devfreq/57000000.gpu/min_freq
FREQ_TABLE_KNEXT /sys/devices/17000000.gv11b/devfreq/devfreq0/available_frequencies
MAX_FREQ_KNEXT /sys/devices/gpu.0/devfreq/57000000.gpu/max_freq
MIN_FREQ_KNEXT /sys/devices/gpu.0/devfreq/57000000.gpu/min_freq
< PARAM TYPE=CLOCK NAME=EMC >
MAX_FREQ /sys/kernel/nvpmodel_emc_cap/emc_iso_cap
MAX_FREQ_KNEXT /sys/kernel/nvpmodel_emc_cap/emc_iso_cap
###########################
# #
# POWER_MODEL DEFINITIONS #
# #
###########################
# MAXN is the NONE power model to release all constraints
< POWER_MODEL ID=0 NAME=MAXN >
CPU_ONLINE CORE_0 1
CPU_ONLINE CORE_1 1
CPU_ONLINE CORE_2 1
CPU_ONLINE CORE_3 1
CPU_A57 MIN_FREQ 0
CPU_A57 MAX_FREQ -1
GPU_POWER_CONTROL_ENABLE GPU_PWR_CNTL_EN on
GPU MIN_FREQ 0
GPU MAX_FREQ -1
GPU_POWER_CONTROL_DISABLE GPU_PWR_CNTL_DIS auto
EMC MAX_FREQ 0
< POWER_MODEL ID=1 NAME=5W >
CPU_ONLINE CORE_0 1
CPU_ONLINE CORE_1 1
CPU_ONLINE CORE_2 0
CPU_ONLINE CORE_3 0
CPU_A57 MIN_FREQ 0
CPU_A57 MAX_FREQ 918000
GPU_POWER_CONTROL_ENABLE GPU_PWR_CNTL_EN on
GPU MIN_FREQ 0
GPU MAX_FREQ 640000000
GPU_POWER_CONTROL_DISABLE GPU_PWR_CNTL_DIS auto
EMC MAX_FREQ 1600000000
# mandatory section to configure the default mode
< PM_CONFIG DEFAULT=0 >