Tegrastats missing information when run inside a container

I’m trying to run tegrastats inside a container, but some info are missing. Here is what I obtain when running on host:


10-30-2024 17:57:06 RAM 10526/15656MB (lfb 2x4MB) CPU [43%@1984,43%@1984,40%@1984,44%@1984,38%@1344,47%@1344,41%@1344,44%@1344] GR3D_FREQ 80% cv0@64.781C cpu@66.968C soc2@65.343C soc0@65.718C cv1@66.375C gpu@64.375C tj@67.093C soc1@67.093C cv2@64.968C VDD_IN 11826mW/11015mW VDD_CPU_GPU_CV 5440mW/4716mW VDD_SOC 2135mW/2128mW

And inside the container:


10-30-2024 17:57:06 RAM 10526/15656MB (lfb 2x4MB) CPU [40%@1574,42%@1574,42%@1574,44%@1574,45%@1984,48%@1984,39%@1984,42%@1984] EMC_FREQ 0%@2133 GR3D_FREQ 0%@[0] NVENC1 off NVDEC1 off APE 174 cv0@65C cpu@67.187C soc2@65.375C soc0@65.531C cv1@66.562C gpu@64.25C tj@67.187C soc1@66.937C cv2@64.937C VDD_IN 11984mW/11766mW VDD_CPU_GPU_CV 5598mW/5420mW VDD_SOC 2135mW/2135mW

I’m running the container as privileged and here are the volumes that I mount inside:

/usr/bin/jetson_clocks
/sys
/proc/meminfo
/proc/stat
/etc/localtime
/etc/nv_tegra_release

It just seems that there are missing volumes to mount, but can’t figure out which.

Thanks

Hi,

Could you help to point out which info is missing inside the container?
The logs that you shared with us seem to capture the same info.

Thanks.

My bad. I updated the output.

The EMC_FREQ & GR3D_FREQ are always 0 inside the container.

Hi,

GPU loading info is captured from the below node:

sys/devices/platform/bus@0/17000000.gpu/load

Could you try to mount the node to see if you can get the expected tegrastats output inside the container?

Thanks.

@AastaLLL I tried mounting the volume
I can see it inside, but tegrastats is still returning 0 values when inside the container

If you mount the /bin/ folder as a volume, you should be able to run tegrastats:

docker run -it --rm -v /bin:/bin your-image-name

@clarkca1 I’m actually able to run tegrastats, but data related to GR3D and EMC are set to 0, and do not correspond to the real values ( returned by tegrastats run on the host).

Hi,

We need to check it further to see what info is required to show GR3D_FREQ.
Will provide more info to you later.

Thanks.

Hi,

Sorry for the late update.
GPU status is available once the whole /sys node is mounted.

$ sudo docker run -it --rm --net=host --runtime nvidia -v /bin:/bin -v /sys:/sys -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix nvcr.io/nvidia/l4t-cuda:12.6.11-runtime
root@tegra-ubuntu:/# tegrastats 
...
12-19-2024 04:00:55 RAM 13420/62841MB (lfb 27x4MB) SWAP 0/31420MB (cached 0MB) CPU [0%@2201,100%@2201,0%@2201,0%@2201,0%@2201,0%@2201,0%@2201,0%@2201,0%@2201,0%@2201,0%@2201,0%@2201] EMC_FREQ 14%@3199 GR3D_FREQ 99%@[1276,1276] NVENC off NVDEC off NVJPG off NVJPG1 off VIC off OFA off NVDLA0 off NVDLA1 off PVA0_FREQ off APE 174 cpu@55.718C soc2@51.843C soc0@51.937C gpu@52.25C tj@55.718C soc1@50.25C VDD_GPU_SOC 18792mW/5552mW VDD_CPU_CV 2801mW/1627mW VIN_SYS_5V0 6360mW/3921mW
12-19-2024 04:00:56 RAM 13420/62841MB (lfb 27x4MB) SWAP 0/31420MB (cached 0MB) CPU [0%@2201,100%@2201,0%@2201,0%@2201,0%@2201,0%@2201,0%@2201,0%@2201,0%@2201,0%@2201,0%@2201,0%@2201] EMC_FREQ 15%@3199 GR3D_FREQ 99%@[1275,1275] NVENC off NVDEC off NVJPG off NVJPG1 off VIC off OFA off NVDLA0 off NVDLA1 off PVA0_FREQ off APE 174 cpu@55.75C soc2@52.218C soc0@52.156C gpu@52.406C tj@55.75C soc1@50.343C VDD_GPU_SOC 18792mW/5680mW VDD_CPU_CV 2800mW/1639mW VIN_SYS_5V0 6360mW/3945mW
...

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.