NVIDIA Tegra Tegra Linux Driver Package
Development Guide
27.1 Release

 
Tegra Stats Utility
 
Reported Statistics
Options
Running Tegra Stats
Re-Deploying Tegra Stats
L4T provides the Tegra Stats utility (tegrastats), which reports memory usage and processor usage for NVIDIA® Tegra® devices.
JetPack installer or the flashing script places the script in the home directory on the target at:
${HOME}/tegrastats
On the host system, the script is delivered in the TAR file at:
Linux_for_Tegra/nv_tegra/nv_tools.tbz2
Reported Statistics
The following table shows the statistics the Tegra Stats utility reports.
Statistic
X
Y
Z
RAM X/Y (lfb NxZ)
Largest Free Block (lfb) is a statistic about the memory allocator, and refers to the largest contiguous block of physical memory that can currently be allocated. It is at most 4 MB, and can become smaller with memory fragmentation.
 
Note: The word physical in the above; allocations made in virtual memory can be bigger.
Amount of RAM in use in MB
Total amount of RAM available for applications
Z is the size of the largest free block, N the number of free blocks of this size.
 
CPU [X%,Y%, , ]@Z
 
Note: T30 has up to four CPU cores in the G-Cluster and one CPU core in the LP-Cluster.
Load statistics for each of the CPU cores relative to the current running frequency Z, or 'off' in case a core is currently powered down.
 
This is a rough approximation based on time spent in system idle process as reported by the Linux kernel in /proc/stat file.
Load statistics for each of the CPU cores relative to the current running frequency Z, or 'off' in case a core is currently powered down.
 
This is a rough approximation based on time spent in system idle process as reported by the Linux kernel in /proc/stat file.
CPU frequency in MHz, which dynamically goes up or down depending on the CPU workload
avp X%@Y
 
AVP is the audio/video processor, which is not visible to the OS or applications. However, some forms of video decode/encode make heavy use of it.
Note: In Tegra X1 and later devices, AVP hardware is replaced by ARM7
Percent of the AVP or ARM7 that is being used (the AVP load) relative to the current running frequency
AVP or ARM7 frequency in MHz, which dynamically goes up or down depending on the AVP workload
N/A
vde Y
 
VDE is the video hardware engine.
Note: VDE is deprecated beginning with R24.1.
N/A
VDE frequency in MHz
N/A
edp limit X
Limit of the CPU maximum frequency
N/A
N/A
emc X%@Y
 
EMC is the external memory controller, through which all sysmem/carve-out/GART memory accesses go.
Percent of the EMC memory bandwidth that is being used, relative to the current running frequency
EMC frequency in MHz
N/A
GR3D X%@Y
 
GR3D is the GPU engine.
Percent of the GR3D that is being used, relative to the current running frequency
GR3D frequency in MHz
N/A
MSENC Y
 
MSENC is the video hardware encoding engine.
N/A
MSENC frequency in MHz
N/A
NVDEC Y
 
NVDEC is the video hardware decoding engine.
N/A
NVDEC frequency in MHz
N/A
Example Output
The following example output is extracted from running a 1080p video playback use case. CPU frequency is running between 300 and 750 MHz and only one CPU is active.
Notes:
The examples provided are for previous Tegra devices.
 
E/TegraStats( 7484): RAM 92/184MB (lfb 1x4MB) | DFS(%@MHz): cpu [52%,35%]@527 avp 18%@100 vde 0%@240 emc 17%@300
 
E/TegraStats( 7484): RAM 93/184MB (lfb 1x4MB) | DFS(%@MHz): cpu [51%,51%]@750 avp 8%@100 vde 0%@240 emc 17%@300
 
E/TegraStats( 7484): RAM 93/184MB (lfb 1x4MB) | DFS(%@MHz): cpu [58%,45%]@600 avp 8%@100 vde 0%@240 emc 16%@300
 
E/TegraStats( 7484): RAM 93/184MB (lfb 1x4MB) | DFS(%@MHz): cpu [48%,49%]@463 avp 8%@100 vde 0%@240 emc 17%@300
E/TegraStats( 7484): RAM 93/184MB (lfb 1x4MB) | DFS(%@MHz): cpu [60%,41%]@411 avp 8%@100 vde 0%@240 emc 17%@300
 
E/TegraStats( 7484): RAM 93/184MB (lfb 1x4MB) | DFS(%@MHz): cpu [60%,48%]@384 avp 9%@100 vde 0%@240 emc 18%@300
E/TegraStats( 7484): RAM 93/184MB (lfb 1x4MB) | DFS(%@MHz): cpu [60%,44%]@438 avp 10%@100 vde 0%@240 emc 48%@108
E/TegraStats( 7484): RAM 93/184MB (lfb 1x4MB) | DFS(%@MHz): cpu [44%,53%]@411 avp 8%@100 vde 0%@240 emc 16%@300
E/TegraStats( 7484): RAM 93/184MB (lfb 1x4MB) | DFS(%@MHz): cpu [57%,47%]@359 avp 8%@100 vde 0%@240 emc 17%@300
E/TegraStats( 7484): RAM 93/184MB (lfb 1x4MB) | DFS(%@MHz): cpu [55%,44%]@750 avp 8%@100 vde 0%@240 emc 17%@300
 
E/TegraStats(7484): RAM 98/184MB (lfb 1x1MB) | DFS(%@MHz): cpu [77%,68%]@300 avp 2%@100 vde 0%@240 emc 14%@300
 
E/TegraStats(7484): RAM 94/184MB (lfb 1x2MB) | DFS(%@MHz): cpu [35%,29%]@300 avp 2%@100 vde 0%@240 emc 14%@300
 
E/TegraStats(7484): RAM 95/184MB (lfb 1x2MB) | DFS(%@MHz): cpu [35%,29%]@300 avp 2%@100 vde 0%@240 emc 14%@300
 
Options
TegraStats options and usage are described in the following table.
Option
Description
<delay>
The delay between outputs in milliseconds (ms). For example, a value of 500 causes output to display twice per second. If no delay value is specified, the default delay is 1000 ms. A <delay> value, if specified, must be the first value after the command, before any other options.
--start
Run TegraStats as a daemon, in the background.
--stop
Stop running any running instances of tegrastats.
--log-file <out_file>
Write the output of TegraStats to <out_file>.
-once
Print data only once and then exit.
-throttle
Track the throttle count.
<thermal_zone>
Print temperature in specified <thermal_zone>. The value for <thermal_zone> must match one of the strings in "/sys/devices/virtual/thermal/thermal_zone*/type.
 
Running Tegra Stats
When you run tegrastats on Linux devices, it prints statistics to stdout.
Example Log Print
E/TegraStats( 3627): RAM 250/490MB | DFS(%@MHz): cpu [61%,45%]@835 avp 17%@100 vde 34%@216 emc 25%@333
To run tegrastats
On the target, execute the following commands:
sudo ${HOME}/tegrastats <delay> &
Where <delay> is the frequency of log prints, expressed in milliseconds (1000 means print every second).
To stop tegrastats
On the target, execute the following commands:
sudo ${HOME}/tegrastats --stop
Re-Deploying Tegra Stats
The Tegra Stats Utility is preinstalled in the default root file system in the home directory. If you have modified the root file system configuration and removed tegrastats from the build, you can re-deploy it on the target at runtime.
To re-deploy tegrastats
Execute the following commands from the debug host PC:
scp tegrastats nvidia@<TARGET_DEVICE_IP>:/home/nvidia/