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

VTune manual remote command run parameters and local analysis ?

damato__joe
Beginner
1,780 Views

Greetings:

I am running VTune locally on my Apple laptop, attempting to analyze a remote system which runs Linux. However, due to system configuration and administration requirements within my company, I am unable to configure a remote Linux target via SSH for VTune.

Is there a way to determine the command line flags that the VTune GUI would have tried to run via SSH on the remote system? I would like to log into the remote Linux host and run that exact command manually, then download the resulting data on to my local workstation to analyze the results with the VTune GUI.

Ideally, I'd like to ask VTune on the remote host to attach to a specific PID (and all its child processes/threads), extract all the data that the GUI was expecting with my configuration settings, and then copy the resulting data that was collected to my local workstation.

Is this possible? Is there documentation explaining how to do this and how to import the results? It would be amazing if the VTune GUI had a display somewhere that said "Run this command on the remote host if you can't setup an SSH target: [command]"

Thanks!

0 Kudos
7 Replies
JananiC_Intel
Moderator
1,780 Views

Hi,

Thanks for reaching out.

You can get commands from Vtune GUI using a command line option.

To get commands for connecting the target via ssh you can follow the below steps

1)First in configure analysis page you can find a where pane .There you can find a drop down(dropdown.PNG in the attachment) from which you can select Arbitrary Host (arbitrary.PNG in the attachment)option.Then you can fill the necessary details like hardware platforn and OS.

2)Also if you want to attach a process to analyze ,you can click dropdown from what pane and select Attach to Process (process.PNG in the attachment)option then give the necessory details.

3)Finally you can get command line by clicking command line icon(cmd.PNG in the attachment) which is present on the bottom right of the page.After clicking the command line icon command line clipboard(command_clipboard.PNG in the attachment) will appear from where you can copy the command.

Have attached the necessary screenshots below for your reference.

Hope this helps!

0 Kudos
damato__joe
Beginner
1,780 Views

Hi:

 

I attempted to do that, but got the error message: "Cannot detect supported processor configurations."  When I click the "Hardware platform" dropdown, it is empty and nothing displays. I have attached a screenshot below.

 

Another question: I noticed while trying to run vtune on a remote system and passing in the PID of a process to attach to, it seems that vtune will attempt to drop its uid/gid to the uid/gid of the process it is attaching to before it runs perf. Is it possible to ask VTune _not_ to drop permissions? Asking because the uid/gid of the process it is tracing (which vtune seems to try to switch to) cannot run perf on my system.

 

Thanks.

 

Screen Shot 2020-05-19 at 6.21.39 PM.png

0 Kudos
JananiC_Intel
Moderator
1,780 Views

Hi,

Thanks for the update.

This might be due to Vtune version.Check your Vtune version,if you have an older version then you can go for an upgrade.

Check it out and let us know the update

0 Kudos
JananiC_Intel
Moderator
1,780 Views

Hi,

Could you please give us an update?

0 Kudos
damato__joe
Beginner
1,780 Views

Hi:

I ended up getting the command to run by reading a log file on another machine, but I ran into a new issue.

On my target Linux machine running kernel 4.9.200, Intel Sandybridge, logged in as root, I performed these actions to profile a C application:

 

1.) echo -1 > /proc/sys/kernel/perf_event_paranoid

2.) export AMPLXE_RUNTOOL_OPTIONS=--no-altstack

3.) mkdir /tmp/result-dir

4.) /tmp//vtune_profiler_2020.1.0.607630/bin64/amplxe-runss --result-dir /tmp/result-dir --option-file /tmp/VTUNE_GENERATED_OPTIONS_r000hs.opts

This command runs, but outputs the following error:

<?xml version="1.0" encoding="UTF-8"?>
<feedback>
 <state_changed state="11" data="1"/>
 <nop/>
 <state_changed state="1"/>
 <nop/>
 <state_changed state="2"/>
 <nop/>
 <message severity="error">[Instrumentation Engine]: Source/pin/injector_u/mainpin_unix.cpp: RunSecondaryThread: 2030: assertion failed: thd != NULL </message>
 <nop/>
 <state_changed state="9"/>
 <nop/>
 <state_changed state="8" data="2"/>
 <nop/>
</feedback>

 

The options specified in the VTUNE generated options file are the following:

--tmp-dir
/tmp/tmpyz3r5wz3
--ui-output-format
xml
--target-pid
123456
--stack-stitching
--data-limit-mb=1000
--disk-space-limit=0
--mrte-type=java,python
--itt-config=frame
--itt-config=task,event,counter
--stackwalk=offline
--mrte-mode=auto
--type=cpu:counters:nostack
--type=cpu:stack
--interval=10
--event-config=CPU_CLK_UNHALTED.THREAD,CPU_CLK_UNHALTED.REF_TSC:sample:sa=2900000,INST_RETIRED.ANY:sample:sa=2900000,CPU_CLK_UNHALTED.REF_XCLK,CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE,UOPS_RETIRED.RETIRE_SLOTS:sample:sa=2000003
--collector=perf
--count
--target-pid
123456

Let me know if there is any other information you would need to determine the issue triggering the assertion above.

0 Kudos
JananiC_Intel
Moderator
1,780 Views

Hi,

Thanks for the update.

Our team is looking into your issue ,regarding arbitrary host in Vtune GUI.Meanwhile you can try the command line,found in the below link

https://software.intel.com/content/www/us/en/develop/documentation/vtune-help/top/command-line-interface/command-syntax.html

0 Kudos
JananiC_Intel
Moderator
1,780 Views

Hi,

We are escalating the case to SME.

Thanks.

0 Kudos
Reply