Remote data collection is the ability to:
Collect data on one machine (the Remote Agent system)
Configure collection and view the data on another machine (the controlling system)
The VTune™ Performance Environment enables you to launch applications and perform data collection on Remote Agent systems. The Remote Agent system only needs a small subset of the VTune™ Performance Environment product files. You can perform data collection on a number of Remote Agent systems, each running a different supported operating system.
For remote data collection, two systems are required:
Client system running on a Microsoft* Windows* operating system, which configures and manages Activities, and displays data collection results
Server system running on a Linux* operating system, the Remote Agent, which handles the remote data collectors and sends the results to the client system for display
The following scheme shows the relationship between the components on these systems:
Windows* <-+-> ittserver <---> collector1.so ... . . collectorN.so
Client in VTune™| server data collectors
Performance Environment |
|
|
<-- Windows* --> | <------------------ Linux ---------------------->
The Remote Data Collection Server ittserver is a shared component of Intel® Thread Checker and Intel® Thread Profiler. Before starting the remote data collection server, configure your Linux* system properly. See product Release Notes for configuration requirements.
Remote data collection procedure as shown above follows the steps below.
At startup,
ittserver initializes all its data collectors and begins listening for requests on a specified IP port 50002.
The Windows* client sends a message to the server and waits for reply.
The server dispatches that message to the remote collector and then continues listening for more requests from the Windows* client.
After finishing the current Activity run the collector notifies the server, which in turn notifies the Windows* client. If requested, the server also sends data resulting from the task back to the Windows* client. The Windows* client displays the resulting data for your analysis.
Each collector has its own set of requirements. If a collector's requirements are not met, or if an error occurred during a collector's initialization, then the server may continue to run, but access to the collector is disabled.
Thread Checker remote data collection works in the following way:
In the Thread Checker on Windows*, specify the Linux* application on which to perform Thread Checker remote data collection, the desired Thread Checker instrumentation level, and other configuration options.
Thread Checker on Windows* forwards the information to the Thread Checker remote data collector running on the Linux* system.
The Thread Checker remote data collector instruments the application and all libraries used by the application on the Linux* system. The instrumentation produces a new set of binaries representing the instrumented application and places them in the Thread Checker remote collector cache directory.
The instrumented application is run. During its execution, Thread Checker data is collected.
Upon successful completion, data generated during the Thread Checker remote data collection is transferred to the Thread Checker on Windows* for you to view and analyze.
In Thread Checker for Windows*, click the red stop button.
If that fails, kill the application process manually using the command kill -9 <PID>.
WARNING
If you interrupt data collection, Thread Checker might not display complete Activity results.
In your Windows* terminal, consider the screen where
ittserver was running. You may have pressed Ctrl-S or clicked a mouse to select another mode in the Windows* terminal.
Make sure that the
ittserver is not suspended: press Ctrl-Q or ESC.
TIP
Avoid suspending
ittserver
output. Doing so can cause the application to hang until you restore normal
ittserver
output.
One of the methods to stop a running application is to send a special signal to the processes of the application. The default signal is SIGUSR2, but if this signal is already used by the application, specify an alternative signal number, which can be handled by applications in the __Bistro_Exit_Signal__ environment variable. Signal numbers may be found in <bits/signum.h> standard header file.
Two potentially different directories are used on the Linux* system to store temporary data.
Thread Checker remote data collector cache directory. The default location is
/tmp/tc_<windows_login>_cache.
You can change the default in the Thread Checker on Windows*,
Configure->Options->Intel® Thread Checker->Collector->Cache Directories.
ittserver data directory. The default locations are
<current directory>/.bistro_server and
<current directory>/.bistro_temp.
NOTE
Both directories must be world writable.
No. Currently, the Thread Checker remote data collector ignores the duration setting.
You can pass environment variables to an application on Linux* in one of the following ways:
Before starting ittserver
Set any environment variables required by the application.
Start
ittserver.
Before launching an application
In Thread Checker for Windows*, go to the Advanced Activity Configuration dialog box and under Application/Module Profiles, select the application and then click Configure. The General dialog box appears.
Click Advanced, deselect Use default environment, and enter environment variables in the form "VARIABLE=value" (for example, "FOO=3").
Click OK to save your settings.
Create a shell script
Write a shell script that sets the variables and runs the application.
In Thread Checker on Windows*, configure your Activity by specifying your shell script as the application to launch and define an executable name as the module of interest.
NOTE
If you set an environment variable that is intended to change default paths for dynamically linked libraries, such as LD_LIBRARY_PATH or LD_ASSUME_KERNEL, you must do so before starting ittserver.
Verify that the following conditions are met to launch a Linux* application:
Application is in a location that is accessible to a user launching
ittserver.
Application is executable by a user launching
ittserver
Application is not a command-line application that expects interactive user input.
ittserver as root, but ittserver has problems accessing files. Why is that?If the files are located on a networked file system (for example, through NFS*, AFS*, or Samba*), then restrictions may exist on root access to those files or directories containing those files. Check with your system administrator for details.
NOTE
It is highly recommended that ittserver be run as a non-root user. If multiple users need to use ittserver, then add those users to a special group and make sure that the relevant files and directories can be accessed by members of the group. Then run ittserver as one of the non-root members of the group.
Currently, the matching of Thread Checker data to source is done in Thread Checker on the Windows* side. When Thread Checker encounters a reference to a Linux* source file for the first time, it prompts you for the location of where to retrieve the file. Retrieve the file in one of the following ways:
Manually copy it from Linux* to Windows*. The file location must follow the Windows* filename syntax, for example,
DRIVE:\path\to\sourceFile.
Export the remote Linux* file system through NFS*, AFS*, Samba*, or similar. The file location must follow the appropriate Windows* filename syntax, for example,
\\linuxMachineName\path\to\sourceFile if not mapped to a
DRIVE: <letter>, or
DRIVE:\path\to\sourceFile contact your system administrator for details.
Once Thread Checker matches the source against Thread Checker data, the tool caches the source location. Subsequent use of the same source will re-use the cached location. If Thread Checker detects that the binary has changed, or if the cached source location for that binary has been cleared, then the Thread Checker again prompts you for the location of where to retrieve the source file.
NOTE
The source location cache can be cleared by going to the Configure->Options->Directories->File Association dialog box in the VTune™ Environment on Windows*.
No. Currently, only one application may have a Thread Checker remote data collection session. This single application must be specified inside the application in the module of interest field in the Application/Module Profile Configuration dialog box.
No. Currently, multiple users on a Linux* system cannot perform Thread Checker remote data collection at the same time. Users must coordinate their Thread Checker remote data collection sessions at different (non-overlapping) times on the same Linux* system.
-tcheck switch?The following are known issues and recommended solutions related to using the Intel® Compiler the -tcheck switch:
While building with the
-tcheck switch and during the linkage phase of my compilation, I get messages such as "Undefined reference to local symbols in discarded section .gnu.linkonce.t".
The solution to this linkage failure is to install the Intel® Compiler package as recommended in the Release Notes. With this compiler, you also need to use the linker option
-ltcdata. This option includes a linker script into the build to combine all of the "Implicit Program Database Mode" (the default) information, so that the information from all of the object files is available in the final build executable or library:
% icc -tcheck foo.c -ltcdata
I can compile my application with
-tcheck and run the instrumented application, but I do not see any symbolic information when I view the Activity result file on Windows* with Thread Checker.
The problem may be the use of inline-assembler in the compiled code. This inline-assembler may come from a system header file or might have been found in the application source code.
When the GNU* gcc library compatibility mode is enabled, system header files include inline assembly code. To disable the mode, switch to the Intel® Compiler library compatibility mode as follows:
% icc -ccxlib-icc -tcheck foo.c -ltcdata
If you still do not see the line numbers and functions names in the Thread Checker diagnostics view on your Windows* system, you may still be using inline assembler. To get symbolic information in the presence of in-line assembly code, try one of the following:
o Switch from source instrumentation to binary instrumentation.
o Switch from the default Implicit Program Database Mode to the Explicit Program Database Mode.
I can compile the application with the
-tcheck
option, but I get linkage failures indicated by error messages such as "relocation truncated to fit: PCREL21B".
The problem is that the instrumented object files are larger than the system limit (typically 16MB). To work around this limitation, switch to the Explicit Program Database Mode. In this mode, the symbolic information is stored in a separate external database directory and does not count against the size limit of the object files.
To analyze an application using Explicit Program Database Mode, do the following:
Note
All of the following examples are for the Intel® C++ Compiler for Linux*. You can also use this mode with the Intel® Fortran Compiler for Linux*.
Compile the application with the
tcheck_pname=<database directory
name> switch:
icc -c example.c -tcheck_pname=/home/user/work/db
The compiler creates a directory named db.prj
that contains a database with the symbol information for the program. The
.prj suffix is added automatically. Specify the project directory by a full path, so that if a build script changes the current directory, all the project data still appears in the same database.
Link the application with the -tcheck switch:
icc example.o -tcheck
If the program is compiled and linked in one step, both options must be specified:
icc example.c
-tcheck_pname=/home/user/work/db -o example
Run the application on the Linux* machine. The result
is a .thr file, which by default has the
same name as the database directory. In the example above, the result is
db.thr.
You can change the name using the
TC_OPTIONS environment variable.
Ensure that the source code and the results of the compile, link, and run are available to the Thread Checker client application. They can reside on a network-mountable disk, or you can copy them to the client machine.
Before running Thread Checker on the client machine, you must set the environment variable ITT_SHOW_BACKUP_DATABASE=T. Make sure that you set this variable via the Control Panel* (not with a DOS* shell).
Run Thread Checker on the client machine. From the File menu, choose Open File.
Choose the Thread Checker output file (db.thr in the example above).
The Supply Information for Imported THR file dialog box appears.
Check Use program database directory, and specify the location of the database directory (db.prj in the example above)
Thread Checker displays the diagnostic results of the program run. If Thread Checker cannot find the source files used in the run, then you need to specify the location of each file in the directory reachable from the client machine (either network-mounted or the location the files were copied to).
Information in this document is provided in connection with Intel products. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER, AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS, INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. Intel products are not intended for use in medical, life saving, or life sustaining applications.
This FAQ document for Thread Checker, and the software described herein, is furnished under license and may only be used or copied in accordance with the terms of the license. The information in this document is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Intel Corporation. Intel Corporation assumes no responsibility or liability for any errors or inaccuracies that may appear in this document or any software that may be provided in association with this document.
Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them.
Intel SpeedStep, Celeron, Dialogic, i386, i486, iCOMP, Intel, the Intel logo, Intel386, Intel486, Intel740, IntelDX2, IntelDX4, IntelSX2, Intel Inside, the Intel Inside logo, Intel NetBurst, Intel NetStructure, Intel Xeon, Intel XScale, Itanium, MMX, MMX logo, Pentium, Pentium II Xeon, Pentium III Xeon, and VTune are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.
Copyright © 2000 - 2006, Intel Corporation, All Rights Reserved.
* Other names and brands may be claimed as the property of others.