<commit_before><?xml version="1.0"?>
<!--
   $Header$
   Copyright 2001-2004 The Apache Software Foundation
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
 
       http://www.apache.org/licenses/LICENSE-2.0
 
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<document prev="build-monitor-test-plan.html" next="best-practices.html" date="$Date$">

<properties>
  <title>User's Manual: Remote Testing</title>
</properties>

<body>

<section name="13. Remote Testing">

<p>In the event that your JMeter client machine is unable, performance-wise, to simulate 
enough users to stress your server, an option exists to control multiple, remote JMeter
engines from a single JMeter GUI client.  By running JMeter remotely, you can replicate 
a test across many low-end computers and thus simulate a larger load on the server.  One
instance of the JMeter GUI client can control any number of remote JMeter instances, and collect
all the data from them.  This offers the following features: 


<ul>
<li>True performance measurment without network bottlenecks </li>
<li>Fast responsive GUI </li>
<li>Saving of test samples to a local machine </li>
<li>Managment of multiple JMeterEngines from a single machine </li>
</ul>
</p>

<p>Note that while you can indeed execute the JMeterEngine on your application 
server, you need to be mindful of the fact that this will be adding processing 
overhead on the application server and thus your testing results will be 
somewhat tainted.  The recommended approach is to have one or more machines on
the same Ethernet segment as your application server that you configure to run
the JMeter Engine.  This will minimize the impact of the network on the test 
results without impacting the performance of the application serer 
itself.
</p>

<p><b>Step 1: Start the servers </b></p>
<p>To run JMeter in remote node, start the JMeter server component on all machines you wish to run on by running the <b>JMETER_HOME/bin/jmeter-server</b> (unix) or <b>JMETER_HOME/bin/jmeter-server.bat</b> (windows) script.</p>

<p><b>Step 2: Add the server IP to your client's Properties File</b></p>
<p>Edit the properties file <i>on the controlling JMeter machine</i>.  In /bin/jmeter.properties, find the property named, "remote_hosts", and   
add the value of your running JMeter server's IP address.  Multiple such servers can be added, comma-delimited.</p>
<p>Note that you can also use the -J <a href="get-started.html#override">command line option</a> to specify the remote host(s) to use.
	E.g. jmeter -Jremote_hosts=host1,127.0.0.1,host2</p>

<p><b>Step 3: Start the JMeter Client</b></p>
<p>Now you are ready to start the controlling JMeter client. For MS-Windows, start the client with the script "bin/jmeter.bat".  For UNIX, 
use the script "bin/jmeter".  You will notice that the Run menu contains two new sub-menus: "Remote Start" and "Remote Stop" 
(see figure 1). These menus contain the client that you set in the properties file.  Use the remote start and stop instead of the 
normal JMeter start and stop menu items.</p>
<p><img src="../images/screenshots/remote/run-menu00.gif" width="232" height="156"></img>
<br>Figure 1 - Run Menu</br></p>
<subsection name="13.1 Doing it Manually" anchor="detail_instructions">
<p>In some cases, the jmeter-server script may not work for you (if you are using an OS platform not anticipated by the JMeter developers).  Here is how to start the JMeter servers (step 1 above) with a more manual process:</p>
<p><b>Step 1a: Start the RMI Registry</b></p>
<p>JMeter uses Remote Method Invocation (RMI) as the remote communication mechanism.  Therefore, you need
to run the RMI Registry application (which is named, "rmiregistry") that comes with the JDK and is located in the "bin" 
directory.  Before running rmiregistry, make sure that the following jars are in your system claspath:
<ul>
	<li>JMETER_HOME/lib/ext/ApacheJMeter_core.jar</li>
	<li>JMETER_HOME/lib/jorphan.jar</li>
	<li>JMETER_HOME/lib/logkit-1.2.jar</li>
</ul>
The 
rmiregistry application needs access to certain JMeter classes.  Run rmiregistry with no parameters.  By default the 
application listens to port 1099.</p>

