JMeter Learning (31) Access Log Sampler

Source: Internet
Author: User

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 &quot;%r&quot;%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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.