Prerequisites :
In Tomcat\conf\server.xml by default, there is a section of code:
<className= "Org.apache.catalina.valves.AccessLogValve" directory = "Logs" pattern = "%h%l%u%t "%r"%s%b" prefix = "Localhost_access_log." suffix = ". txt" />
Start Tomcat\bin The following Startup.bat, under the Tomcat\logs directory, generate a file similar to Localhost_access_log.2015-04-21.txt.
The log information for Tomcat is recorded in this file.
Case
1. Start JMeter, add thread Group
2. Add sampler-access Log Sampler, set such as:
3. Add listener-view result tree
4, run.
Legacy Issues :
1, Tomcat itself run, will produce localhost_access_log.2015-04-21.txt files in the log, but run JMeter, error:
Java.lang.Error:Problem parsing the log file at Org.apache.jmeter.protocol.http.sampler.AccessLogSampler.sampleWithParser (accesslogsampler.java:147) at Org.apache.jmeter.protocol.http.sampler.AccessLogSampler.sample (accesslogsampler.java:183) at Org.apache.jmeter.threads.JMeterThread.process_sampler (jmeterthread.java:429) at Org.apache.jmeter.threads.JMeterThread.run (jmeterthread.java:257) at Java.lang.Thread.run (thread.java:619)
not resolved temporarily .
2, the cluster is not tested , do not know whether it is feasible.
<!-- Filter configuration information for the cluster environment <valve classname= "Org.apache.catalina.ha.tcp.ReplicationValve" filter= ". *\.gif|. *\.js|. *\.jpeg|. *\.jpg|. *\.png|. *\.htm|. *\.html|. *\.css|. *\.txt "/> --
JMeter Learning (31) Access Log Sampler