"Tegra stats are disabled" will print all the time, when call tegrastats

if we call tegrastats, dmesg will print “Tegra stats are disabled”. our system monitor service need to call tegrastats periodically, how to avoid print this log.
echo Y | sudo tee /sys/kernel/debug/pva0/stats_enabled, this cmd can work.

is there any recommended method to avoid print “Tegra stats are disabled“?

Are you asking issue on Jetson Nano or Jetson Thor?

Here is the Jetson Nano forum.

sorry,it is jetson thor. so i create a new topic on jetson thor and delete this topic?

Moving to Jetson Thor forum.

Hi,

Do you run the tegrastats as a root?

Please try to run it as not root to cross check.

Thanks

yes, we run the tegrastats as root, because we need to sample many system info, not only tegrastats, we need to run as root.
i also tried run tegrastats as not root, do not print this log info.

so if we need to run as root, how can we avoid print this log info?

if not use sudo, tegrastats will miss some info, as below shows.

sudo tegrastats
09-10-2025 16:21:17 RAM 2819/125772MB (lfb 19x4MB) CPU [14%@972,0%@972,0%@972,2%@972,1%@972,6%@972,0%@972,0%@972,0%@972,1%@972,0%@972,0%@972,3%@972,0%@972] EMC_FREQ 0%@2750 GR3D_FREQ @[314,314,314] NVENC0_FREQ @314 NVENC1_FREQ @314 NVDEC0_FREQ @314 NVDEC1_FREQ @314 NVJPG0_FREQ @314 VIC off OFA_FREQ @314 PVA0_FREQ off APE 300 cpu@41.875C tj@42.437C iwlwifi_1@45C soc012@41.937C gpu@42.312C soc345@41C VDD_GPU 4982mW/4982mW VDD_CPU_SOC_MSS 6169mW/6169mW VIN_SYS_5V0 6437mW/6437mW

tegrastats
09-10-2025 16:21:24 RAM 2825/125772MB (lfb 19x4MB) CPU [15%@972,0%@972,3%@972,0%@972,0%@972,5%@972,0%@972,0%@972,0%@972,4%@972,0%@1566,0%@1566,0%@972,0%@972] cpu@41.875C tj@42.406C iwlwifi_1@44C soc012@41.906C gpu@42.406C soc345@41.062C VDD_GPU 5220mW/5220mW VDD_CPU_SOC_MSS 6169mW/6169mW VIN_SYS_5V0 6338mW/6338mW

hi, is there any update of this issue?
can i use this cmd to avoid print these logs.
”echo Y | sudo tee /sys/kernel/debug/pva0/stats_enabled”
i already tried this cmd, there is no different at tegrastats’s output, when input this cmd, or not input this cmd.

Hi,

Do you check the /sys/kernel/debug/pva0/stats_enabled value?
We verify the log not print when /sys/kernel/debug/pva0/stats_enabled is Y.

Thanks

the default value of stats_enabled is N, if we set stats_enabled as Y, it will not print the log, and the tegrastats output seems the same as stats_enabled as N.
is it ok to set stats_enabled as Y at the .bashrc? is there any different when set stats_enabled as Y and N?

Hi, is there any update of this issue? how can we avoid print this log. just set /sys/kernel/debug/pva0/stats_enabled as Y in the .bashrc?

I just tried following. ‘- - start’ says it runs in bg as a daemon.

sudo tegrastats --start                      # no log at all.
sudo tegrastats --start --logfile test.log   # if you want a log file.
sudo tegrastats --stop                       # then to stop.

Hi,
if /sys/kernel/debug/pva0/stats_enabled as N, sudo tegrastats --start will print “Tegra stats are disabled” all the time.
is that ok to set /sys/kernel/debug/pva0/stats_enabled as Y in the .bashrc?

I just looked in dmesg and kernel really does not seem to like tegrastats.

This might be better than .bashrc

# Service: writes Y once
sudo tee /etc/systemd/system/pva-stats.service >/dev/null <<'EOF'
[Unit]
Description=Enable PVA stats
RequiresMountsFor=/sys/kernel/debug
ConditionPathExists=/sys/kernel/debug/pva0/stats_enabled

[Service]
Type=oneshot
ExecStart=/bin/sh -c 'echo Y > /sys/kernel/debug/pva0/stats_enabled'
EOF

# Path unit: runs the service when the file appears
sudo tee /etc/systemd/system/pva-stats.path >/dev/null <<'EOF'
[Unit]
Description=Watch for PVA stats file and enable it

[Path]
PathExists=/sys/kernel/debug/pva0/stats_enabled

[Install]
WantedBy=multi-user.target
EOF

# Enable start it now.
sudo systemctl daemon-reload
sudo systemctl enable --now pva-stats.path

# check it now or after a reboot
systemctl status pva-stats.path
sudo cat /sys/kernel/debug/pva0/stats_enabled 

Hi,
thanks for your reply.
can you please explain why service is better than .bashrc?

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