<p><b>Step 1b: Start the JMeter Server</b></p>
<p>Once the RMI Registry application is running, start the JMeter Server.  
Use the "-s" option with the jmeter startup script ("jmeter -s").</p>

<p>Steps 2 and 3 remain the same.</p>
</subsection>
<subsection name="13.2 Tips" anchor="tips">
<p>If you're running Suse Linux, these tips may help. The default installation may enable the firewall. In that case, remote testing will not work properly. The following tips were contributed by <NAME>.</p>
<p>If you see connectios refused, turn on debugging by passing the following options.</p>
     rmiregistry -J-Dsun.rmi.log.debug=true
     -J-Dsun.rmi.server.exceptionTrace=true
     -J-Dsun.rmi.loader.logLevel=verbose
     -J-Dsun.rmi.dgc.logLevel=verbose
     -J-Dsun.rmi.transport.logLevel=verbose
     -J-Dsun.rmi.transport.tcp.logLevel=verbose
<p>The solution to the problem is to remove the loopbacks 127.0.0.1 and 127.0.0.2 from etc/hosts. What happens is jmeter-server can't connect to rmiregistry if 127.0.0.2 loopback is not available. Use the following settings to fix the problem.<p>
<p> Replace</p>
<ul>
    <li> `dirname $0`/jmeter  -s "$@"</li>
</ul>
<p>With</p>
<ul>
    <li> HOST="-Djava.rmi.server.hostname=<computer_name><computer_domain></li>
    <li> -Djava.security.policy=`dirname $0`/<policy_file>"</li>
    <li> `dirname $0`/jmeter $HOST -s "$@"</li>
</ul>
<p>Also create a policy file and add <computer_name><computer_domain> line to /etc/hosts.</p>
</subsection>



</section>

</body>
</document><commit_msg>fixed a bug. replaced the <> with square brackets, since <> causes problems.<commit_after><?xml version="1.0"?>
<!--
   $Header$
   Copyright 2001-2004 The Apache Software Foundation
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
 
       http://www.apache.org/licenses/LICENSE-2.0
 
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
-->
<document prev="build-monitor-test-plan.html" next="best-practices.html" date="$Date$">

<properties>
  <title>User's Manual: Remote Testing</title>
</properties>

<body>

<section name="13. Remote Testing">

<p>In the event that your JMeter client machine is unable, performance-wise, to simulate 
enough users to stress your server, an option exists to control multiple, remote JMeter
engines from a single JMeter GUI client.  By running JMeter remotely, you can replicate 
a test across many low-end computers and thus simulate a larger load on the server.  One
instance of the JMeter GUI client can control any number of remote JMeter instances, and collect
all the data from them.  This offers the following features: 


<ul>
<li>True performance measurment without network bottlenecks </li>
<li>Fast responsive GUI </li>
<li>Saving of test samples to a local machine </li>
<li>Managment of multiple JMeterEngines from a single machine </li>
</ul>
</p>

<p>Note that while you can indeed execute the JMeterEngine on your application 
server, you need to be mindful of the fact that this will be adding processing 
overhead on the application server and thus your testing results will be 
somewhat tainted.  The recommended approach is to have one or more machines on
the same Ethernet segment as your application server that you configure to run
the JMeter Engine.  This will minimize the impact of the network on the test 
results without impacting the performance of the application serer 
itself.
</p>

<p><b>Step 1: Start the servers </b></p>
<p>To run JMeter in remote node, start the JMeter server component on all machines you wish to run on by running the <b>JMETER_HOME/bin/jmeter-server</b> (unix) or <b>JMETER_HOME/bin/jmeter-server.bat</b> (windows) script.</p>

<p><b>Step 2: Add the server IP to your client's Properties File</b></p>
<p>Edit the properties file <i>on the controlling JMeter machine</i>.  In /bin/jmeter.properties, find the property named, "remote_hosts", and   
add the value of your running JMeter server's IP address.  Multiple such servers can be added, comma-delimited.</p>
<p>Note that you can also use the -J <a href="get-started.html#override">command line option</a> to specify the remote host(s) to use.
	E.g. jmeter -Jremote_hosts=host1,127.0.0.1,host2</p>

