Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 63264 Details for
Bug 159817
(Doc)Need to adjust docs for the Linux IA32 platform to use the new AC version
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Includes Navid's suggested changes.
getting_started.html (text/html), 15.84 KB, created by
jkubasta
on 2007-04-09 11:12:27 EDT
(
hide
)
Description:
Includes Navid's suggested changes.
Filename:
MIME Type:
Creator:
jkubasta
Created:
2007-04-09 11:12:27 EDT
Size:
15.84 KB
patch
obsolete
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> ><html> ><head> ><!-- >/********************************************************************** > * Copyright (c) 2005 - 2007 Intel Corporation. > * All rights reserved. This content is made available under > * the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at > * http://www.eclipse.org/legal/epl-v10.html > * $Id$ > * > * Contributors: > * Intel - Initial contribution > **********************************************************************/ > --> > <style type="text/css"></style> > <meta http-equiv="Content-Type" > content="text/html; charset=iso-8859-1"> > <style type="text/css"></style> ><title>Getting Started with Agent Controller - Linux</title> ></head> ><body> ><h1><strong>Getting Started with Agent Controller - Linux</strong></h1> ><h3>Contents</h3> ><p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> ><a href="#Prerequisites">Prerequisites</a></p> ><p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> ><a href="#Notation">Notation</a></p> ><p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> ><a href="#Installation">Installing Agent Controller</a></p> ><p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> ><a href="#Setting_Up_Agent_Controller">Setting Up Agent Controller</a></p> ><p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> ><a href="#Configure_Agent_Controller">Configuring Agent Controller</a></p> ><p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> ><a href="#Start_Agent_Controller">Starting Agent Controller</a></p> ><p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> ><a href="#Stop_Agent_Controller">Stopping Agent Controller</a></p> ><p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> ><a href="#queryversion">Querying Agent Controller version information</a></p> ><p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> ><a href="#Checking_Agent_Controller_Installation">Checking Agent Controller Installation</a></p> ><p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> ><a href="#serverlog">Server Logging</a></p> ><p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> ><a href="#javaprof">Running the Java Profiler</a></p> ><p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> ><a href="#Invocation_from_the_Eclipse_Workbench">Invocation from the Eclipse >Workbench</a></p> ><p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> ><a href="#Invocation_of_the_Java_Profiler_from_the_Command_Line">Invocation of >the Java Profiler from the Command Line</a></p> ><p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> ><a href="#uninstall">Uninstalling Agent Controller</a></p> ><h2><a name="Prerequisites">Prerequisites</a></h2> ><ul> > <li>Install the Java runtime (JRE) or Java development kit (JDK) 1.5 or 1.4.x<br> > </li> > <li>Remove or <a href="#uninstall">uninstall</a> all prior versions of Agent > Controller.</li> > <li>The Agent Controller is compiled using <tt>libstdc++-libc6.2-2.so.3</tt> >shared library. >Ensure that this shared library exists under the <tt>/usr/lib</tt> >directory. If it does not exist, you have to install the >RPM package <tt>compat-libstdc++</tt> that comes with the operating >system installation media.</li> ></ul> ><h3><a name="Notation">Notation</a></h3> ><p><<tt>install-dir</tt>> = The absolute directory path where the Agent >Controller has been unzipped. For example: <tt>/opt/tptpAC</tt></p> ><h3><a name="Installation">Installing Agent Controller</a></h3> ><p>Download one of the Linux Agent Controller Runtime packages from the TPTP >Download page. Install it by simply creating a directory and unzipping the >package contents into that directory.</p> ><h2><a name="Setting_Up_Agent_Controller">Setting Up Agent Controller</a></h2> ><p>After a normal installation, you still need to configure the Agent Controller >before you can start it. </p> ><h3><a name="Configure_Agent_Controller">Configuring Agent Controller</a></h3> ><ol> > <li>Ensure that the files in the <tt><install-dir>/bin</tt> and <tt><install-dir>/lib</tt> >directory are executable.</li> > <li>Run <tt>SetConfig.sh</tt> script from a command shell in the <tt> > <install-dir>/bin</tt> > directory to generate the configuration file for the Agent Controller. > The script requires that a Java Virtual Machine (JVM) be present in the PATH > environment variable. Follow the prompts and enter the required > parameters as appropriate. The configuration file <tt> > <install-dir>/config/serviceconfig.xml</tt> > will be generated based on your inputs.<br> > </li> > <li>Add <tt><install-dir>/bin</tt> directory to the PATH environment variable.</li> > <li>Add <tt><install-dir>/</tt>lib directory to the LD_LIBRARY_PATH > environment variable.</li> ></ol> ><p>If you want to make changes to the configuration file that was generated in >step 1, you may run the <tt>SetConfig.sh</tt> script again or you may manually >edit the file according to the rules outlined in the document ><a href="http://help.eclipse.org/help32/topic/org.eclipse.tptp.platform.agentcontroller.doc.user/ref/ac/r_config_ovw.html"> >Agent Controller configuration files</a>. The Agent Controller must be restarted >for the changes to take effect.</p> ><h3><a name="Start_Agent_Controller">Starting Agent Controller</a></h3> ><p>Start the Agent Controller by changing your working directory to <tt> ><install-dir>/bin</tt> and running <tt>RAStart.sh</tt>.</p> ><h3><a name="Stop_Agent_Controller">Stopping Agent Controller</a></h3> ><p>Stop the Agent Controller by changing your working directory to <tt> ><install-dir>/bin</tt> and running <tt>RAStop.sh</tt>.</p> > <h2><a name="queryversion"></a>Querying Agent Controller Version Information</h2> ><p>To display the version of Agent Controller, change your working directory to <install-dir>/bin in a command shell and run the following command:</p> ><blockquote> > <p><tt>ACServer -v</tt><br> or<br><tt>ACServer -version</tt></p> ></blockquote> ><p>The Agent Controller will display its version and terminate.</p> ><h2><a name="Checking_Agent_Controller_Installation"></a>Checking Agent Controller Installation</h2> > ><p>If desired, you can verify proper operation of your Agent Controller >installation by executing the SampleClient application provided with the runtime >package.</p> ><p>Perform the following steps:</p> ><ol> > <li><a href="#Start_Agent_Controller">Start the Agent Controller</a>.</li> > <li>Open a command prompt > window</li> > <li>Go to the > <tt><install-dir>/bin</tt> > directory</li> > <li>Enter the following at the > command prompt:<br><br> <tt>SampleClient</tt><br> </li> > <li>Observe the console output > for SampleClient. It should be similar to the following example:</li> ></ol> ><blockquote> > <p><tt>------------------- SampleClient Console Output >--------------------------------<br><br>Connected to the Agent Controller on "localhost" at port number #####<br> > <br>The Time Collector Agent ID: ###<br><br>Established a data channel with the agent.<br> > <br>Sending 5 Hello messages over data channel to TimeCollector ...<br><br>Start the TimeCollector ...<br> > <br>Incoming data: Hello from Time Collector Agent - Count 0<br><br>Incoming data: Hello from Time Collector Agent - Count 1<br> > <br>Incoming data: Hello from Time Collector Agent - Count 2<br><br>Incoming data: Hello from Time Collector Agent - Count 3<br> > <br>Incoming data: Hello from Time Collector Agent - Count 4<br><br><br>Stop the TimeCollector ...<br> > <br>Incoming data: Hello from Time Collector Agent - Count 5<br><br>Incoming data: Hello from Time Collector Agent - Count 6<br> > <br>Incoming data: Hello from Time Collector Agent - Count 7<br><br>Incoming data: Hello from Time Collector Agent - Count 8<br> > <br>Incoming data: Hello from Time Collector Agent - Count 9<br><br>Incoming data: Hello from Time Collector Agent - Count 10<br> > <br>All finished<br>Press any key to exit...</tt></p> ></blockquote> ><p><b>Note:</b> The above port number and Agent ID values will typically be >10006 and 103 respectively, depending on Agent Controller configuration settings >and the number of times that the SampleClient application runs.</p> ><p>Refer to the Agent Controller build <tt> >readme.txt</tt> file for detailed information on the SampleClient >functionality. </p> ><h2><a name="serverlog"></a>Server Logging</h2> >All server log entries will be placed in ><tt><install-dir>/config/servicelog.log</tt> >. > ><h2><a name="javaprof"></a>Running the Java Profiler</h2> ><p>The Java Profiler consists of a Profiling Agent packaged as a library. >This profiling agent is started by the JVM when the JVM is started with the <tt> >-Xrun</tt> >option described below. The profiling agent interacts with the JVM to >capture and record the Java application's behavior. The output from the >profiling agent is in the form of XML fragments. The format of this >fragment is described in this document titled "<a > href="http://www.eclipse.org/tptp/platform/documents/resources/profilingspec/XML4Profiling.htm">Event >Specification for the Java Profiler</a>".<br> ></p> ><p>You can profile a Java application by using the Eclipse workbench or manually >by invoking the profiler from the command line.<br> ></p> ><h3><a name="Invocation_from_the_Eclipse_Workbench">Invocation from the Eclipse >Workbench</a></h3> ><p>The Java Profiler can be launched from the Eclipse workbench. From the >Profiling and Logging Perspective of the Eclipse workbench you can launch >applications using the <b>Run > Profile</b> menu or the toolbar button. A >wizard will come up. Simply follow the wizard to profile an application. >Applications in the current Eclipse workbench's workspace, or external Java applications located >in the file system, can be launched and profiled.</p> ><h3><a name="Invocation_of_the_Java_Profiler_from_the_Command_Line">Invocation >of the Java Profiler from the Command Line</a></h3> ><p>Note that another step in <a href="#Start_Agent_Controller">Starting Agent >Controller</a> is required for invoking the Java Profiler from the command line. >The Java Profiler is invoked from a command line using the <tt> >-Xrun</tt> >JVM option as follows:</p> ><pre> -XrunpiAgent[:agent_parm[,agent_parm]*]<br></pre> >where <tt>agent_parm</tt> may be: ><p></p> ><ul> > <li>server=[standalone | enabled | controlled | applicationControlled] > <dl> > <dt>standalone</dt> > <dd>The Java Profiler is manually attached to a JVM instance and generates > a stand-alone trace to a specified file based on the options and filters > given on the command line. When this option is selected, the Java > Profiler produces the enclosing traceRoot element to form a complete and > valid XML document.</dd> > <dt>enabled</dt> > <dd>The Java Profiler is loaded, allows the application to run normally, > but produces no trace until a Eclipse workbench attaches to the agent to > give it instructions. When this option is selected, the Java Profiler > only produces XML fragments instead of a complete XML document.</dd> > <dt>controlled</dt> > <dd>The Java Profiler is loaded, and the application is blocked from > running until a client gives it instructions to continue. When this > option is selected, the Java Profiler only produces XML fragments > instead of a complete XML document.</dd> > <dt>applicationControlled</dt> > <dd>Profiling operations are controlled by the TPTP "Profiler" java class. > The pluginconfig.xml file must be modified to use this mode. The > pluginconfig.xml is located in the following directory: > <pre><install-dir>/plugins/org.eclipse.tptp.platform.collection.framework_<version>/config/pluginconfig.xml</pre> > The following modification is required: > <pre><Agent client="DYNAMIC" configuration="default" dataChannelSize="64M" name="Java Profiling Agent" type="Profiler"/></pre> > should be modified to > <pre><Agent client="HEADLESS" configuration="default" dataChannelSize="64M" name="Java Profiling Agent" type="Profiler" logFile="<some_dir>/profile.trcxml"/></pre> > Note that the Agent client attribute has been changed to "HEADLESS" and > that the "logFile" attribute has been added.<br> > The hcframe.jar file should also be included in the user's class path > when profiling an application under this mode. For example: > <pre> java -XrunpiAgent:server=applicationControlled -classpath .:<install-dir>/plugins/org.eclipse.tptp.platform.collection.framework_<version>/hcframe.jar TestClass</pre> > </dd> > </dl> > </li> > <li>filters=filename</li> ></ul> ><blockquote> ><blockquote> > <p><b>Note</b>: This parameter is only used when server=standalone is > specified.</p> ></blockquote> > <p>Specifies the name of the file that contains the initial class filter > definitions to be used during the trace. The default is filters.txt in the > current directory. </p> > <p>The format of the file is as follows: </p> ></blockquote> ><pre> <classpattern> <methodpattern> <mode> where:<br></pre> ><blockquote> > <dl> > <dt>classpattern</dt> > <dd>is a string with no embedded blanks. The string may contain a single > "*" either at the beginning of the string or at the end of the string. > The "*" will match zero or more characters, thus making the pattern a > generic prefix or suffix pattern. A single "*" can also be specified to > represent all strings.</dd> > <dt>methodpattern</dt> > <dd>is a string with no embedded blanks. The string may contain a single > "*" either at the beginning of the string or at the end of the string. > The "*" will match zero or more characters, thus making the pattern a > generic prefix or suffix pattern. A single "*" can also be specified to > represent all strings.</dd> > <dt>mode</dt> > <dd>is one of INCLUDE or EXCLUDE. Filter patterns are processed in the > order that they are specified until the first pattern match succeeds. If > the class name does not match any of the specified filter patterns, the > default is to INCLUDE the class.</dd> > </dl> ></blockquote> ><ul> > <li>file=filename<br> ><blockquote> > <p><b>Note</b>: This parameter is only used when server=standalone is > specified.</p> ></blockquote> > Specifies the name of a file where the trace will be written. The default is <tt> > trace.trcxml</tt> in the current directory.</li> ></ul> ><ul> > <li>help<br> > Displays a list of available agent options to standard out.</li> ></ul> ><h2><a name="uninstall">Uninstalling Agent Controller</a></h2> ><p>To uninstall the agent controller:</p> ><ol> > <li><a href="#Stop_Agent_Controller">Stop</a> the agent controller: > </li> > <li>Remove the <samp><install-dir></samp>.</li> > <li>Remove the <tt><install-dir>/bin</tt> directory from the PATH environment > variable, if necessary.</li> > <li>Remove the <tt><install-dir>/lib</tt> directory from the LD_LIBRARY_PATH > environment variable, if necessary.<br></li> ></ol> ><div class="runningfooter"><p><span style="font-size: 7pt;">Copyright (C) > 2006-2007 Intel Corporation. </span> > </p> ></div> > ></body> ></html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> <!-- /********************************************************************** * Copyright (c) 2005 - 2007 Intel Corporation. * All rights reserved. This content is made available under * the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * $Id$ * * Contributors: * Intel - Initial contribution **********************************************************************/ --> <style type="text/css"></style> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"></style> <title>Getting Started with Agent Controller - Linux</title> </head> <body> <h1><strong>Getting Started with Agent Controller - Linux</strong></h1> <h3>Contents</h3> <p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> <a href="#Prerequisites">Prerequisites</a></p> <p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> <a href="#Notation">Notation</a></p> <p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> <a href="#Installation">Installing Agent Controller</a></p> <p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> <a href="#Setting_Up_Agent_Controller">Setting Up Agent Controller</a></p> <p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> <a href="#Configure_Agent_Controller">Configuring Agent Controller</a></p> <p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> <a href="#Start_Agent_Controller">Starting Agent Controller</a></p> <p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> <a href="#Stop_Agent_Controller">Stopping Agent Controller</a></p> <p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> <a href="#queryversion">Querying Agent Controller version information</a></p> <p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> <a href="#Checking_Agent_Controller_Installation">Checking Agent Controller Installation</a></p> <p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> <a href="#serverlog">Server Logging</a></p> <p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> <a href="#javaprof">Running the Java Profiler</a></p> <p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> <a href="#Invocation_from_the_Eclipse_Workbench">Invocation from the Eclipse Workbench</a></p> <p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> <a href="#Invocation_of_the_Java_Profiler_from_the_Command_Line">Invocation of the Java Profiler from the Command Line</a></p> <p align="left" style="margin-left: 20px; margin-top: 0px; margin-bottom: 0px"> <a href="#uninstall">Uninstalling Agent Controller</a></p> <h2><a name="Prerequisites">Prerequisites</a></h2> <ul> <li>Install the Java runtime (JRE) or Java development kit (JDK) 1.5 or 1.4.x<br> </li> <li>Remove or <a href="#uninstall">uninstall</a> all prior versions of Agent Controller.</li> <li>The Agent Controller is compiled using <tt>libstdc++-libc6.2-2.so.3</tt> shared library. Ensure that this shared library exists under the <tt>/usr/lib</tt> directory. If it does not exist, you have to install the RPM package <tt>compat-libstdc++</tt> that comes with the operating system installation media.</li> </ul> <h3><a name="Notation">Notation</a></h3> <p><<tt>install-dir</tt>> = The absolute directory path where the Agent Controller has been unzipped. For example: <tt>/opt/tptpAC</tt></p> <h3><a name="Installation">Installing Agent Controller</a></h3> <p>Download one of the Linux Agent Controller Runtime packages from the TPTP Download page. Install it by simply creating a directory and unzipping the package contents into that directory.</p> <h2><a name="Setting_Up_Agent_Controller">Setting Up Agent Controller</a></h2> <p>After a normal installation, you still need to configure the Agent Controller before you can start it. </p> <h3><a name="Configure_Agent_Controller">Configuring Agent Controller</a></h3> <ol> <li>Ensure that the files in the <tt><install-dir>/bin</tt> and <tt><install-dir>/lib</tt> directory are executable.</li> <li>Run <tt>SetConfig.sh</tt> script from a command shell in the <tt> <install-dir>/bin</tt> directory to generate the configuration file for the Agent Controller. The script requires that a Java Virtual Machine (JVM) be present in the PATH environment variable. Follow the prompts and enter the required parameters as appropriate. The configuration file <tt> <install-dir>/config/serviceconfig.xml</tt> will be generated based on your inputs.<br> </li> <li>Add <tt><install-dir>/bin</tt> directory to the PATH environment variable.</li> <li>Add <tt><install-dir>/</tt>lib directory to the LD_LIBRARY_PATH environment variable.</li> </ol> <p>If you want to make changes to the configuration file that was generated in step 1, you may run the <tt>SetConfig.sh</tt> script again or you may manually edit the file according to the rules outlined in the document <a href="http://help.eclipse.org/help32/topic/org.eclipse.tptp.platform.agentcontroller.doc.user/ref/ac/r_config_ovw.html"> Agent Controller configuration files</a>. The Agent Controller must be restarted for the changes to take effect.</p> <h3><a name="Start_Agent_Controller">Starting Agent Controller</a></h3> <p>Start the Agent Controller by changing your working directory to <tt> <install-dir>/bin</tt> and running <tt>RAStart.sh</tt>.</p> <h3><a name="Stop_Agent_Controller">Stopping Agent Controller</a></h3> <p>Stop the Agent Controller by changing your working directory to <tt> <install-dir>/bin</tt> and running <tt>RAStop.sh</tt>.</p> <h2><a name="queryversion"></a>Querying Agent Controller Version Information</h2> <p>To display the version of Agent Controller, change your working directory to <install-dir>/bin in a command shell and run the following command:</p> <blockquote> <p><tt>ACServer -v</tt><br> or<br><tt>ACServer -version</tt></p> </blockquote> <p>The Agent Controller will display its version and terminate.</p> <h2><a name="Checking_Agent_Controller_Installation"></a>Checking Agent Controller Installation</h2> <p>If desired, you can verify proper operation of your Agent Controller installation by executing the SampleClient application provided with the runtime package.</p> <p>Perform the following steps:</p> <ol> <li><a href="#Start_Agent_Controller">Start the Agent Controller</a>.</li> <li>Open a command prompt window</li> <li>Go to the <tt><install-dir>/bin</tt> directory</li> <li>Enter the following at the command prompt:<br><br> <tt>SampleClient</tt><br> </li> <li>Observe the console output for SampleClient. It should be similar to the following example:</li> </ol> <blockquote> <p><tt>------------------- SampleClient Console Output --------------------------------<br><br>Connected to the Agent Controller on "localhost" at port number #####<br> <br>The Time Collector Agent ID: ###<br><br>Established a data channel with the agent.<br> <br>Sending 5 Hello messages over data channel to TimeCollector ...<br><br>Start the TimeCollector ...<br> <br>Incoming data: Hello from Time Collector Agent - Count 0<br><br>Incoming data: Hello from Time Collector Agent - Count 1<br> <br>Incoming data: Hello from Time Collector Agent - Count 2<br><br>Incoming data: Hello from Time Collector Agent - Count 3<br> <br>Incoming data: Hello from Time Collector Agent - Count 4<br><br><br>Stop the TimeCollector ...<br> <br>Incoming data: Hello from Time Collector Agent - Count 5<br><br>Incoming data: Hello from Time Collector Agent - Count 6<br> <br>Incoming data: Hello from Time Collector Agent - Count 7<br><br>Incoming data: Hello from Time Collector Agent - Count 8<br> <br>Incoming data: Hello from Time Collector Agent - Count 9<br><br>Incoming data: Hello from Time Collector Agent - Count 10<br> <br>All finished<br>Press any key to exit...</tt></p> </blockquote> <p><b>Note:</b> The above port number and Agent ID values will typically be 10006 and 103 respectively, depending on Agent Controller configuration settings and the number of times that the SampleClient application runs.</p> <p>Refer to the Agent Controller build <tt> readme.txt</tt> file for detailed information on the SampleClient functionality. </p> <h2><a name="serverlog"></a>Server Logging</h2> All server log entries will be placed in <tt><install-dir>/config/servicelog.log</tt> . <h2><a name="javaprof"></a>Running the Java Profiler</h2> <p>The Java Profiler consists of a Profiling Agent packaged as a library. This profiling agent is started by the JVM when the JVM is started with the <tt> -Xrun</tt> option described below. The profiling agent interacts with the JVM to capture and record the Java application's behavior. The output from the profiling agent is in the form of XML fragments. The format of this fragment is described in this document titled "<a href="http://www.eclipse.org/tptp/platform/documents/resources/profilingspec/XML4Profiling.htm">Event Specification for the Java Profiler</a>".<br> </p> <p>You can profile a Java application by using the Eclipse workbench or manually by invoking the profiler from the command line.<br> </p> <h3><a name="Invocation_from_the_Eclipse_Workbench">Invocation from the Eclipse Workbench</a></h3> <p>The Java Profiler can be launched from the Eclipse workbench. From the Profiling and Logging Perspective of the Eclipse workbench you can launch applications using the <b>Run > Profile</b> menu or the toolbar button. A wizard will come up. Simply follow the wizard to profile an application. Applications in the current Eclipse workbench's workspace, or external Java applications located in the file system, can be launched and profiled.</p> <h3><a name="Invocation_of_the_Java_Profiler_from_the_Command_Line">Invocation of the Java Profiler from the Command Line</a></h3> <p>Note that another step in <a href="#Start_Agent_Controller">Starting Agent Controller</a> is required for invoking the Java Profiler from the command line. The Java Profiler is invoked from a command line using the <tt> -Xrun</tt> JVM option as follows:</p> <pre> -XrunpiAgent[:agent_parm[,agent_parm]*]<br></pre> where <tt>agent_parm</tt> may be: <p></p> <ul> <li>server=[standalone | enabled | controlled | applicationControlled] <dl> <dt>standalone</dt> <dd>The Java Profiler is manually attached to a JVM instance and generates a stand-alone trace to a specified file based on the options and filters given on the command line. When this option is selected, the Java Profiler produces the enclosing traceRoot element to form a complete and valid XML document.</dd> <dt>enabled</dt> <dd>The Java Profiler is loaded, allows the application to run normally, but produces no trace until a Eclipse workbench attaches to the agent to give it instructions. When this option is selected, the Java Profiler only produces XML fragments instead of a complete XML document.</dd> <dt>controlled</dt> <dd>The Java Profiler is loaded, and the application is blocked from running until a client gives it instructions to continue. When this option is selected, the Java Profiler only produces XML fragments instead of a complete XML document.</dd> <dt>applicationControlled</dt> <dd>Profiling operations are controlled by the TPTP "Profiler" java class. The pluginconfig.xml file must be modified to use this mode. The pluginconfig.xml is located in the following directory: <pre><install-dir>/plugins/org.eclipse.tptp.platform.collection.framework_<version>/config/pluginconfig.xml</pre> The following modification is required: <pre><Agent client="DYNAMIC" configuration="default" dataChannelSize="64M" name="Java Profiling Agent" type="Profiler"/></pre> should be modified to <pre><Agent client="HEADLESS" configuration="default" dataChannelSize="64M" name="Java Profiling Agent" type="Profiler" logFile="<some_dir>/profile.trcxml"/></pre> Note that the Agent client attribute has been changed to "HEADLESS" and that the "logFile" attribute has been added.<br> The hcframe.jar file should also be included in the user's class path when profiling an application under this mode. For example: <pre> java -XrunpiAgent:server=applicationControlled -classpath .:<install-dir>/plugins/org.eclipse.tptp.platform.collection.framework_<version>/hcframe.jar TestClass</pre> </dd> </dl> </li> <li>filters=filename</li> </ul> <blockquote> <blockquote> <p><b>Note</b>: This parameter is only used when server=standalone is specified.</p> </blockquote> <p>Specifies the name of the file that contains the initial class filter definitions to be used during the trace. The default is filters.txt in the current directory. </p> <p>The format of the file is as follows: </p> </blockquote> <pre> <classpattern> <methodpattern> <mode> where:<br></pre> <blockquote> <dl> <dt>classpattern</dt> <dd>is a string with no embedded blanks. The string may contain a single "*" either at the beginning of the string or at the end of the string. The "*" will match zero or more characters, thus making the pattern a generic prefix or suffix pattern. A single "*" can also be specified to represent all strings.</dd> <dt>methodpattern</dt> <dd>is a string with no embedded blanks. The string may contain a single "*" either at the beginning of the string or at the end of the string. The "*" will match zero or more characters, thus making the pattern a generic prefix or suffix pattern. A single "*" can also be specified to represent all strings.</dd> <dt>mode</dt> <dd>is one of INCLUDE or EXCLUDE. Filter patterns are processed in the order that they are specified until the first pattern match succeeds. If the class name does not match any of the specified filter patterns, the default is to INCLUDE the class.</dd> </dl> </blockquote> <ul> <li>file=filename<br> <blockquote> <p><b>Note</b>: This parameter is only used when server=standalone is specified.</p> </blockquote> Specifies the name of a file where the trace will be written. The default is <tt> trace.trcxml</tt> in the current directory.</li> </ul> <ul> <li>help<br> Displays a list of available agent options to standard out.</li> </ul> <h2><a name="uninstall">Uninstalling Agent Controller</a></h2> <p>To uninstall the agent controller:</p> <ol> <li><a href="#Stop_Agent_Controller">Stop</a> the agent controller: </li> <li>Remove the <samp><install-dir></samp>.</li> <li>Remove the <tt><install-dir>/bin</tt> directory from the PATH environment variable, if necessary.</li> <li>Remove the <tt><install-dir>/lib</tt> directory from the LD_LIBRARY_PATH environment variable, if necessary.<br></li> </ol> <div class="runningfooter"><p><span style="font-size: 7pt;">Copyright (C) 2006-2007 Intel Corporation. </span> </p> </div> </body> </html>
View Attachment As Raw
Actions:
View
Attachments on
bug 159817
:
63228
|
63229
|
63264
|
63355
|
63391
|
64509