Analyzers
Support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
4657 Discussions

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

Tahir_S
Beginner
836 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
780 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/ana...

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

 

Regards,

 

Tahir_S
Beginner
764 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

RahulU_Intel
Moderator
718 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-inter...

 

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

 

RahulU_Intel
Moderator
678 Views

Hi,


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


Thanks


Tahir_S
Beginner
659 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

RahulU_Intel
Moderator
648 Views

Hi,


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


Thanks


Tahir_S
Beginner
639 Views

Hi

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

 

regards

Tahir

RahulU_Intel
Moderator
630 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


Reply