jetson-print-device-info
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesejetson-print-device-info
jetson-print-device-info
Prints a concise summary of the Jetson device this skill runs on.
This skill is intended as a reference example for the repo and the NVIDIA-wide skills CI. It runs on the Jetson target (not the host PC) and performs read-only inspection — useful as a baseline capture before running performance tests.
jetson-device-skills打印此技能运行所在的Jetson设备的简要信息汇总。
本技能是仓库和NVIDIA全平台技能CI的参考示例。它运行在Jetson目标设备上(而非主机PC),仅执行只读检查——在运行性能测试前作为基准信息捕获十分有用。
jetson-device-skillsPurpose
用途
Capture a baseline snapshot of a Jetson target's software stack and power mode before running performance, regression, or compatibility tests.
在运行性能测试、回归测试或兼容性测试前,捕获Jetson目标设备软件栈和电源模式的基准快照。
When to use
使用场景
- Starting a performance run and you want a captured baseline of the device's software stack and power mode.
- Verifying that a freshly flashed Jetson matches an expected L4T / JetPack version.
- 启动性能测试时,希望捕获设备软件栈和电源模式的基准信息。
- 验证新刷机的Jetson设备是否符合预期的L4T/JetPack版本。
Prerequisites
前置条件
- Running on a Jetson target (not the host PC).
- Standard CLIs available: ,
tr,cat,uname,uptime(orlsb_release)./etc/os-release - available for power mode (optional — skill falls back gracefully).
nvpmodel
- 运行在Jetson目标设备上(而非主机PC)。
- 具备标准CLI工具:、
tr、cat、uname、uptime(或lsb_release)。/etc/os-release - 具备工具以获取电源模式(可选——技能会优雅降级处理)。
nvpmodel
Inputs
输入
None. The skill reads only from the local Jetson filesystem and standard CLIs.
无。该技能仅从本地Jetson文件系统和标准CLI读取信息。
Instructions
操作步骤
Run each step in order and print the captured values into the report shown under Output format.
- Capture the module model and validate it is a Jetson target — exit early otherwise:
bash
# Device-tree strings are null-terminated, so strip NULs before printing. model=$(tr -d '\0' < /proc/device-tree/model 2>/dev/null) case "$model" in *Jetson*) ;; *) echo "Not running on a Jetson target (model: '${model:-unknown}')"; exit 1 ;; esac echo "$model" - Extract the L4T release header line — skip the rest of the file (long list of library SHAs):
bash
head -1 /etc/nv_tegra_release 2>/dev/null || echo "L4T release info not found" # Equivalent: grep -m1 '^# R' /etc/nv_tegra_release - Run and join its two output lines (
nvpmodel -qand the mode number) onto one line.NV Power Mode: <name>only uses the first char of its delimiter, so usepaste -sdto insert the literalawkseparator:/bashnvpmodel -q 2>/dev/null | awk 'NR==1{a=$0; next} {print a" / "$0}' \ || echo "nvpmodel not available" - Print the kernel version and uptime:
bash
uname -r uptime -p - Print the OS version (prefer , fall back to
lsb_release):/etc/os-releasebashlsb_release -ds 2>/dev/null || (. /etc/os-release && echo "$PRETTY_NAME") || echo "OS version not found"
按顺序执行每一步,并将捕获的值打印到输出格式所示的报告中。
- 捕获模块型号并验证设备为Jetson目标设备——否则提前退出:
bash
# Device-tree strings are null-terminated, so strip NULs before printing. model=$(tr -d '\0' < /proc/device-tree/model 2>/dev/null) case "$model" in *Jetson*) ;; *) echo "Not running on a Jetson target (model: '${model:-unknown}')"; exit 1 ;; esac echo "$model" - 提取L4T发布信息的首行——跳过文件其余内容(冗长的库SHA列表):
bash
head -1 /etc/nv_tegra_release 2>/dev/null || echo "L4T release info not found" # Equivalent: grep -m1 '^# R' /etc/nv_tegra_release - 运行并合并其两行输出(
nvpmodel -q和模式编号)为一行。NV Power Mode: <name>仅使用分隔符的第一个字符,因此使用paste -sd插入字面量awk分隔符:/bashnvpmodel -q 2>/dev/null | awk 'NR==1{a=$0; next} {print a" / "$0}' \ || echo "nvpmodel not available" - 打印内核版本和运行时长:
bash
uname -r uptime -p - 打印操作系统版本(优先使用,降级到
lsb_release):/etc/os-releasebashlsb_release -ds 2>/dev/null || (. /etc/os-release && echo "$PRETTY_NAME") || echo "OS version not found"
Output format
输出格式
Print a short report with these sections, one line each where possible:
text
Model: <device-tree model string>
L4T release: <release header line>
Power mode: <nvpmodel name> / <mode number>
Kernel: <uname -r>
Uptime: <uptime -p>
OS version: <lsb_release / /etc/os-release output>打印包含以下部分的简短报告,尽可能每行对应一项:
text
Model: <device-tree model string>
L4T release: <release header line>
Power mode: <nvpmodel name> / <mode number>
Kernel: <uname -r>
Uptime: <uptime -p>
OS version: <lsb_release / /etc/os-release output>Examples
示例
Example output on an Orin AGX dev kit (L4T R36 / Ubuntu 22.04):
text
Model: NVIDIA Jetson AGX Orin Developer Kit
L4T release: # R36 (release), REVISION: 3.0
Power mode: NV Power Mode: MAXN / 0
Kernel: 5.15.136-tegra
Uptime: up 2 hours, 14 minutes
OS version: Ubuntu 22.04.4 LTSExample output on an AGX Thor (L4T R39 / Ubuntu 24.04):
text
Model: NVIDIA Jetson AGX Thor Developer Kit
L4T release: # R39 (release), REVISION: 0.0
Power mode: NV Power Mode: 120W / 1
Kernel: 6.8.0-tegra
Uptime: up 12 minutes
OS version: Ubuntu 24.04 LTSOrin AGX开发套件(L4T R36 / Ubuntu 22.04)上的示例输出:
text
Model: NVIDIA Jetson AGX Orin Developer Kit
L4T release: # R36 (release), REVISION: 3.0
Power mode: NV Power Mode: MAXN / 0
Kernel: 5.15.136-tegra
Uptime: up 2 hours, 14 minutes
OS version: Ubuntu 22.04.4 LTSAGX Thor(L4T R39 / Ubuntu 24.04)上的示例输出:
text
Model: NVIDIA Jetson AGX Thor Developer Kit
L4T release: # R39 (release), REVISION: 0.0
Power mode: NV Power Mode: 120W / 1
Kernel: 6.8.0-tegra
Uptime: up 12 minutes
OS version: Ubuntu 24.04 LTSError handling
错误处理
Each command falls back to a clearly labeled / string if the underlying file or binary is missing — the skill never errors out mid-report. If is missing or does not contain a Jetson string, exit early with a clear "not running on a Jetson target" message.
"... not found""... not available"/proc/device-tree/model如果底层文件或二进制文件缺失,每个命令都会降级输出清晰标记的/字符串——技能不会在报告中途报错。如果缺失或不包含Jetson字符串,则提前退出并显示清晰的“未运行在Jetson目标设备上”提示信息。
"... not found""... not available"/proc/device-tree/modelLimitations
局限性
- Read-only inspection only — does not detect GPU/CPU clocks, thermal state, or per-rail power.
- output format varies between L4T versions; the skill prints it verbatim rather than parsing.
nvpmodel
- 仅支持只读检查——无法检测GPU/CPU时钟频率、热状态或单轨电源信息。
- 不同L4T版本的输出格式有所不同;技能会直接打印原始输出而非解析。
nvpmodel
Troubleshooting
故障排除
-
Error:Cause: Running on a host PC, not a Jetson target. Solution: Run the skill on the Jetson device directly (e.g. via SSH).
/proc/device-tree/model: No such file or directory -
Error:Cause: L4T BSP not installed, or running in a minimal container without
nvpmodel: command not found. Solution: Expected on non-Jetson or stripped environments — the skill printsnvpmodeland continues."nvpmodel not available"
-
错误:原因: 在主机PC而非Jetson目标设备上运行。 解决方案: 直接在Jetson设备上运行该技能(例如通过SSH)。
/proc/device-tree/model: No such file or directory -
错误:原因: 未安装L4T BSP,或在未包含
nvpmodel: command not found的极简容器中运行。 解决方案: 在非Jetson环境或精简环境中属于预期情况——技能会打印nvpmodel并继续执行。"nvpmodel not available"
Notes
注意事项
- Read-only. Do not change power mode, install packages, or modify any files.
- If the skill is invoked on a host PC by mistake, will not contain a Jetson model string — detect that and exit with a clear message rather than printing misleading info.
/proc/device-tree/model
- 只读操作。请勿更改电源模式、安装软件包或修改任何文件。
- 如果误在主机PC上调用该技能,将不包含Jetson型号字符串——需检测此情况并退出,显示清晰提示信息,而非打印误导性内容。
/proc/device-tree/model