Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4995 Discussions

How to launch an application in vtune as a NON root user

Tahir_S
Beginner
2,403 Views

-I am using vtune on windows machine and accessing a remote linux machine as a non root user.

-I have to invoke my process with sudo access.

-Tried to launch the application by giving "Application" as 'sudo' and 'Application parameters' as /home/temp_run.sh(This is the script which invokes the application that needs analysis.

-With this configuration I am getting error as could not instrument process. need execute and read access

-env variable /proc/sys/kernel/perf_event_paranoid is set to -1

- Kindly let me know how to run vtune analysis for the process that is running as a root level access and I am ssh'ed into the linux machine as a non root user.

Capture2.JPG

 

 

Labels (1)
0 Kudos
8 Replies
RahulU_Intel
Moderator
2,347 Views

Hi ,

 

Thank you for posting in Intel Forums. Can you try running the application as process and you can use the "Attach to Process" as Analyze target option. You can start your application separately with root privileges and once your application is running Provide the process name or PID and try the analysis.

 

For further details :

https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/set-up-project/analysis-target/analysis-target-options.html

Analyze Target OptionAnalyze Target OptionRemote Linux (SSH)Remote Linux (SSH)

 

Regards,

 

0 Kudos
Tahir_S
Beginner
2,331 Views

Thank you very much for your reply! 

  • I did try attaching to a already running process before posting, even that does not work.
  • If Process is running with root privilege, and vtune is non root. Collection fails.
  • if I try to get vtune analysis on some other Non root privilege process. vtune collects samples and provides analysis.
  • But in our case the process we are interested in always has to run with root privilege 
  • /proc/sys/kernel/perf_event_paranoid is set to -1

Collection_failed.JPG

0 Kudos
RahulU_Intel
Moderator
2,285 Views

Hi,

 

Thank you for your patience.

Could you please try the below steps :

1) Start your application on linux system

2) Try profiling the system where you are running the application using system wide profiling analysis type available with VTune profiler. Please find the below command :

 

vtune -collect hotspots -knob sampling-mode=hw --duration 60

 

Refer the link for more details: https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/command-line-interface/running-command-line-analysis/configuring-analysis-options-from-the-command-line/collecting-system-wide-data-from-the-command-line.html

 

3) Open the system profile result in VTune GUI, find the process ID for your application and you will get the analysis result for the application.

 

Also, we assume that you have sudo rights as the application needs root-permissions to run on the linux system and we would like to know why is it not possible to run VTune with root privileges or why you don't want to start VTune with root-privileges.

 

Hope this helps , let us know the updates.

 

Regards,

 

Rahul

 

0 Kudos
RahulU_Intel
Moderator
2,245 Views

Hi,


We haven't heard back from you. Could you please confirm if your issue is resolved.


Thanks


0 Kudos
Tahir_S
Beginner
2,226 Views

Hi,

Thank you for checking back.

I enabled root access to the machine on which the application was running and vtune is able to do analysis.

 

Thanks 

Tahir

0 Kudos
RahulU_Intel
Moderator
2,215 Views

Hi,


Glad to know that you issue is resolved. Could you please confirm whether we can discontinue monitoring this thread?


Thanks


0 Kudos
Tahir_S
Beginner
2,206 Views

Hi

Yes Sure, Thank you so much for all the support!

 

regards

Tahir

0 Kudos
RahulU_Intel
Moderator
2,197 Views

Hi,


Thanks for your confirmation. We no longer will be monitoring this thread. If you have any query you can post a new question.


Thanks


0 Kudos
Reply