Quantcast
Channel: Intel® VTune™ Profiler (Intel® VTune™ Amplifier)
Viewing all articles
Browse latest Browse all 1347

Difficulty profiling Linux daemon

$
0
0

I feel like this has probably been asked before but I was unable to find any post that addresses my questions.

I am attempting to profile a system daemon that I wrote on a Linux system (Ubuntu 14.04.5; 3.19 kernel) during its normal execution.  My daemon starts running as root but then de-escalates its privileges to a system account (i.e. a daemon or service account with no password or login ability).

When I attempt to run collection using amplxe-cl as root and attach to my daemon process I get this error message:

amplxe: Error: Data collection is interrupted because credentials of the target process and VTune Amplifier do not match. Please start both target process and VTune Amplifier with the credentials of the same user and try collecting data again.
amplxe: Collection failed.
amplxe: Internal Error

 

I can understand in other cases but if I'm running as root, why can't I profile any process that I want?  

Next I tried running amplxe-cl using sudo to run it as the same account that the daemon is running (let's say the username and group are "bob") like this:

sudo -u bob -g bob amplxe-cl -collect hotspots -r <some dir> --target-pid <some pid>

 

This appears to work, at least in that it doesn't fail and return an error immediately, but when I attempt to stop collection by hitting CTRL-C, nothing happens and the process hangs.  I then attempted to issue the "stop" from another terminal and got this error:

amplxe: Error: Cannot handle the given command due to an internal error.

amplxe: Internal Error

Is there any way to profile my daemon without making code changes or system configuration changes?

I'm running vTune 2016 update 4 if that matters.


Viewing all articles
Browse latest Browse all 1347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>