I'm using Intel Vtune to profile a remote application that requires sudo access on another machine. I have been able to profile remote applications on that machine before that do not require sudo access, but Intel Vtune is not working for applications that require sudo access. I tried two different approaches:
This attempted solution didn't even run and gave me an error.
Vtune ran this attempt and did not return an error, but it didn't really work. When analyzing the results it ran for less than 1 second (the application is supposed to run for a few mins), and it didn't even capture enough data to give me any information. It obviously didn't run properly, but I didn't see any errors or warnings so I can't really tell what is going on.
Any ideas on how to properly run remote applications with sudo permissions in Vtune?
For your case you should be actually using sudo for the application and should be giving your actual application and parameters to it in the parameters field. Please find an attached image as example.
This is because you are passing your app to sudo executable which takes in your app as parameter and executes required action.
Your second example did not work as the bash file might have sudo dependencies and would work only if this is executed with sudo/root. A normal execution(by a normal user) might not even run the bash script.