Analyzers
Community support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
4963 Discussions

Unable to edit ptrace_scope to use VTune in Ubuntu

TryerGit
New Contributor I
1,450 Views

Hello,

 

On compiling and building an executable, I am trying to run VTune on this for hotspot analysis. I am unable to start hotspot analysis under User Mode Sampling option due to the following error:

 

"Cannot start data collection because the scope of ptrace system call is limited. To enable profiling, please set /proc/sys/kernel/yama/ptrace_scope to 0. To make this change permanent, set kernel.yama.ptrace_scope to 0 in /etc/sysctl.d/10-ptrace.conf and reboot the machine."

 

On trying to follow this advice, I navigated to the folder in question and issued:

 

:/proc/sys/kernel/yama$ sudo echo 0 > ptrace_scope
bash: ptrace_scope: Permission denied

but despite sudo, permission seems to be denied.

 

Is there a way to get around this so that I can use VTune in Linux?

 

Thank you.

0 Kudos
1 Solution
TryerGit
New Contributor I
1,409 Views
0 Kudos
2 Replies
TryerGit
New Contributor I
1,410 Views

I figured this out following the method suggested by the accepted answer below:

 

https://stackoverflow.com/questions/22120711/qt-creator-ptrace-operation-not-permitted-what-is-the-permanent-solution

0 Kudos
JyothisV_Intel
Moderator
1,404 Views

Hi,


Good day to you.


Thanks for posting in Intel Communities.


We hope your issue is resolved and thanks for sharing it with the community.


The same fix is mentioned in the official user guide. Refer: https://www.intel.com/content/www/us/en/develop/documentation/vtune-help/top/troubleshooting/error-ptrace-sys-call-scope-limited.html


Since, your initial query is resolved, we will be closing this thread. If you have any new queries, kindly post a new question since this thread will no longer be monitored by Intel.


Regards,

Jyothis V James



0 Kudos
Reply