Can not use sudo ./tegrastats because accidentally delete this file

Hi,

I accidentally delete the ./tegrastats file on my TX2, so I can not use sudo ./tegrastats to profile some basic information about GPU when using the TX2. When I use “sudo ./tegrastats”, it just indicates: “sudo: ./tegrastats: command not found”. I don’t know how to solve this problem, how can I download the proper version of the tegrastats file.

When I enter: head -n 1 /etc/nv_tegra_release
It displays: # R28 (release), REVISION: 2.1, GCID: 11272647, BOARD: t186ref, EABI: aarch64, DATE: Thu May 17 07:29:06 UTC 2018

When I enter: cat /etc/lsb-release

The information is:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION=“Ubuntu 16.04.6 LTS”

Does anyone can tell me how to solve this problem? Thank you so much!

You can find it in the rootfs directory that was prepared on your host for flashing.
The exact path depends on JetPack version, but should be something like:

<where_you_installed_JetPack>/64_TX2/Linux_for_Tegra/rootfs/home/nvidia/tegrastats

once you have found the file at the Host PC, you may copy it to Jetson device and put it to its default location as:

/home/nvidia/tegrastats
/home/ubuntu/tegrastats

Moreover, if you have deleted it for nvidia user, you might haven’t deleted it for ubuntu user. And in case such user as ubuntu is represented in your system,you would be able to retrieve it from the latter user homefolder.