Sudo: nsys: command not found

Hi, I was trying to use nsys profile with superuser, but when I use sudo nsys profile, sudo: nsys: command not found returned as an error. While everything goes well without superuser.

Can anyone help to answer what can I do to solve the problem? Thanks!

I solved this by adding env variables of nvcc.

Hello,
Thanks for using Nsight Systems and thanks for your reply of letting us know that you resolved your issue. By the way I’m going to transfer your topic over to the Nsight Systems Forum to ensure it is under the right category.
Regards,

It seems like the nsys command is not recognized when using sudo, which could be due to the PATH environment variable not including the directory where nsys is located.

You have a few options to solve this issue:

  1. Specify the Full Path: Instead of just running nsys, specify the full path to the nsys executable. For example:

    sudo /path/to/nsys profile
    
  2. Update the PATH Variable: You can update the PATH variable in your sudo environment to include the directory where nsys is located. This can be done by modifying the /etc/sudoers file, but this should be done with caution as it involves system-wide configuration changes.

  3. Create a Symbolic Link: Create a symbolic link to the nsys executable in a directory that is included in the sudo PATH. For example:

    sudo ln -s /path/to/nsys /usr/local/bin/nsys
    

    Replace /usr/local/bin/nsys with any directory that is included in the sudo PATH.

  4. Check Installation: Double-check that nsys is properly installed and accessible to all users, including root/superuser. If not, reinstall nsys ensuring it’s installed system-wide.

Choose the method that best fits your requirements and system configuration.

1 Like

Thanks for your reply. That helps a lot !

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