.. _AT.JetsonLinuxDevelopmentTools.TegrastatsUtility: .. include:: /content/swdocs.rsts .. spelling:: Tegrastats tegrastats logfile preinstalled Tegrastats Utility !!!!!!!!!!!!!!!!!! The ``tegrastats`` utility reports memory usage and processor usage for |NVIDIA(r)| |Jetson(tm)|\ -based devices. You can find the utility in your package at ``/core/utils/tegrastats``. Reported Statistics @@@@@@@@@@@@@@@@@@@ The following table shows the statistics the ``tegrastats`` utility reports. .. raw:: html :file: TegrastatsUtility/ReportedStatistics.htm .. todo:: Example output for T234 processors: TBD. 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 .. todo:: GPU, SOC, CV, and SYS5V are not in the table. In an earlier release I corresponded with Rajkumar about this but did not reach a resolution. His last reply said, “... The power rail name will be different for each platform. You have already added one row “[VDDX] Y/Z” in the table for power. That is sufficient.” I cannot accept that. If the reader sees a statistic and doesn't already know what it is, how are they to figure it out? The fact that we have already described one power rail statistic and this is another is irrelevant. *The reader doesn't know it’s a power rail statistic because we haven’t told them.* The description of VDDx is brief, and I assume that others can be comparably brief. Or perhaps we should put all of the power rails in a separate table, and take advantage of their common properties to describe them more compactly. As a separate issue, in the T194 example there are two “CPU” entries, and I don’t understand that. 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 <#reported-statistics>`_, above. To run tegrastats ################# - To run ``tegrastats`` in the background, execute the following command:: $ tegrastats --interval -logfile & Where: - ```` is the interval between log prints in milliseconds. - ```` is the pathname of the output file to which ``tegrastats`` writes the log prints. - To run ``tegrastats`` in the foreground, omit the trailing ‘&’. You may also omit the ``--logfile`` option to allow log output to go to stdout:: $ tegrastats --interval To stop tegrastats ################## - If ``tegrastats`` is running in the background, execute the following commands:: $ ps $ kill -9 Where ```` is the process ID of ``tegrastats`` as reported by the ``ps`` command. - Alternatively, you can run:: $ tegrastats --stop - If ``tegrastats`` is 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@:/home/nvidia/ tegrastats Command Line Options @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ``tegrastats`` supports the following command line options. +----------------------+------------------------------------------------------+ | Option | Meaning | +======================+======================================================+ | --interval | The interval at which ``tegrastats`` is to write | | | output to the log, in milliseconds. The | | | default interval is 1000 msec. | +----------------------+------------------------------------------------------+ | --verbose | Print verbose messages. These messages may | | | include multiple warnings about read | | | failures during the query process. | +----------------------+------------------------------------------------------+ | --stop | Stop any running instances of ``tegrastats``. | +----------------------+------------------------------------------------------+ | --logfile | Dump the output of ``tegrastats`` to ````. | +----------------------+------------------------------------------------------+