Bug 40045

Summary: Allow Results monitor to select a specific connector
Product: JMeter - Now in Github Reporter: Andy Dawson <andy>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: enhancement CC: milamber, ptorrodellas
Priority: P4    
Version: 2.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: Example Tomcat status file
Proposal patch
New patch version to correct a javadoc mistake and fetching the first connector if the connector name is not found.

Description Andy Dawson 2006-07-14 14:16:28 UTC
The Results monitor only analyses the first connector that appears in the Tomcat
manager/status XML. If, as is the case for me, more than one connector is
defined and the first one listed isnĀ“t the connector for the web application
that is being tested - the Results monitor thread count is incorrect. Note it
appeas that the Tomcat manager/status page sorts connectors alphabetically.


Regards,

Andy Dawson
As I see no place for attachements, below is an example manager/status XML file,
where the thread count is 8, and should display a thread busy count of 8/150 but
instead returns 0% (the xsl declaration has been removed to allow easier viewing):
<?xml version="1.0" encoding="utf-8"?><status><jvm><memory free='7357544'
total='37093376' max='66650112'/></jvm><connector name='http-8084'><threadInfo 
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
currentThreadCount="25" currentThreadsBusy="1" /><requestInfo  maxTime="0"
processingTime="0" requestCount="0" errorCount="0" bytesReceived="0"
bytesSent="0" /><workers><worker  stage="R" requestProcessingTime="0"
requestBytesSent="0" requestBytesRecieved="0" remoteAddr="&#63;"
virtualHost="&#63;" method="&#63;" currentUri="&#63;" currentQueryString="&#63;"
protocol="&#63;" /></workers></connector><connector name='http-8100'><threadInfo
 maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
currentThreadCount="25" currentThreadsBusy="8" /><requestInfo  maxTime="4813"
processingTime="255614" requestCount="2569" errorCount="1"
bytesReceived="559008" bytesSent="40935221" /><workers><worker  stage="K"
requestProcessingTime="3406" requestBytesSent="0" requestBytesReceived="0"
remoteAddr="192.168.1.124" virtualHost="?" method="&#63;" currentUri="&#63;"
currentQueryString="&#63;" protocol="&#63;" /><worker  stage="K"
requestProcessingTime="2843" requestBytesSent="0" requestBytesReceived="0"
remoteAddr="192.168.1.124" virtualHost="?" method="&#63;" currentUri="&#63;"
currentQueryString="&#63;" protocol="&#63;" /><worker  stage="R"
requestProcessingTime="0" requestBytesSent="0" requestBytesRecieved="0"
remoteAddr="&#63;" virtualHost="&#63;" method="&#63;" currentUri="&#63;"
currentQueryString="&#63;" protocol="&#63;" /><worker  stage="S"
requestProcessingTime="0" requestBytesSent="0" requestBytesReceived="0"
remoteAddr="192.168.1.124" virtualHost="mistral" method="GET"
currentUri="/manager/status" currentQueryString="XML=true" protocol="HTTP/1.1"
/><worker  stage="K" requestProcessingTime="2796" requestBytesSent="0"
requestBytesReceived="0" remoteAddr="192.168.1.124" virtualHost="?"
method="&#63;" currentUri="&#63;" currentQueryString="&#63;" protocol="&#63;"
/><worker  stage="R" requestProcessingTime="0" requestBytesSent="0"
requestBytesRecieved="0" remoteAddr="&#63;" virtualHost="&#63;" method="&#63;"
currentUri="&#63;" currentQueryString="&#63;" protocol="&#63;" /><worker 
stage="K" requestProcessingTime="968" requestBytesSent="0"
requestBytesReceived="0" remoteAddr="192.168.1.124" virtualHost="?"
method="&#63;" currentUri="&#63;" currentQueryString="&#63;" protocol="&#63;"
/><worker  stage="R" requestProcessingTime="0" requestBytesSent="0"
requestBytesRecieved="0" remoteAddr="&#63;" virtualHost="&#63;" method="&#63;"
currentUri="&#63;" currentQueryString="&#63;" protocol="&#63;" /><worker 
stage="R" requestProcessingTime="0" requestBytesSent="0"
requestBytesRecieved="0" remoteAddr="&#63;" virtualHost="&#63;" method="&#63;"
currentUri="&#63;" currentQueryString="&#63;" protocol="&#63;" /><worker 
stage="R" requestProcessingTime="0" requestBytesSent="0"
requestBytesRecieved="0" remoteAddr="&#63;" virtualHost="&#63;" method="&#63;"
currentUri="&#63;" currentQueryString="&#63;" protocol="&#63;" /><worker 
stage="R" requestProcessingTime="0" requestBytesSent="0"
requestBytesRecieved="0" remoteAddr="&#63;" virtualHost="&#63;" method="&#63;"
currentUri="&#63;" currentQueryString="&#63;" protocol="&#63;" /><worker 
stage="K" requestProcessingTime="3031" requestBytesSent="0"
requestBytesReceived="0" remoteAddr="192.168.1.124" virtualHost="?"
method="&#63;" currentUri="&#63;" currentQueryString="&#63;" protocol="&#63;"
/><worker  stage="K" requestProcessingTime="609" requestBytesSent="0"
requestBytesReceived="0" remoteAddr="192.168.1.124" virtualHost="?"
method="&#63;" currentUri="&#63;" currentQueryString="&#63;" protocol="&#63;"
/></workers></connector><connector name='http-4443'><threadInfo 
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
currentThreadCount="25" currentThreadsBusy="1" /><requestInfo  maxTime="0"
processingTime="0" requestCount="0" errorCount="0" bytesReceived="0"
bytesSent="0" /><workers><worker  stage="R" requestProcessingTime="0"
requestBytesSent="0" requestBytesRecieved="0" remoteAddr="&#63;"
virtualHost="&#63;" method="&#63;" currentUri="&#63;" currentQueryString="&#63;"
protocol="&#63;" /></workers></connector><connector name='jk-8009'><threadInfo 
maxThreads="200" minSpareThreads="4" maxSpareThreads="50" currentThreadCount="4"
currentThreadsBusy="1" /><requestInfo  maxTime="0" processingTime="0"
requestCount="0" errorCount="0" bytesReceived="0" bytesSent="0"
/><workers></workers></connector></status>
Comment 1 Andy Dawson 2006-07-14 14:18:20 UTC
Created attachment 18604 [details]
Example Tomcat status file

