Tegrastats sudo


My problem is quite straight forward,
I can only get the power consumption measurements when I run sudo tegrastasts and not when I run the command without sudo. Is this normal? if not how do I fix it?

no sudo

RAM 5868/31921MB (lfb 5543x4MB) SWAP 0/15960MB (cached 0MB) CPU [0%@2265,0%@2265,0%@2265,0%@2265,0%@2265,0%@2265,0%@2265,0%@2265] EMC_FREQ 0% GR3D_FREQ 0% AO@32C GPU@34.5C Tdiode@35.25C PMIC@100C AUX@31.5C CPU@34.5C thermal@33.15C Tboard@34C


RAM 5868/31921MB (lfb 5543x4MB) SWAP 0/15960MB (cached 0MB) CPU [1%@2265,0%@2265,0%@2265,0%@2265,0%@2265,0%@2265,0%@2265,0%@2265] EMC_FREQ 0%@2133 GR3D_FREQ 0%@1377 VIC_FREQ 0%@115 APE 150 MTS fg 0% bg 0% AO@32C GPU@34.5C Tdiode@35.25C PMIC@100C AUX@32C CPU@34.5C thermal@33.65C Tboard@34C GPU 931/931 CPU 465/465 SOC 2484/2484 CV 0/0 VDDRQ 466/466 SYS5V 2403/2403

thanks for your help!!

This is completely normal operation of tegrastats. You are required to use sudo if you wish to view all of the available information.

So, is jtop executing it with elevated privileges

I do not personally have much experience with jtop. I have stuck with tegrastats and some custom scripts to monitor our Jetson systems. My understanding is that as of v3.1.0, sudo is no longer required to run jtop. I don’t think jtop gives power consumption measurements however. Perhaps someone who has experience with the jtop utility could clarify.

Most of the device and power stats can be queried from various sysfs nodes from within Ubuntu (L4T). More info can be found in the Developer Guide https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/power_management_jetson_xavier.html#wwconnect_header

Hope this is of some help to you.

Perhaps @rbonghi can comment on how he is doing it with jtop.

Thx @dusty_nv ,

jtop is able to read the status of your NVIDIA Jetson without a sudo.
When you install jetson-stats is installed a service as well to read all privileged information without use sudo.

To install, you need only pip or pip3 and run this command on your shell:
sudo -H pip install -U jetson-stats

If you are writing a code in python, jtop has a library to access directly to all peripherals, take a look for all these examples:

The python API documentation is available here: jtop package — jetson-stats 3.1.0 documentation