Tegrastats Utility
The tegrastats utility reports memory usage and processor usage for NVIDIA® Jetson™-based devices.
You can find the utility in your package at <top>/core/utils/tegrastats.
Reported Statistics
The following table shows the statistics the tegrastats utility reports.
|
Format of statistic Example of statistic Description of statistic |
X | Y | Z | ||
|---|---|---|---|---|---|
|
RAM X /Y (lfb NxZ)
RAM 220/38955MB (lfb 847x4MB)
Largest Free Block (lfb), a memory allocator statistic that describes the largest contiguous block of physical memory that can currently be allocated: at most 4 MB. It can become smaller with memory fragmentation. Allocations of virtual memory can be bigger. |
Amount of RAM in use, specified in megabytes | Total amount of RAM available for applications | Size of the largest free memory block, in megabytes. N is the number of free blocks of this size. | ||
|
SWAP X /Y (cached Z)
SWAP 0/1978MB (cached 0MB)
Amount of swap memory available and in use. |
Amount of SWAP in use, in megabytes | Total amount of SWAP available for applications | Amount of SWAP cached | ||
|
IRAM X /Y (lfb Z)
IRAM 0/252kB(lfb 252kB)
Amount of memory local to the video hardware engine. |
Amount of IRAM memory in use, in kilobytes | Total amount of IRAM memory available | Size of the largest free block of IRAM memory | ||
|
CPU [X%,X%,...]@Z
CPU [1%@102,5%@102,0%@102,0%@102]
CPU utilization. X and Y are rough approximations based on time spent in the system idle process as reported by the Linux kernel in /proc/stat. |
Load on each CPU core relative to the current running frequency Z, or off if a core is currently powered down | — | CPU frequency in megahertz. Goes up or down dynamically depending on the CPU workload. | ||
|
EMC X%@Y External memory controller statistics. All sysmem/carve-out/GART memory accesses go through the memory controller. |
Percentage of EMC memory bandwidth in use relative to the current running frequency | EMC frequency in megahertz | — | ||
|
GR3D_FREQ X%@[Y1,Y2] GPU engine statistics. The GPU of Jetson AGX Orin series contains two GPCs, each GPC has its own frequency controller. |
Proportion of GPU activation time in a period. Different GPCs have the same percentage. | Frequency of GPU's two GPCs in megahertz, Y1 and Y2 correspond to the first GPC and the second GPC of GPU. | — | ||
|
VIC_FREQ X%@Y VIC engine statistics. The VIC engine implements video post-processing functions needed by video playback applications to produce a final image for the player window. |
VIC engine loading as a percentage of current VIC engine frequency | Current VIC engine frequency | — | ||
|
APE Y
APE 150
Audio processing engine statistics. The APE subsystem consists of ADSP (an ARM® Cortex™-A9 CPU), AHUB, ADMA, mailboxes for communication between components of APE, etc. |
— | APE frequency in megahertz | — | ||
|
MTS fg X% bg Y%
MTS fg 35% bg 65%
Amount of time spent in foreground and background tasks. |
Percentage of time spent in foreground tasks | Percentage of time spent in background tasks | — | ||
|
X @Y C
MCPU@45C
Temperature of one of the processor blocks as reported by node /sys/devices/virtual/thermal/thermal_zone<x>/temp/, where <x> is the name of the block. |
Processor block name | Processor block temperature in degrees Celsius | — | ||
|
VDDX Y /Z
VDDRQ 312/234
Power consumption statistics for a power block. |
Name of the power rail * | Block’s current power consumption in milliwatts | Block’s average power consumption in milliwatts | ||
|
GR3D_PCI X % Reports DGPU load or frequency or both, depending on information available from the sysfs node. |
DGPU utilization | DGPU frequency in megahertz; goes up or down dynamically, depending on DGPU workload | — | ||
|
NVENC Y Video hardware encoding engine satistics for encoder 0 and 1. Processors other than T194 have only one encoder, and do not report NVENC1. |
— | Video hardware encoding engine frequency in megahertz | — | ||
|
NVDEC Y Video hardware decoding engine statistics for decoder 0 and 1. Shown only when the hardware decoder/encoder engine is used. Processors other than T194 have only one decoder, and do not report NVDEC1. |
— | Video hardware decoding engine frequency in megahertz | — | ||
|
|||||
Example Output for T194 Platforms
This example represents output for Jetson AGX Xavier series and Jetson Xavier NX series devices:
RAM 1545/31919MB (lfb 7400x4MB) SWAP 0/15959MB (cached 0MB) CPU
[0%@1190,0%@1190,0%@1190,0%@1190,0%@1190,0%@1190,0%@1190,0%@1190]
EMC_FREQ 1%@408 GR3D_FREQ 0%@318 VIC_FREQ 0%@115 APE 150 MTS fg 0% bg 0%
AO@38C GPU@39.5C Tdiode@43.25C PMIC@100C AUX@38.5C CPU@39.5C
thermal@38.8C Tboard@39C GPU 0/0 CPU 468/468 SOC 937/937 CV 0/0 VDDRQ
312/234 SYS5V 1458/1458
Running tegrastats
When you run tegrastats on Linux devices, it prints statistics to stdout. The output resembles one of the examples shown under Reported Statistics, above.
To run tegrastats
To run
tegrastatsin the background, execute the following command:$ tegrastats --interval <int> --logfile <out_file> &
Where:
<int>is the interval between log prints in milliseconds.<out_file>is the pathname of the output file to whichtegrastatswrites the log prints.
To run
tegrastatsin the foreground, omit the trailing ‘&’. You may also omit the--logfileoption to allow log output to go to stdout:$ tegrastats --interval <int>
To stop tegrastats
If
tegrastatsis running in the background, execute the following commands:$ ps $ kill -9 <pid>
Where
<pid>is the process ID oftegrastatsas reported by thepscommand.Alternatively, you can run:
$ tegrastats --stop
If
tegrastatsis running in the foreground, press CTRL+C in the window where it is running.
Re-Deploying tegrastats
The tegrastats utility is preinstalled. If you have removed tegrastats
from the build, you can re-deploy it on the target at runtime.
To re-deploy tegrastats
Execute the following command from the host PC:
$ scp tegrastats nvidia@<TARGET_DEVICE_IP>:/home/nvidia/
tegrastats Command Line Options
tegrastats supports the following command line options.
Option |
Meaning |
|---|---|
–interval <int> |
The interval at which |
–verbose |
Print verbose messages. These messages may include multiple warnings about read failures during the query process. |
–stop |
Stop any running instances of |
–logfile <out_file> |
Dump the output of |