Visible to Intel only — GUID: GUID-8E84C2E8-A1A1-4AD6-9F9B-3DAA0B750674
Visible to Intel only — GUID: GUID-8E84C2E8-A1A1-4AD6-9F9B-3DAA0B750674
Collect Data on Remote Linux* Systems from Command Line
Intel® VTune™ Profiler enables you to collect data on a remote application from the host system (Remote Performance Analysis Workflow for Linux* Systems) via command line interface (vtune) and view the analysis result locally in the GUI. Remote data collection using the vtunecommand running on the host is similar to the native collection on the target except that the target-system option is added to the command line.
Prerequisites:
Intel® VTune™ Profiler is installed on the local host.
Target Linux* system is set up for remote analysis.
Depending on your remote system, you may choose to install the VTune Profiler remote target package or full command line interface (vtune).
A password-less SSH access to the target is set.
Recommended: an analysis target located on a shared drive visible to both local and remote machines.
If you plan to collect data remotely using the full-scale command line interface of the VTune Profiler installed on your target Linux system, see the topic Running Command Line Analysis. You may use the Command Line option in the VTune Profiler graphical interface to automatically generate a command line for an analysis configuration selected in the GUI. Make sure to edit the generated command line for remote collection as described in the Generating Command Line Configuration from GUI topic.
Use the following command line syntax to run the analysis on remote Linux system:
host>./vtune -target-system=ssh:user@target <-action> <analysis_type> [<-knob> [knobName=knobValue]] [-target-tmp-dir=PATH] [-target-install-dir=PATH][--] <target>
where
- -target-system=ssh:user@target is a remote Linux target
- <-action> is the action to perform the analysis (collect or collect-with)
- <analysis_type is the type of analysis
- <-knob> is a configuration option that modifies the analysis. For a list of available knobs, enter:
vtune -help <action> <analysis_type>
- [knobName=knobValue] is the name of specified knob and its value
- [-target-tmp-dir=PATH] is a path to the temporary directory on the remote system where performance results are temporarily stored
- [-target-install-dir=PATH] is a path to the VTune Profiler target package installed on the remote system
- <target> is the path and name of the application to analyze
Examples
Example 1: Event-based System-wide Sampling Collection
The command line below collects system-wide Hotspots analysis information without call stacks. This command automatically pulls in modules required for viewing results from the device and caches them in the temp directory on the host. This happens only on the first collection, all subsequent collections reuse modules from the cache.
host>./vtune -target-system=ssh:user1@172.16.254.1 –collect hotspots -knob sampling-mode=hw -duration 10
For system-wide collection, a lot of modules running in the system during collection are copied from the target to the host, which may take a while. However, this happens only once since vtune caches target system modules on the host for faster access on the next collection. If you do not want the command to take the modules from the device, you can specify a local directory where modules will be searched first, for example:
host>./vtune -target-system=ssh:user1@172.16.254.1 –collect hotspots -knob sampling-mode=hw -duration 10 -search-dir /search/path
In the case above, <PATH> can be either a directory where modules are located, or it can be a pointer to the root file system of the target device. For example, when the collector searches for the /usr/lib64/libstdc++.so.6.0.16 file from the target device, it first tries <PATH>/usr/lib64/libstdc++.so.6.0.16, then it tries <PATH>/libstdc++.so.6.0.16, and only after that it attempts to copy the file from the target device.
Example 2: Event-based Sampling Collection
This example shows hot to attach the analysis to a running application by its PID.
host>./vtune -target-system=ssh:user1@172.16.254.1 –collect hotspots -knob sampling-mode=hw -target-pid 333
Example 3: Advanced Event-based Sampling Collection
You can take any event supported by the Performance Monitoring Unit (PMU). Additionally, you can enable multiple event collection at a time.
The following example identifies potential latency or responsiveness issues:
host>./vtune -target=ssh:user1@172.16.254.1 -duration 10 -collect-with runsa -knob event-config='CPU_CLK_UNHALTED.REF:sa=20000'
This command line takes samples at ~2x the rate of a context switch, which gives you an approximately 20% performance hit.