The attached XML file is not read correctly by the Results monitor.
Comment 2 peter lin 2006-07-14 14:24:00 UTC
a quick note. the change isn't trivial, so I don't know how much work is
required to implement the enhancement. it's probably going be a few weeks or
more. if you're adventurous and want to try enhancing it youself, I can assist.

peter
Comment 3 peter lin 2006-07-14 14:31:22 UTC
hopefully this weekend I can take a look and see how hard it would be to enhance
the monitor to allow users to select the desired port.
Comment 4 Milamber 2009-01-24 00:09:06 UTC
Hello,
I propose this patch for select connector you want monitor.

Test case 1:
If you have several connectors on one tomcat (i.e. http/8080, http/8443 and ajp/8009), you can monitor only http/8080 with this line in properties file:
monitor.connector.startwith=http-servername%2F192.168.1.2-8080

Test case 2:
If you have several connectors and several tomcat (tomcat or jboss cluster or multiple standalone instances), you can monitor only ajp connector on all instances with this line:
monitor.connector.startwith=ajp

Test case 3:
If you have several connectors on several tomcat, you can't monitor different connector with different port. To resolve this test case, another patch are necessary...
Comment 5 Milamber 2009-01-24 00:10:15 UTC
Created attachment 23171 [details]
Proposal patch
Comment 6 Milamber 2009-01-26 15:07:02 UTC
This proposal patch add possibility to select a specific connector or group of same connector (like ajp*).
This patch is not a GUI extension to select a specific connector from a connector list from tomcat/jboss because there is much work to do this.
In others words, this patch doesn't answer to this enhanced, but partially.
Comment 7 Milamber 2009-02-15 09:55:39 UTC
Created attachment 23260 [details]
New patch version to correct a javadoc mistake and fetching the first connector if the connector name is not found.
Comment 8 Sebb 2009-02-23 11:52:07 UTC
Fixed in SVN:

URL: http://svn.apache.org/viewvc?rev=747112&view=rev
Log:
Bug 40045 - Allow Results monitor to select a specific connector
Comment 9 Sebb 2009-03-23 02:57:26 UTC
*** Bug 46889 has been marked as a duplicate of this bug. ***
Comment 10 The ASF infrastructure team 2022-09-24 20:37:37 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1761