Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Oren_S_
Beginner
176 Views

Running remote target application with root permissions

Hi,

I'm using VTune Aplifier XE 2016 update 2. I installed a collector on an Ubuntu 12.04 Server machine and a full installation on an Ubuntu 12.04 Desktop machine. I successfully set up a password-less SSH from the host to the target.

The application I'm trying to run remotely requires root permission so I run it using sudo. I can locally run the application on the target machine by doing

sudo amplxe-cl <options> <target> <target options>

However, I don't seem to be able to run this application remotely using amplxe-gui, probably due to the root permissions. How can I configure the project in amplxe-gui to be able to do that?

Thanks,

  Oren

0 Kudos
4 Replies
David_A_Intel1
Employee
176 Views

Hi Oren:

If you create a script that includes the sudo command to run the app, e.g., sudo <target> <target options>, try configuring VTune Amplifier to launch the script.

Oren_S_
Beginner
176 Views

Thanks MrAnderson.

I did what you suggested and made sure the command I'm running doesn't require sudo password by editing /etc/sudoers. I verified that when I run the script it grants the application root privileges and doesn't ask for a password. However, when I locally run

amplxe-cl script

it complains that "sudo: must be setuid root". Any other suggestion?

Thanks,

  Oren

 

David_A_Intel1
Employee
176 Views

Sorry, no.  For purposes of profiling, is there any chance to run the process under your account?  I.e., how do you debug the app?

Also, when you set up the password-less SSH, did you set it up for 'root'?  Can you?

Peter_W_Intel
Employee
176 Views

@Oren S

1. If you run "sudo amplxe-cl <options> <target> <target options>", it meant that your remote machine ran application with "root" user.

2. If you run such as "amplxe-cl -target-system=ssh:peter@hsw-ep01 -c advanced-hotspots -knob collection-detail=stack-and-callcount -- /home/peter/primes.sh"

--primes.sh--

#!/bin/bash
source /opt/intel/compilers_and_libraries_2016/linux/bin/compilervars.sh intel64
/home/peter/problem_report/primes

----------------------------------------------------------------------------------------------------------

-rwx------ 1 root root 12264 12  9 17:02 primes
-rwxr-xr-x 1 root root   127 1  12 16:34 primes.sh

You can run primes.sh with noon-root user, but should run primes under root or sudo. So, if

"sudo /home/peter/problem_report/primes" ; changed in primes.sh

But environment cannot be inherited after doing "source..."  :-(

3. If your application is long run, simply manually launch application in the target, then -

> amplxe-cl -target-system=ssh:peter@hsw-ep01 -c advanced-hotspots -d 20

You can find hotspots after doing system-wide profiling

4. OR: ran "root" account directly.

# amplxe-cl -target-system=ssh:root@hsw-ep01 -c advanced-hotspots -knob collection-detail=stack-and-callcount -- /home/peter/problem_report/primes.sh  ; use root account on both

It seems there is a problem if you use "sudo" mode, in my view.