<p><b>Step 3: Start the JMeter Client</b></p>
<p>Now you are ready to start the controlling JMeter client. For MS-Windows, start the client with the script "bin/jmeter.bat".  For UNIX, 
use the script "bin/jmeter".  You will notice that the Run menu contains two new sub-menus: "Remote Start" and "Remote Stop" 
(see figure 1). These menus contain the client that you set in the properties file.  Use the remote start and stop instead of the 
normal JMeter start and stop menu items.</p>
<p><img src="../images/screenshots/remote/run-menu00.gif" width="232" height="156"></img>
<br>Figure 1 - Run Menu</br></p>
<subsection name="13.1 Doing it Manually" anchor="detail_instructions">
<p>In some cases, the jmeter-server script may not work for you (if you are using an OS platform not anticipated by the JMeter developers).  Here is how to start the JMeter servers (step 1 above) with a more manual process:</p>
<p><b>Step 1a: Start the RMI Registry</b></p>
<p>JMeter uses Remote Method Invocation (RMI) as the remote communication mechanism.  Therefore, you need
to run the RMI Registry application (which is named, "rmiregistry") that comes with the JDK and is located in the "bin" 
directory.  Before running rmiregistry, make sure that the following jars are in your system claspath:
<ul>
	<li>JMETER_HOME/lib/ext/ApacheJMeter_core.jar</li>
	<li>JMETER_HOME/lib/jorphan.jar</li>
	<li>JMETER_HOME/lib/logkit-1.2.jar</li>
</ul>
The 
rmiregistry application needs access to certain JMeter classes.  Run rmiregistry with no parameters.  By default the 
application listens to port 1099.</p>

<p><b>Step 1b: Start the JMeter Server</b></p>
<p>Once the RMI Registry application is running, start the JMeter Server.  
Use the "-s" option with the jmeter startup script ("jmeter -s").</p>

<p>Steps 2 and 3 remain the same.</p>
</subsection>
<subsection name="13.2 Tips" anchor="tips">
<p>If you're running Suse Linux, these tips may help. The default installation may enable the firewall. In that case, remote testing will not work properly. The following tips were contributed by <NAME>.</p>
<p>If you see connectios refused, turn on debugging by passing the following options.</p>
     rmiregistry -J-Dsun.rmi.log.debug=true
     -J-Dsun.rmi.server.exceptionTrace=true
     -J-Dsun.rmi.loader.logLevel=verbose
     -J-Dsun.rmi.dgc.logLevel=verbose
     -J-Dsun.rmi.transport.logLevel=verbose
     -J-Dsun.rmi.transport.tcp.logLevel=verbose
<p>The solution to the problem is to remove the loopbacks 127.0.0.1 and 127.0.0.2 from etc/hosts. What happens is jmeter-server can't connect to rmiregistry if 127.0.0.2 loopback is not available. Use the following settings to fix the problem.</p>
<p> Replace</p>
<ul>
    <li> `dirname $0`/jmeter  -s "$@"</li>
</ul>
<p> With</p>
<ul>
    <li> HOST="-Djava.rmi.server.hostname=[computer_name][computer_domain]</li>
    <li> -Djava.security.policy=`dirname $0`/[policy_file]"</li>
    <li> `dirname $0`/jmeter $HOST -s "$@"</li>
</ul>
<p>Also create a policy file and add [computer_name][computer_domain] line to /etc/hosts.</p>
</subsection>



</section>

</body>
</document>
{'fraction_non_alphanumeric': 0.10278162982298719, 'fraction_numerical': 0.012235908312260381, 'mean_word_length': 4.241556220607097, 'pattern_counts': {'":': 0, '<': 236, '<?xml version=': 2, '>': 236, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 8, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4604818', 'n_tokens_mistral': 3941, 'n_tokens_neox': 3730, 'n_words': 1590}