Writing a filter for Access Log Sampler

2011-08-03 Thread Will Roden

I want to write a custom filter for Access Log Sampler, and I am having
trouble finding how to do it.  I see SessionFilter and LogFilter in the
jmeter source code, so I can figure out how to code it, but I don't know
where to put my new class.  Can I just put it in a jar in the ext and have
it picked up like a plugin, or is there something else to it?

Thanks,

Will


Re: access log sampler, state thereof

2011-02-25 Thread Andrey Pohilko
Hi, Will,

I've uploaded current snapshot here: http://code.google.com/p/jmeter-
plugins/downloads/detail?name=JMeterPlugins-0.4.1-
snapshot1.zipcan=1q=#makechanges

Raw Sampler now is pretty simple, you just provide full HTTP request to send 
on wire. 

Massive way of using Raw Sampler is Raw Data Source pre-processor. Add it to 
your test and prepare a file for it. File has simple format:
request length in bytes\n
request data f specified length[newlines possible]next request length\n
next request data ... etc...

Then use ${rawData} as Raw Sampler request data. 

Make note that your request data contains \r\n as end of lines.

Again, this is very early stage for Raw concept, so your feedback will help 
to make it more transparent and easy to use. I've attached sample test plan 
and data file to start with.

Stay in touch,
Andrey

В сообщении от 25 февраля 2011 01:02:10 автор Will Milspec написал:
 Some comments:
 to recreate actual load from a very busy system.
 
 Actual load is usually concurrent. In most cases you dont get these values
 from a log file (and its important that the same session use the same
 thread).
 
 Right. We desire session recreation. From a functional perspective
 (recreating actual load), we find that our production servers can get a lot
 of bot crawls. Each bot request uses its own session. (5000 requests=5000
 sessions). These smal sessions add overhead when those sessions expire.
 If all 5000 requests came from the same session, we would not see the
 session expiration overhead.
 
 Technically I've read that Jmeter basically tries to 'recreate sessions' by
 lumping together requests from the same IP address, but have not confirmed
 how the access log sampler simulates these sessions.
 
 Ideally the access log sampler would work as follows:
 -recognize 'session id' to  the access log
 -access log sampler groups requests from the same sessions into the same
 session. (it can't re-use the exact same session ID as the servlet
 container generates it automatically. ).
 
 If you can generate all POST and GET data, you could use HTTP Raw Sampler
 (custom sampler, not shipped with JMeter). It allows you have full control
 
 Where can I find the raw sampler.
 
 Addendum
 
 fwiw, here's (pretty trivial) example code to add the post parameter to the
 tomcat access log. It adds overhead, mostly when the access log valve
 prints out the parameters.
 
 A. Access log format to get a request attribute, here called rpf params.
 e.g.:
 '%{rpfParams}r'
 
 The tomcat access log valve will call
 request.getAttribute(rpfParams).toString()
 
 B. Add a filter that adds sets a 'parameter wrapper' as a request
 attribute. public void doFilter(ServletRequest pRequest, ServletResponse
 pResponse, FilterChain pChain) throws IOException, ServletException
{
   pRequest.setAttribute(rpfParams,new
 RecordParamsFilter.ParameterWrapper(pRequest.getParameterMap()));
   pChain.doFilter(pRequest, pResponse);
}
 
/**
 * Class to wrap  parameter map. Main work occurs in the toString.
 *
 * Exists to allow printing of both get and post parameters.
 */
public class ParameterWrapper
{
   Map fMap;
 
   public ParameterWrapper(Map pMap)
   {
  fMap = pMap;
   }
 
   @Override
   public String toString()
   {
  StringBuffer sb = new StringBuffer();
  for (Iterator it = fMap.entrySet().iterator(); it.hasNext(); )
  {
 Map.Entry entry = (Map.Entry) it.next();
 String[] values = (String[]) entry.getValue();
 for (String value : values)
 {
sb.append(entry.getKey()).append(=);
sb.append(value);
 }
 if (it.hasNext())
 {
sb.append();
 }
  }
  return sb.toString();
   }
}


RawRequestSample.jmx
Description: XML document
773
GET /blog/247/comment/ HTTP/1.1
Host: apc.kg
Connection: keep-alive
Referer: http://apc.kg/blog/247/
Cache-Control: max-age=0
Accept: 
application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.13 (KHTML, 
like Gecko) Ubuntu/10.10 Chromium/9.0.597.94 Chrome/9.0.597.94 Safari/534.13
Accept-Encoding: gzip,deflate,sdch
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4
Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.3
Cookie: 
__utmz=50250230.1297072279.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); 
PHPSESSID=a8df1f5d8a623f8c62e5e4e849c64a14; 
__utma=50250230.838534113.1297072279.1297238127.1298628733.5; __utmc=50250230; 
__utmb=50250230.10.10.1298628733

675
GET /img/spaw2/js/spaw.js.php HTTP/1.1
Host: apc.kg
Connection: keep-alive
Referer: http://apc.kg/blog/247/comment/
Accept: */*
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.13 (KHTML, 
like Gecko) Ubuntu/10.10 Chromium/9.0.597.94

Re: access log sampler, state thereof

2011-02-25 Thread Deepak Shetty
Hi
so i looked through some of it , AccessLogSampler was designed to replay the
requests , not simulate the load. So while it seems that it does implement
some of the below (e.g. A map of CookieManagers is kept so that each thread
should correctly pick up the session when it makes a request when you use a
sessionfilter) - the concurrency part must be implemented by you. - Maybe
you should raise an enhancement request in bugzilla - what you are asking
for certainly seems to be something that a lot of us could use.

regards
deepak


On Thu, Feb 24, 2011 at 2:15 PM, Deepak Shetty shet...@gmail.com wrote:

 Ideally the access log sampler would work as follows:
 -recognize 'session id' to  the access log
 -access log sampler groups requests from the same sessions into the same
 session. (it can't re-use the exact same session ID as the servlet
 container
 generates it automatically. ).
 But you are missing one part. A thread in JMeter must wait till the
 response returns. therefore you also need to account for concurrent sessions
 and concurrent requests.

 If I had to implement this I'd do something like
 a. Configure tomcat to also output out SessionIds into the log (along with
 post data) - IP address might work as well
 b.  Pre process your log file to
  1. Figure out when a session began and when it ended (first and last
 request)
  2. calculate the maximum number of concurrent sessions (this is the
 number of threads you will need in JMeter).
  3. Generate new log files that each thread will use by splitting up
 your original log files , based on concurrent sessions(i.e. IP1 - request1
 should go into a file for Thread1 , if now you get IP2 - request2 , then the
 same thread cannot execute this request and you need to make this request2
 from a new thread. If now IP1 session has finished then Thread1 can clear
 all its cookies and start making requests again).
 c. Now use your sampler (either normal + BSH or a customised version) so
 that each thread reads its file and plays the request that it has to(taking
 into account that some variables are dynamic so you cannot always replay the
 test exactly).

 I havent seen the AccessLogSampler code so Im not sure how much of this is
 already implemented. Some of the above may be unneccessarily complicated ,
 need to think about it a bit more.

 regards
 deepak



 On Thu, Feb 24, 2011 at 2:02 PM, Will Milspec will.mils...@gmail.comwrote:

 Some comments:

 to recreate actual load from a very busy system.
 Actual load is usually concurrent. In most cases you dont get these
 values
 from a log file (and its important that the same session use the same
 thread).

 Right. We desire session recreation. From a functional perspective
 (recreating actual load), we find that our production servers can get a
 lot
 of bot crawls. Each bot request uses its own session. (5000
 requests=5000
 sessions). These smal sessions add overhead when those sessions expire.
 If
 all 5000 requests came from the same session, we would not see the
 session
 expiration overhead.

 Technically I've read that Jmeter basically tries to 'recreate sessions'
 by
 lumping together requests from the same IP address, but have not confirmed
 how the access log sampler simulates these sessions.

 Ideally the access log sampler would work as follows:
 -recognize 'session id' to  the access log
 -access log sampler groups requests from the same sessions into the same
 session. (it can't re-use the exact same session ID as the servlet
 container
 generates it automatically. ).


 If you can generate all POST and GET data, you could use HTTP Raw Sampler
 (custom sampler, not shipped with JMeter). It allows you have full
 control
 Where can I find the raw sampler.

 Addendum
 
 fwiw, here's (pretty trivial) example code to add the post parameter to
 the
 tomcat access log. It adds overhead, mostly when the access log valve
 prints
 out the parameters.

 A. Access log format to get a request attribute, here called rpf params.
 e.g.:
 '%{rpfParams}r'

 The tomcat access log valve will call
 request.getAttribute(rpfParams).toString()

 B. Add a filter that adds sets a 'parameter wrapper' as a request
 attribute.
   public void doFilter(ServletRequest pRequest, ServletResponse pResponse,
 FilterChain pChain) throws IOException, ServletException
   {
  pRequest.setAttribute(rpfParams,new
 RecordParamsFilter.ParameterWrapper(pRequest.getParameterMap()));
  pChain.doFilter(pRequest, pResponse);
   }

   /**
* Class to wrap  parameter map. Main work occurs in the toString.
*
* Exists to allow printing of both get and post parameters.
*/
   public class ParameterWrapper
   {
  Map fMap;

  public ParameterWrapper(Map pMap)
  {
 fMap = pMap;
  }

  @Override
  public String toString()
  {
 StringBuffer sb = new StringBuffer();
 for (Iterator it = fMap.entrySet().iterator(); it.hasNext

Re: access log sampler, state thereof

2011-02-24 Thread Andrey Pohilko
Hi,

If you can generate all POST and GET data, you could use HTTP Raw Sampler 
(custom sampler, not shipped with JMeter). It allows you have full control 
over request data - cookies, headers etc, but requires far more efforts ro 
prepare data.

If you interested, we could discuss it with more details, Raw Sampler concept 
is at very early development stage now.

Best regards,
Andrey Pohilko,
JMeter Plugins at Google Code
Project Owner
http://code.google.com/p/jmeter-plugins/

В сообщении от 24 февраля 2011 01:34:12 автор Will Milspec написал:
 hi all,
 
 I'm new to jmeter and have interest in using the access log sampler to
 recreate actual load from a very busy system.
 
 Anyone on the list using it currently? Can you share your insights 
 recommendations?
 
 We really would like it to replay 'posts' (i.e. as well as 'gets'), but
 reading the documentation and code, it appears that no posts.
 
 For our application, posting content results in cleared caches, i.e. which
 require cache reloading...versus mere gets which fetch from the cache. So
 post-less access logs really will not tax the application to its full
 extent.
 
 I've looked at adding a new parser class (i.e. for a custom format which
 includes post data--it's pretty easy in tomcat to log this information
 using a servlet filter and the tomcat access log valve formatting
 strings)however..reviewing the code I'm not sure if the HttpSampler
 will actually replay a post ...but I digress.. This is fodder for
 another question
 
 However please weigh in if you have any pointers to extending the
 functionality.
 
 thanks in advance,
 
 will

-
To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org



Re: access log sampler, state thereof

2011-02-24 Thread Will Milspec
Some comments:

to recreate actual load from a very busy system.
Actual load is usually concurrent. In most cases you dont get these values
from a log file (and its important that the same session use the same
thread).

Right. We desire session recreation. From a functional perspective
(recreating actual load), we find that our production servers can get a lot
of bot crawls. Each bot request uses its own session. (5000 requests=5000
sessions). These smal sessions add overhead when those sessions expire. If
all 5000 requests came from the same session, we would not see the session
expiration overhead.

Technically I've read that Jmeter basically tries to 'recreate sessions' by
lumping together requests from the same IP address, but have not confirmed
how the access log sampler simulates these sessions.

Ideally the access log sampler would work as follows:
-recognize 'session id' to  the access log
-access log sampler groups requests from the same sessions into the same
session. (it can't re-use the exact same session ID as the servlet container
generates it automatically. ).


If you can generate all POST and GET data, you could use HTTP Raw Sampler
(custom sampler, not shipped with JMeter). It allows you have full control
Where can I find the raw sampler.

Addendum

fwiw, here's (pretty trivial) example code to add the post parameter to the
tomcat access log. It adds overhead, mostly when the access log valve prints
out the parameters.

A. Access log format to get a request attribute, here called rpf params.
e.g.:
'%{rpfParams}r'

The tomcat access log valve will call
request.getAttribute(rpfParams).toString()

B. Add a filter that adds sets a 'parameter wrapper' as a request attribute.
   public void doFilter(ServletRequest pRequest, ServletResponse pResponse,
FilterChain pChain) throws IOException, ServletException
   {
  pRequest.setAttribute(rpfParams,new
RecordParamsFilter.ParameterWrapper(pRequest.getParameterMap()));
  pChain.doFilter(pRequest, pResponse);
   }

   /**
* Class to wrap  parameter map. Main work occurs in the toString.
*
* Exists to allow printing of both get and post parameters.
*/
   public class ParameterWrapper
   {
  Map fMap;

  public ParameterWrapper(Map pMap)
  {
 fMap = pMap;
  }

  @Override
  public String toString()
  {
 StringBuffer sb = new StringBuffer();
 for (Iterator it = fMap.entrySet().iterator(); it.hasNext(); )
 {
Map.Entry entry = (Map.Entry) it.next();
String[] values = (String[]) entry.getValue();
for (String value : values)
{
   sb.append(entry.getKey()).append(=);
   sb.append(value);
}
if (it.hasNext())
{
   sb.append();
}
 }
 return sb.toString();
  }
   }


Re: access log sampler, state thereof

2011-02-24 Thread Deepak Shetty
Ideally the access log sampler would work as follows:
-recognize 'session id' to  the access log
-access log sampler groups requests from the same sessions into the same
session. (it can't re-use the exact same session ID as the servlet
container
generates it automatically. ).
But you are missing one part. A thread in JMeter must wait till the response
returns. therefore you also need to account for concurrent sessions and
concurrent requests.

If I had to implement this I'd do something like
a. Configure tomcat to also output out SessionIds into the log (along with
post data) - IP address might work as well
b.  Pre process your log file to
 1. Figure out when a session began and when it ended (first and last
request)
 2. calculate the maximum number of concurrent sessions (this is the
number of threads you will need in JMeter).
 3. Generate new log files that each thread will use by splitting up
your original log files , based on concurrent sessions(i.e. IP1 - request1
should go into a file for Thread1 , if now you get IP2 - request2 , then the
same thread cannot execute this request and you need to make this request2
from a new thread. If now IP1 session has finished then Thread1 can clear
all its cookies and start making requests again).
c. Now use your sampler (either normal + BSH or a customised version) so
that each thread reads its file and plays the request that it has to(taking
into account that some variables are dynamic so you cannot always replay the
test exactly).

I havent seen the AccessLogSampler code so Im not sure how much of this is
already implemented. Some of the above may be unneccessarily complicated ,
need to think about it a bit more.

regards
deepak


On Thu, Feb 24, 2011 at 2:02 PM, Will Milspec will.mils...@gmail.comwrote:

 Some comments:

 to recreate actual load from a very busy system.
 Actual load is usually concurrent. In most cases you dont get these values
 from a log file (and its important that the same session use the same
 thread).

 Right. We desire session recreation. From a functional perspective
 (recreating actual load), we find that our production servers can get a lot
 of bot crawls. Each bot request uses its own session. (5000 requests=5000
 sessions). These smal sessions add overhead when those sessions expire.
 If
 all 5000 requests came from the same session, we would not see the session
 expiration overhead.

 Technically I've read that Jmeter basically tries to 'recreate sessions' by
 lumping together requests from the same IP address, but have not confirmed
 how the access log sampler simulates these sessions.

 Ideally the access log sampler would work as follows:
 -recognize 'session id' to  the access log
 -access log sampler groups requests from the same sessions into the same
 session. (it can't re-use the exact same session ID as the servlet
 container
 generates it automatically. ).


 If you can generate all POST and GET data, you could use HTTP Raw Sampler
 (custom sampler, not shipped with JMeter). It allows you have full control
 Where can I find the raw sampler.

 Addendum
 
 fwiw, here's (pretty trivial) example code to add the post parameter to the
 tomcat access log. It adds overhead, mostly when the access log valve
 prints
 out the parameters.

 A. Access log format to get a request attribute, here called rpf params.
 e.g.:
 '%{rpfParams}r'

 The tomcat access log valve will call
 request.getAttribute(rpfParams).toString()

 B. Add a filter that adds sets a 'parameter wrapper' as a request
 attribute.
   public void doFilter(ServletRequest pRequest, ServletResponse pResponse,
 FilterChain pChain) throws IOException, ServletException
   {
  pRequest.setAttribute(rpfParams,new
 RecordParamsFilter.ParameterWrapper(pRequest.getParameterMap()));
  pChain.doFilter(pRequest, pResponse);
   }

   /**
* Class to wrap  parameter map. Main work occurs in the toString.
*
* Exists to allow printing of both get and post parameters.
*/
   public class ParameterWrapper
   {
  Map fMap;

  public ParameterWrapper(Map pMap)
  {
 fMap = pMap;
  }

  @Override
  public String toString()
  {
 StringBuffer sb = new StringBuffer();
 for (Iterator it = fMap.entrySet().iterator(); it.hasNext(); )
 {
Map.Entry entry = (Map.Entry) it.next();
String[] values = (String[]) entry.getValue();
for (String value : values)
{
   sb.append(entry.getKey()).append(=);
   sb.append(value);
}
if (it.hasNext())
{
   sb.append();
}
 }
 return sb.toString();
  }
   }



access log sampler, state thereof

2011-02-23 Thread Will Milspec
hi all,

I'm new to jmeter and have interest in using the access log sampler to
recreate actual load from a very busy system.

Anyone on the list using it currently? Can you share your insights 
recommendations?

We really would like it to replay 'posts' (i.e. as well as 'gets'), but
reading the documentation and code, it appears that no posts.

For our application, posting content results in cleared caches, i.e. which
require cache reloading...versus mere gets which fetch from the cache. So
post-less access logs really will not tax the application to its full
extent.

I've looked at adding a new parser class (i.e. for a custom format which
includes post data--it's pretty easy in tomcat to log this information using
a servlet filter and the tomcat access log valve formatting
strings)however..reviewing the code I'm not sure if the HttpSampler will
actually replay a post ...but I digress.. This is fodder for another
question

However please weigh in if you have any pointers to extending the
functionality.

thanks in advance,

will


Re: access log sampler, state thereof

2011-02-23 Thread Deepak Shetty
to recreate actual load from a very busy system.
Actual load is usually concurrent. In most cases you dont get these values
from a log file (and its important that the same session use the same
thread).

but reading the documentation and code, it appears that no posts.
Because the log usually doesnt have the POST body which you say you can fix

 I'm not sure if the HttpSampler will actually replay a post
you'll need to customise it as far as I know , there's no reason why you
cant do it if you have the data.


regards
deepak

On Wed, Feb 23, 2011 at 2:34 PM, Will Milspec will.mils...@gmail.comwrote:

 hi all,

 I'm new to jmeter and have interest in using the access log sampler to
 recreate actual load from a very busy system.

 Anyone on the list using it currently? Can you share your insights 
 recommendations?

 We really would like it to replay 'posts' (i.e. as well as 'gets'), but
 reading the documentation and code, it appears that no posts.

 For our application, posting content results in cleared caches, i.e. which
 require cache reloading...versus mere gets which fetch from the cache. So
 post-less access logs really will not tax the application to its full
 extent.

 I've looked at adding a new parser class (i.e. for a custom format which
 includes post data--it's pretty easy in tomcat to log this information
 using
 a servlet filter and the tomcat access log valve formatting
 strings)however..reviewing the code I'm not sure if the HttpSampler
 will
 actually replay a post ...but I digress.. This is fodder for another
 question

 However please weigh in if you have any pointers to extending the
 functionality.

 thanks in advance,

 will



Need help on Access Log Sampler

2009-02-24 Thread Rekha_Arsi

Hi all,

 Please tell me how can I use access log sampler in my test plan. what is 
the actual purpose of using access log sampler.

Please give me one example of implementing access log sampler in jmeter.




Thanks and Regards

Rekha Arsi
Mobile : 9866501404




DISCLAIMER:
This email (including any attachments) is intended for the sole use of the 
intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE 
COMPANY INFORMATION. Any review or reliance by others or copying or 
distribution or forwarding of any or all of the contents in this message is 
STRICTLY PROHIBITED. If you are not the intended recipient, please contact the 
sender by email and delete all copies; your cooperation in this regard is 
appreciated.

-
To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org



Re: Need help on Access Log Sampler

2009-02-24 Thread sebb
Please don't send duplicate messages to the mailing list.

Please also read the manual before posting questions.

Your question is discussed in the manual.

On 24/02/2009, Rekha_Arsi rekha_a...@satyam.com wrote:

  Hi all,

  Please tell me how can I use access log sampler in my test plan. what is 
 the actual purpose of using access log sampler.

  Please give me one example of implementing access log sampler in jmeter.




  Thanks and Regards

  Rekha Arsi
  Mobile : 9866501404




  DISCLAIMER:
  This email (including any attachments) is intended for the sole use of the 
 intended recipient/s and may contain material that is CONFIDENTIAL AND 
 PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or 
 distribution or forwarding of any or all of the contents in this message is 
 STRICTLY PROHIBITED. If you are not the intended recipient, please contact 
 the sender by email and delete all copies; your cooperation in this regard is 
 appreciated.

  -
  To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
  For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org



-
To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org



Need help on Access Log Sampler

2009-02-23 Thread Rekha_Arsi

Hi all,

 Please tell me how can I use access log sampler in my test plan. what is 
the actual purpose of using access log sampler.

Please give me one example of implementing access log sampler in jmeter.


Thanks and Regards

Rekha Arsi
Mobile : 9866501404




DISCLAIMER:
This email (including any attachments) is intended for the sole use of the 
intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE 
COMPANY INFORMATION. Any review or reliance by others or copying or 
distribution or forwarding of any or all of the contents in this message is 
STRICTLY PROHIBITED. If you are not the intended recipient, please contact the 
sender by email and delete all copies; your cooperation in this regard is 
appreciated.

-
To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org



Re: Access log sampler

2009-02-22 Thread sebb
On 18/02/2009, Suvendu_Mohapatra suvendu_mohapa...@satyam.com wrote:
 Hi Team,

  I want to use the Access log sampler in my test plan to access the logs of 
 my server which is tomcat and is configured locally. when I am executing it I 
 am geting error such as:
  Response code: Non HTTP response code: java.lang.Error
  Response message: Non HTTP response message: Problem parsing the log file

  Need help to solve this problem.


Need more info to provide help.

e.g. JMeter version, and a sample (1 or 2 lines) of the access log.


  Thanks and regards,
  Suvendu



  
  DISCLAIMER:
  This email (including any attachments) is intended for the sole use of the 
 intended recipient/s and may contain material that is CONFIDENTIAL AND 
 PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or 
 distribution or forwarding of any or all of the contents in this message is 
 STRICTLY PROHIBITED. If you are not the intended recipient, please contact 
 the sender by email and delete all copies; your cooperation in this regard is 
 appreciated.


-
To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org



Access log sampler

2009-02-18 Thread Suvendu_Mohapatra
Hi Team,

I want to use the Access log sampler in my test plan to access the logs of my 
server which is tomcat and is configured locally. when I am executing it I am 
geting error such as:
Response code: Non HTTP response code: java.lang.Error
Response message: Non HTTP response message: Problem parsing the log file

Need help to solve this problem.


Thanks and regards,
Suvendu




DISCLAIMER:
This email (including any attachments) is intended for the sole use of the 
intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE 
COMPANY INFORMATION. Any review or reliance by others or copying or 
distribution or forwarding of any or all of the contents in this message is 
STRICTLY PROHIBITED. If you are not the intended recipient, please contact the 
sender by email and delete all copies; your cooperation in this regard is 
appreciated.


access log sampler

2008-12-18 Thread Jmeter PRA
hi Gurus,

I want to simulate traffic on my server based upon access logs.I tired this
but Jmeter is using the URI is the access logs based upon the number of
threads I give.Is there a way in jmeter to execute all the URIs in access
logs


Thanks,
Siva


Re: Access Log Sampler

2008-05-15 Thread sebb
On 14/05/2008, john wu [EMAIL PROTECTED] wrote:
 Hi All,

  Does Access Log Sampler support POST request in the log file?

No, because in general the access log does not contain all the
information needed to recreate the request - for example as far as I
know the access log will never contain details of the POST body.

 How to set it up? In my log file, I have many POST request and send different 
 parameters for each post request, do I have to pass all these parameters in 
 HTTP Request Default?


That won't work. Defaults are fixed values.

  Thanks




  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Access Log Sampler

2008-05-15 Thread Peter Lin
What I've done in the past with tomcat is to write a request filter to
dump the request parameters into the log.  in some cases, you may not
want to do that for security reasons if there's sensitive data.

peter

On Thu, May 15, 2008 at 6:53 AM, sebb [EMAIL PROTECTED] wrote:
 On 14/05/2008, john wu [EMAIL PROTECTED] wrote:
 Hi All,

  Does Access Log Sampler support POST request in the log file?

 No, because in general the access log does not contain all the
 information needed to recreate the request - for example as far as I
 know the access log will never contain details of the POST body.

 How to set it up? In my log file, I have many POST request and send 
 different parameters for each post request, do I have to pass all these 
 parameters in HTTP Request Default?


 That won't work. Defaults are fixed values.

  Thanks




  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Access Log Sampler

2008-05-15 Thread sebb
I've just had a look at the code, and it does handle POST requests, so
if the POSTs don't have bodies, the Access Log Sampler should work OK.

@Peter: what format do the request parameters have to be in for the
sampler to pick them up?

On 15/05/2008, Peter Lin [EMAIL PROTECTED] wrote:
 What I've done in the past with tomcat is to write a request filter to
  dump the request parameters into the log.  in some cases, you may not
  want to do that for security reasons if there's sensitive data.


  peter


  On Thu, May 15, 2008 at 6:53 AM, sebb [EMAIL PROTECTED] wrote:
   On 14/05/2008, john wu [EMAIL PROTECTED] wrote:
   Hi All,
  
Does Access Log Sampler support POST request in the log file?
  
   No, because in general the access log does not contain all the
   information needed to recreate the request - for example as far as I
   know the access log will never contain details of the POST body.
  
   How to set it up? In my log file, I have many POST request and send 
 different parameters for each post request, do I have to pass all these 
 parameters in HTTP Request Default?
  
  
   That won't work. Defaults are fixed values.
  
Thanks
  
  
  
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  

  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Access Log Sampler

2008-05-15 Thread Peter Lin
as long as it follows normal get format

param=valueparam2=value



On Thu, May 15, 2008 at 8:17 AM, sebb [EMAIL PROTECTED] wrote:
 I've just had a look at the code, and it does handle POST requests, so
 if the POSTs don't have bodies, the Access Log Sampler should work OK.

 @Peter: what format do the request parameters have to be in for the
 sampler to pick them up?

 On 15/05/2008, Peter Lin [EMAIL PROTECTED] wrote:
 What I've done in the past with tomcat is to write a request filter to
  dump the request parameters into the log.  in some cases, you may not
  want to do that for security reasons if there's sensitive data.


  peter


  On Thu, May 15, 2008 at 6:53 AM, sebb [EMAIL PROTECTED] wrote:
   On 14/05/2008, john wu [EMAIL PROTECTED] wrote:
   Hi All,
  
Does Access Log Sampler support POST request in the log file?
  
   No, because in general the access log does not contain all the
   information needed to recreate the request - for example as far as I
   know the access log will never contain details of the POST body.
  
   How to set it up? In my log file, I have many POST request and send 
 different parameters for each post request, do I have to pass all these 
 parameters in HTTP Request Default?
  
  
   That won't work. Defaults are fixed values.
  
Thanks
  
  
  
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  

  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Access Log Sampler

2008-05-15 Thread john wu
Thanks guys!

I added the following two lines into my server.xml file.

Valve className=org.apache.catalina.valves.RequestDumperValve/
Valve className=org.apache.catalina.valves.AccessLogValve directory=logs 
prefix=my_access_log. suffix=.txt pattern=common/

I restart the tomcat, but I don't see the post parameters being added to 
my_access_log file.

How to make it work?


--- On Thu, 5/15/08, Peter Lin [EMAIL PROTECTED] wrote:

 From: Peter Lin [EMAIL PROTECTED]
 Subject: Re: Access Log Sampler
 To: JMeter Users List jmeter-user@jakarta.apache.org
 Date: Thursday, May 15, 2008, 7:20 AM
 as long as it follows normal get format
 
 param=valueparam2=value
 
 
 
 On Thu, May 15, 2008 at 8:17 AM, sebb
 [EMAIL PROTECTED] wrote:
  I've just had a look at the code, and it does
 handle POST requests, so
  if the POSTs don't have bodies, the Access Log
 Sampler should work OK.
 
  @Peter: what format do the request parameters have to
 be in for the
  sampler to pick them up?
 
  On 15/05/2008, Peter Lin [EMAIL PROTECTED]
 wrote:
  What I've done in the past with tomcat is to
 write a request filter to
   dump the request parameters into the log.  in
 some cases, you may not
   want to do that for security reasons if
 there's sensitive data.
 
 
   peter
 
 
   On Thu, May 15, 2008 at 6:53 AM, sebb
 [EMAIL PROTECTED] wrote:
On 14/05/2008, john wu
 [EMAIL PROTECTED] wrote:
Hi All,
   
 Does Access Log Sampler support POST
 request in the log file?
   
No, because in general the access log does
 not contain all the
information needed to recreate the request -
 for example as far as I
know the access log will never contain
 details of the POST body.
   
How to set it up? In my log file, I have
 many POST request and send different parameters for each
 post request, do I have to pass all these parameters in
 HTTP Request Default?
   
   
That won't work. Defaults are fixed
 values.
   
 Thanks
   
   
   
   

 -
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
   
   
   
   
 -
To unsubscribe, e-mail:
 [EMAIL PROTECTED]
For additional commands, e-mail:
 [EMAIL PROTECTED]
   
   
 
  
 -
   To unsubscribe, e-mail:
 [EMAIL PROTECTED]
   For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 
 
 -
  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]


  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Access Log Sampler

2008-05-14 Thread john wu
Hi All,

Does Access Log Sampler support POST request in the log file? How to set it up? 
In my log file, I have many POST request and send different parameters for each 
post request, do I have to pass all these parameters in HTTP Request Default?

Thanks


  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Real traffic simulation and Access Log Sampler

2008-03-17 Thread sebb
On 12/03/2008, Oren Benjamin [EMAIL PROTECTED] wrote:
 I wrote: Ignoring users for now, I'd like to divide all the requests among

 a fixed number of threads.


 You replied: That's how the current Access Log sampler works; when the next

 sampler in a thread is executed it fetches the next line from the file. But
  as
  mentioned above this may not work for all applications.  Just adding a timed
  wait to the existing sampler should be easy.  Distributing the sessions
  amongst threads is trickier.


 Based on my testing, that is not how the current Access Log sampler works.

I've just rechecked, and it depends on which Parser you select.

The TCLogParser opens the file using Java, which allows each thread to
process the access log independently.

The other parsers use the JMeter FileServer to read the file; this
shares the file between threads.

  Let's take a concrete example.  Suppose there are 100 entries in my log and
  10 threads in my ThreadGroup.  Using Access Log Sampler with Loop Count
  set to 1 in the ThreadGroup will result in the first entry in the log being
  sampled 10 times (once by each thread).  If I increase Loop Count to 100,
  the test results in 1000 samples (each thread issues a request for every
  entry in the log).  To do a realistic simulation, we would like each entry
  in the log to be sampled only once (a total of 100 samples for the entire
  test) but we want those requests to be issued by multiple threads
  (~10/thread would be good).

Try a parser other than TCLog.

  Let's ignore users, sessions, cookies, etc. until I'm able to develop a
  solution that generates the desired behavior described above.  Even though
  the requests are distributed among the available threads somewhat
  arbitrarily, they are still executed in time order (based on the timestamp
  in the log) so the result is a fairly accurate simulation assuming a
  relatively small number of concurrent users.  I believe that would be a good
  stepping stone to get started with the plug-in development.

  Thanks again for your help and advice,


-- Oren


  On Mon, Mar 3, 2008 at 8:02 AM, sebb [EMAIL PROTECTED] wrote:

   On 03/03/2008, Oren Benjamin [EMAIL PROTECTED] wrote:
Thanks for your response.  Since, my first post, I've taken JMeter for a
 spin and was pleasantly surprised by how simple it was to set up a test
   plan
 with Access Log Sampler to play back all the requests in my log.
  
   I'm glad to hear it.
  
 I'm now ready to try and overcome the two hurdles we've discussed.  The
 first involves the timing of the requests.  Based on your response
   (the
 sampler would need to keep track of the timestamps...) I take it the
   way to
 go is to develop a custom Sampler, similar to Access Log Sampler, that
   also
 handles the timestamps in the log.  Are you recommending to accomplish
   the
 delay within the sampler itself or to create a custom Timer as well?
  
   I think it's going to be easiest to perform the delay in the sampler
   itself - but see below for other options.
  
 As for the threading, I'm not terribly concerned with simulating
   specific
 users at the moment.  It would certainly be a nice feature down the
   road,
 but for now, I'm more concerned with simply getting the requests
 multi-threaded (as I'm completely new to JMeter and JMeter development,
   I
 believe it's best to start small).
  
   Each thread represents a different user, and will have its own set of
   cookies, so mixing requests from different original users may or may
   not work, depending on the server   application.
  
 You wrote in your reply: If the total number of different users is
   known in
advance, then one can just parcel out the samples to different threads.
   
How would this be accomplished?  Would I need to build a custom
 ThreadGroup?
  
   I don't think so. That would not be trivial.
  
 I haven't yet looked at the interplay between ThreadGroup and
 Sampler.
  
   Thread Groups contain one or more threads; the each thread processes
   the test plan defined under that thread group. Samplers are processed
   as defined in the test plan.
  
Ignoring users for now, I'd like to divide all the requests among
 a fixed number of threads.
  
   That's how the current Access Log sampler works; when the next sampler
   in a thread is executed it fetches the next line from the file. But as
   mentioned above this may not work for all applications.
  
   Just adding a timed wait to the existing sampler should be easy.
  
   Distributing the sessions amongst threads is trickier.
  
 As far as the timing is concerned, I would design it as follows.  Every
 request (sample) is executed at the time indicated by its timestamp
   relative
 to the start of the test.  If no thread is available at that time, it
   is
 executed as soon as a thread becomes available.
  
   Yes, but it's the samplers that drive

Re: Real traffic simulation and Access Log Sampler

2008-03-17 Thread sebb
On 17/03/2008, sebb [EMAIL PROTECTED] wrote:
 On 12/03/2008, Oren Benjamin [EMAIL PROTECTED] wrote:
   I wrote: Ignoring users for now, I'd like to divide all the requests among
  
   a fixed number of threads.
  
  
   You replied: That's how the current Access Log sampler works; when the 
 next
  
   sampler in a thread is executed it fetches the next line from the file. But
as
mentioned above this may not work for all applications.  Just adding a 
 timed
wait to the existing sampler should be easy.  Distributing the sessions
amongst threads is trickier.
  
  
   Based on my testing, that is not how the current Access Log sampler works.


 I've just rechecked, and it depends on which Parser you select.

  The TCLogParser opens the file using Java, which allows each thread to
  process the access log independently.

  The other parsers use the JMeter FileServer to read the file; this
  shares the file between threads.


Let's take a concrete example.  Suppose there are 100 entries in my log 
 and
10 threads in my ThreadGroup.  Using Access Log Sampler with Loop Count
set to 1 in the ThreadGroup will result in the first entry in the log 
 being
sampled 10 times (once by each thread).  If I increase Loop Count to 100,
the test results in 1000 samples (each thread issues a request for every
entry in the log).  To do a realistic simulation, we would like each entry
in the log to be sampled only once (a total of 100 samples for the entire
test) but we want those requests to be issued by multiple threads
(~10/thread would be good).


 Try a parser other than TCLog.


Let's ignore users, sessions, cookies, etc. until I'm able to develop a
solution that generates the desired behavior described above.  Even though
the requests are distributed among the available threads somewhat
arbitrarily, they are still executed in time order (based on the timestamp
in the log) so the result is a fairly accurate simulation assuming a
relatively small number of concurrent users.  I believe that would be a 
 good
stepping stone to get started with the plug-in development.
  

It looks like the SessionFilter already handles Cookies across threads.
However it will cause other threads to wait if they are using the same
IP address, and it assumes that the log contains a client IP address
rather than a host name.

I'm not sure that this approach is scalable for multiple threads, and
it does not cater for multiple sessions from the same IP.

Thanks again for your help and advice,
  
  
  -- Oren
  
  
On Mon, Mar 3, 2008 at 8:02 AM, sebb [EMAIL PROTECTED] wrote:
  
 On 03/03/2008, Oren Benjamin [EMAIL PROTECTED] wrote:
  Thanks for your response.  Since, my first post, I've taken JMeter 
 for a
   spin and was pleasantly surprised by how simple it was to set up a 
 test
 plan
   with Access Log Sampler to play back all the requests in my log.

 I'm glad to hear it.

   I'm now ready to try and overcome the two hurdles we've discussed.  
 The
   first involves the timing of the requests.  Based on your response
 (the
   sampler would need to keep track of the timestamps...) I take it the
 way to
   go is to develop a custom Sampler, similar to Access Log Sampler, 
 that
 also
   handles the timestamps in the log.  Are you recommending to 
 accomplish
 the
   delay within the sampler itself or to create a custom Timer as well?

 I think it's going to be easiest to perform the delay in the sampler
 itself - but see below for other options.

   As for the threading, I'm not terribly concerned with simulating
 specific
   users at the moment.  It would certainly be a nice feature down the
 road,
   but for now, I'm more concerned with simply getting the requests
   multi-threaded (as I'm completely new to JMeter and JMeter 
 development,
 I
   believe it's best to start small).

 Each thread represents a different user, and will have its own set of
 cookies, so mixing requests from different original users may or may
 not work, depending on the server   application.

   You wrote in your reply: If the total number of different users is
 known in
  advance, then one can just parcel out the samples to different 
 threads.
 
  How would this be accomplished?  Would I need to build a custom
   ThreadGroup?

 I don't think so. That would not be trivial.

   I haven't yet looked at the interplay between ThreadGroup and
   Sampler.

 Thread Groups contain one or more threads; the each thread processes
 the test plan defined under that thread group. Samplers are processed
 as defined in the test plan.

  Ignoring users for now, I'd like to divide all the requests among
   a fixed number of threads.

 That's how the current Access Log sampler

Re: Real traffic simulation and Access Log Sampler

2008-03-12 Thread Oren Benjamin
I wrote: Ignoring users for now, I'd like to divide all the requests among
a fixed number of threads.

You replied: That's how the current Access Log sampler works; when the next
sampler in a thread is executed it fetches the next line from the file. But
as
mentioned above this may not work for all applications.  Just adding a timed
wait to the existing sampler should be easy.  Distributing the sessions
amongst threads is trickier.

Based on my testing, that is not how the current Access Log sampler works.
Let's take a concrete example.  Suppose there are 100 entries in my log and
10 threads in my ThreadGroup.  Using Access Log Sampler with Loop Count
set to 1 in the ThreadGroup will result in the first entry in the log being
sampled 10 times (once by each thread).  If I increase Loop Count to 100,
the test results in 1000 samples (each thread issues a request for every
entry in the log).  To do a realistic simulation, we would like each entry
in the log to be sampled only once (a total of 100 samples for the entire
test) but we want those requests to be issued by multiple threads
(~10/thread would be good).

Let's ignore users, sessions, cookies, etc. until I'm able to develop a
solution that generates the desired behavior described above.  Even though
the requests are distributed among the available threads somewhat
arbitrarily, they are still executed in time order (based on the timestamp
in the log) so the result is a fairly accurate simulation assuming a
relatively small number of concurrent users.  I believe that would be a good
stepping stone to get started with the plug-in development.

Thanks again for your help and advice,

   -- Oren

On Mon, Mar 3, 2008 at 8:02 AM, sebb [EMAIL PROTECTED] wrote:

 On 03/03/2008, Oren Benjamin [EMAIL PROTECTED] wrote:
  Thanks for your response.  Since, my first post, I've taken JMeter for a
   spin and was pleasantly surprised by how simple it was to set up a test
 plan
   with Access Log Sampler to play back all the requests in my log.

 I'm glad to hear it.

   I'm now ready to try and overcome the two hurdles we've discussed.  The
   first involves the timing of the requests.  Based on your response
 (the
   sampler would need to keep track of the timestamps...) I take it the
 way to
   go is to develop a custom Sampler, similar to Access Log Sampler, that
 also
   handles the timestamps in the log.  Are you recommending to accomplish
 the
   delay within the sampler itself or to create a custom Timer as well?

 I think it's going to be easiest to perform the delay in the sampler
 itself - but see below for other options.

   As for the threading, I'm not terribly concerned with simulating
 specific
   users at the moment.  It would certainly be a nice feature down the
 road,
   but for now, I'm more concerned with simply getting the requests
   multi-threaded (as I'm completely new to JMeter and JMeter development,
 I
   believe it's best to start small).

 Each thread represents a different user, and will have its own set of
 cookies, so mixing requests from different original users may or may
 not work, depending on the server   application.

   You wrote in your reply: If the total number of different users is
 known in
  advance, then one can just parcel out the samples to different threads.
 
  How would this be accomplished?  Would I need to build a custom
   ThreadGroup?

 I don't think so. That would not be trivial.

   I haven't yet looked at the interplay between ThreadGroup and
   Sampler.

 Thread Groups contain one or more threads; the each thread processes
 the test plan defined under that thread group. Samplers are processed
 as defined in the test plan.

  Ignoring users for now, I'd like to divide all the requests among
   a fixed number of threads.

 That's how the current Access Log sampler works; when the next sampler
 in a thread is executed it fetches the next line from the file. But as
 mentioned above this may not work for all applications.

 Just adding a timed wait to the existing sampler should be easy.

 Distributing the sessions amongst threads is trickier.

   As far as the timing is concerned, I would design it as follows.  Every
   request (sample) is executed at the time indicated by its timestamp
 relative
   to the start of the test.  If no thread is available at that time, it
 is
   executed as soon as a thread becomes available.

 Yes, but it's the samplers that drive the test.
 They need to ask for the data - or at least indicate that they are
 ready for the data.

 Each thread could maintain its own file reader, but that does not scale
 well.

 It looks like one could perhaps use an NIO FileChannel and use
 position() to keep track of the position of each thread. I don't know
 if that would scale well.

 To avoid the problem of multiple file readers, there could be a queue
 for each sampler, and a separate reader thread that put the samples on
 the queue.

 The reader thread would need to keep track of which sampler

Re: Real traffic simulation and Access Log Sampler

2008-03-03 Thread sebb
On 03/03/2008, Oren Benjamin [EMAIL PROTECTED] wrote:
 Thanks for your response.  Since, my first post, I've taken JMeter for a
  spin and was pleasantly surprised by how simple it was to set up a test plan
  with Access Log Sampler to play back all the requests in my log.

I'm glad to hear it.

  I'm now ready to try and overcome the two hurdles we've discussed.  The
  first involves the timing of the requests.  Based on your response (the
  sampler would need to keep track of the timestamps...) I take it the way to
  go is to develop a custom Sampler, similar to Access Log Sampler, that also
  handles the timestamps in the log.  Are you recommending to accomplish the
  delay within the sampler itself or to create a custom Timer as well?

I think it's going to be easiest to perform the delay in the sampler
itself - but see below for other options.

  As for the threading, I'm not terribly concerned with simulating specific
  users at the moment.  It would certainly be a nice feature down the road,
  but for now, I'm more concerned with simply getting the requests
  multi-threaded (as I'm completely new to JMeter and JMeter development, I
  believe it's best to start small).

Each thread represents a different user, and will have its own set of
cookies, so mixing requests from different original users may or may
not work, depending on the server   application.

  You wrote in your reply: If the total number of different users is known in
 advance, then one can just parcel out the samples to different threads.

 How would this be accomplished?  Would I need to build a custom
  ThreadGroup?

I don't think so. That would not be trivial.

  I haven't yet looked at the interplay between ThreadGroup and
  Sampler.

Thread Groups contain one or more threads; the each thread processes
the test plan defined under that thread group. Samplers are processed
as defined in the test plan.

 Ignoring users for now, I'd like to divide all the requests among
  a fixed number of threads.

That's how the current Access Log sampler works; when the next sampler
in a thread is executed it fetches the next line from the file. But as
mentioned above this may not work for all applications.

Just adding a timed wait to the existing sampler should be easy.

Distributing the sessions amongst threads is trickier.

  As far as the timing is concerned, I would design it as follows.  Every
  request (sample) is executed at the time indicated by its timestamp relative
  to the start of the test.  If no thread is available at that time, it is
  executed as soon as a thread becomes available.

Yes, but it's the samplers that drive the test.
They need to ask for the data - or at least indicate that they are
ready for the data.

Each thread could maintain its own file reader, but that does not scale well.

It looks like one could perhaps use an NIO FileChannel and use
position() to keep track of the position of each thread. I don't know
if that would scale well.

To avoid the problem of multiple file readers, there could be a queue
for each sampler, and a separate reader thread that put the samples on
the queue.

The reader thread would need to keep track of which sampler thread was
handling each session (and which threads were free). It would also
need to handle the timing, otherwise for a large file the queues would
grow a lot. [The queue items could contain the desired start-time and
the sampler could log a warning if it was picked up late]

  As for sample logs, the Common Log Format (or indeed any log format) is fine
  as I can always run my logs through a preprocessing script before loading
  them into JMeter.  The important thing is that the entire request and the
  corresponding timestamp are contained in the log entry.

Yes, and if it's important that different sessions are processed by
different threads then there needs to be some unique id that can be
used to distinguish the sessions.

  Thanks again for your advice,

-- Oren


  On Sat, Mar 1, 2008 at 1:05 PM, sebb [EMAIL PROTECTED] wrote:

   On 29/02/2008, Oren Benjamin [EMAIL PROTECTED] wrote:
For the purposes of stress testing and troubleshooting a large scale
 multi-tiered web application, we are looking to build a test
   environment in
 which we can recreate any scenario that occurs in production with very
   high
 fidelity.  To that end, we plan to replay the production server
   access
 logs by sending identical requests to the test environment at the same
 points in time (relative to the start of the test).  Furthermore, we
   would
 like the requests to be sent from multiple threads to simulate multiple
 users making the requests asynchronously.
   
 I'm looking into the use of JMeter for our purposes.  From what I see
   it
 provides great reporting facilities, test abstractions, and a flexible
 architecture.  The Access Log Sampler seems like the logical starting
   point,
 but from reading the documentation

Re: Real traffic simulation and Access Log Sampler

2008-03-02 Thread Oren Benjamin
Thanks for your response.  Since, my first post, I've taken JMeter for a
spin and was pleasantly surprised by how simple it was to set up a test plan
with Access Log Sampler to play back all the requests in my log.

I'm now ready to try and overcome the two hurdles we've discussed.  The
first involves the timing of the requests.  Based on your response (the
sampler would need to keep track of the timestamps...) I take it the way to
go is to develop a custom Sampler, similar to Access Log Sampler, that also
handles the timestamps in the log.  Are you recommending to accomplish the
delay within the sampler itself or to create a custom Timer as well?

As for the threading, I'm not terribly concerned with simulating specific
users at the moment.  It would certainly be a nice feature down the road,
but for now, I'm more concerned with simply getting the requests
multi-threaded (as I'm completely new to JMeter and JMeter development, I
believe it's best to start small).

You wrote in your reply: If the total number of different users is known in
advance, then one can just parcel out the samples to different threads.
How would this be accomplished?  Would I need to build a custom
ThreadGroup?  I haven't yet looked at the interplay between ThreadGroup and
Sampler.  Ignoring users for now, I'd like to divide all the requests among
a fixed number of threads.

As far as the timing is concerned, I would design it as follows.  Every
request (sample) is executed at the time indicated by its timestamp relative
to the start of the test.  If no thread is available at that time, it is
executed as soon as a thread becomes available.

As for sample logs, the Common Log Format (or indeed any log format) is fine
as I can always run my logs through a preprocessing script before loading
them into JMeter.  The important thing is that the entire request and the
corresponding timestamp are contained in the log entry.

Thanks again for your advice,

   -- Oren

On Sat, Mar 1, 2008 at 1:05 PM, sebb [EMAIL PROTECTED] wrote:

 On 29/02/2008, Oren Benjamin [EMAIL PROTECTED] wrote:
  For the purposes of stress testing and troubleshooting a large scale
   multi-tiered web application, we are looking to build a test
 environment in
   which we can recreate any scenario that occurs in production with very
 high
   fidelity.  To that end, we plan to replay the production server
 access
   logs by sending identical requests to the test environment at the same
   points in time (relative to the start of the test).  Furthermore, we
 would
   like the requests to be sent from multiple threads to simulate multiple
   users making the requests asynchronously.
 
   I'm looking into the use of JMeter for our purposes.  From what I see
 it
   provides great reporting facilities, test abstractions, and a flexible
   architecture.  The Access Log Sampler seems like the logical starting
 point,
   but from reading the documentation and other threads on the mailing
 list, it
   looks like we're going to have to extend it quite a bit to meet or
 needs.
 
   Here are the issues I've found so far:
 
   1) Access Log Sampler ignores the time stamp of the log entries and the
   Timer mechanism is designed for delays as opposed to alarms.  This
 would
   make it difficult to accurately simulate the timing of the requests in
 the
   log.

 This should be easy enough to implement.

 The sampler would need to keep track of the timestamps for each
 request it issues in a thread, and add a time delay as necessary.

 There would probably need to be some way of reporting if the desired
 start time has been exceeded.

 Also need to decide if the wait times should be relative to the
 previous sample or the start of the test. Or maybe make that optional?

   2) According to the ThreadGroup documentation,  each thread will
 execute
   the test plan in its entirety.  This is not we want, since we are
 looking
   to distribute the requests in the log among multiple threads.

 Yes, that is a problem currently.

 There are two aspects to this:
 - does the log contain sufficient information to be able to
 distinguish different users?
 - how to use this information in JMeter.

 It should be fairly easy to implement a filter to ignore all but one
 user/session when replaying a log.

 It gets a lot more tricky when multiple users are involved, as
 different users need different threads.

 If the total number of different users is known in advance, then one
 can just parcel out the samples to different threads. This may be
 sufficient for some cases.

 However, where there are too many different users to have a thread
 each, then JMeter needs to know when a given user has finished; it can
 then re-use the thread for another user. For a particular application,
 it may be possible to specify this, either as a specific entry in the
 log, or perhaps as a timeout since the last request.

   Any advice regarding whether JMeter is appropriate to this task and
 ideas
   related

Re: Real traffic simulation and Access Log Sampler

2008-03-01 Thread sebb
On 29/02/2008, Oren Benjamin [EMAIL PROTECTED] wrote:
 For the purposes of stress testing and troubleshooting a large scale
  multi-tiered web application, we are looking to build a test environment in
  which we can recreate any scenario that occurs in production with very high
  fidelity.  To that end, we plan to replay the production server access
  logs by sending identical requests to the test environment at the same
  points in time (relative to the start of the test).  Furthermore, we would
  like the requests to be sent from multiple threads to simulate multiple
  users making the requests asynchronously.

  I'm looking into the use of JMeter for our purposes.  From what I see it
  provides great reporting facilities, test abstractions, and a flexible
  architecture.  The Access Log Sampler seems like the logical starting point,
  but from reading the documentation and other threads on the mailing list, it
  looks like we're going to have to extend it quite a bit to meet or needs.

  Here are the issues I've found so far:

  1) Access Log Sampler ignores the time stamp of the log entries and the
  Timer mechanism is designed for delays as opposed to alarms.  This would
  make it difficult to accurately simulate the timing of the requests in the
  log.

This should be easy enough to implement.

The sampler would need to keep track of the timestamps for each
request it issues in a thread, and add a time delay as necessary.

There would probably need to be some way of reporting if the desired
start time has been exceeded.

Also need to decide if the wait times should be relative to the
previous sample or the start of the test. Or maybe make that optional?

  2) According to the ThreadGroup documentation,  each thread will execute
  the test plan in its entirety.  This is not we want, since we are looking
  to distribute the requests in the log among multiple threads.

Yes, that is a problem currently.

There are two aspects to this:
- does the log contain sufficient information to be able to
distinguish different users?
- how to use this information in JMeter.

It should be fairly easy to implement a filter to ignore all but one
user/session when replaying a log.

It gets a lot more tricky when multiple users are involved, as
different users need different threads.

If the total number of different users is known in advance, then one
can just parcel out the samples to different threads. This may be
sufficient for some cases.

However, where there are too many different users to have a thread
each, then JMeter needs to know when a given user has finished; it can
then re-use the thread for another user. For a particular application,
it may be possible to specify this, either as a specific entry in the
log, or perhaps as a timeout since the last request.

  Any advice regarding whether JMeter is appropriate to this task and ideas
  related to the design of the test plan and any necessary plug-ins/extensions
  would be greatly appreciated.  From my limited investigation, it seems that
  this is a scenario that many groups are looking to implement, but no
  standard solution has been developed.


Specific use cases - with details of corresponding log file entries -
might help to determine if there are standard patterns that JMeter
could use.

Perhaps it would be worth setting up a Wiki page with examples?

  Your feedback is much appreciated,


 -- Oren


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Real traffic simulation and Access Log Sampler

2008-02-28 Thread Oren Benjamin
For the purposes of stress testing and troubleshooting a large scale
multi-tiered web application, we are looking to build a test environment in
which we can recreate any scenario that occurs in production with very high
fidelity.  To that end, we plan to replay the production server access
logs by sending identical requests to the test environment at the same
points in time (relative to the start of the test).  Furthermore, we would
like the requests to be sent from multiple threads to simulate multiple
users making the requests asynchronously.

I'm looking into the use of JMeter for our purposes.  From what I see it
provides great reporting facilities, test abstractions, and a flexible
architecture.  The Access Log Sampler seems like the logical starting point,
but from reading the documentation and other threads on the mailing list, it
looks like we're going to have to extend it quite a bit to meet or needs.

Here are the issues I've found so far:

1) Access Log Sampler ignores the time stamp of the log entries and the
Timer mechanism is designed for delays as opposed to alarms.  This would
make it difficult to accurately simulate the timing of the requests in the
log.

2) According to the ThreadGroup documentation,  each thread will execute
the test plan in its entirety.  This is not we want, since we are looking
to distribute the requests in the log among multiple threads.

Any advice regarding whether JMeter is appropriate to this task and ideas
related to the design of the test plan and any necessary plug-ins/extensions
would be greatly appreciated.  From my limited investigation, it seems that
this is a scenario that many groups are looking to implement, but no
standard solution has been developed.

Your feedback is much appreciated,

-- Oren


Access Log Sampler

2008-01-04 Thread Christian Hufgard
Hi everyone,

I am the new guy on this list. :)

I just tried to set up and use the access log sampler and cannot get it 
working. I followed this tutorial: 
http://jakarta.apache.org/jmeter/usermanual/jmeter_accesslog_sampler_step_by_step.pdf

The behaviour I am expecting is, that the sampler always reads the first entry 
from the log, processes the request and stops working.

How do I get the sampler to process all querys from my log?

Christian

-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Access Log Sampler

2008-01-04 Thread Peter Lin
change the number of iterations to 1, if you just want it to read the first
line.

the purpose of the accesslog sampler is to take a huge log file with
hundreds of thousands of requests and run a simulation of actual production
traffic.

peter

On Jan 4, 2008 6:06 AM, Christian Hufgard [EMAIL PROTECTED] wrote:

 Hi everyone,

 I am the new guy on this list. :)

 I just tried to set up and use the access log sampler and cannot get it
 working. I followed this tutorial:

 http://jakarta.apache.org/jmeter/usermanual/jmeter_accesslog_sampler_step_by_step.pdf

 The behaviour I am expecting is, that the sampler always reads the first
 entry from the log, processes the request and stops working.

 How do I get the sampler to process all querys from my log?

 Christian

 --
 Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
 Browser-Versionen downloaden: http://www.gmx.net/de/go/browser

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Access Log Sampler

2008-01-04 Thread Peter Lin
if you want a delay between requests, add a timer.

when I wrote the sampler, it was to run a large number of requests. In my
case, I took a sample log of 50K and set jmeter to run for 1million
iterations

I added a timer to produce the desired concurrent requests per second.

peter

On Jan 4, 2008 9:50 AM, Christian Hufgard [EMAIL PROTECTED] wrote:

  change the number of iterations to 1, if you just want it to read the
 first
  line.

 I want the exact oposite. :)

 If I increase the number of iterations, does the sampler take respect of
 the delay between the single requests? And how does it handle concurrent
 requests?

 Christian


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Access Log Sampler

2008-01-04 Thread Christian Hufgard
 change the number of iterations to 1, if you just want it to read the first
 line.

I want the exact oposite. :)

If I increase the number of iterations, does the sampler take respect of
the delay between the single requests? And how does it handle concurrent
requests?

Christian


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Access Log Sampler

2008-01-04 Thread Christian Hufgard
 when I wrote the sampler, it was to run a large number of requests. In my
 case, I took a sample log of 50K and set jmeter to run for 1million
 iterations

Ah ok. My problem is some more weird. I have to simulate peaks with
response-times up to 30 seconds. Then some minutes with one or two
requests, than another peak. The application has an interesting load
profile. :)


 I added a timer to produce the desired concurrent requests per second.

So you used parallel thread groups?

I think I will extend the AccessLogSampler to my needs (parallel unique
requests with different threads with a timer that is fed from the access
log.

Thank you for your answers!

Christian


P.S. Was there already the thought to add a progressbar to jmeter during
startup? On my development machine (dual core, lot of ram), I takes
awful time to start up during that I see only a grey background...

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Access Log Sampler

2008-01-04 Thread Peter Lin
you can use multiple thread groups and control each one with a timer, though
the timing is probably going to vary depending on how fast the server
responds.

at best, jmeter will try to simulate peak load and lull load.

a simple way would be to create 10 thread groups and have some thread groups
set to a longer interval.

peter

On Jan 4, 2008 10:10 AM, Christian Hufgard [EMAIL PROTECTED] wrote:

  when I wrote the sampler, it was to run a large number of requests. In
 my
  case, I took a sample log of 50K and set jmeter to run for 1million
  iterations

 Ah ok. My problem is some more weird. I have to simulate peaks with
 response-times up to 30 seconds. Then some minutes with one or two
 requests, than another peak. The application has an interesting load
 profile. :)


  I added a timer to produce the desired concurrent requests per second.

 So you used parallel thread groups?

 I think I will extend the AccessLogSampler to my needs (parallel unique
 requests with different threads with a timer that is fed from the access
 log.

 Thank you for your answers!

 Christian


 P.S. Was there already the thought to add a progressbar to jmeter during
 startup? On my development machine (dual core, lot of ram), I takes
 awful time to start up during that I see only a grey background...

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Access Log Sampler

2008-01-04 Thread Peter Lin
that's tricky :)

exactly as possible will never be exactly what happened in production. the
best one can hope for is the same traffic loads and patterns.

from your comments so far, it sounds like you want to reproduce a sudden
traffic spike to see what happens on the server and possible see how long it
takes for the server to recover under normal loads. Is that correct?

peter

On Jan 4, 2008 10:53 AM, Christian Hufgard [EMAIL PROTECTED] wrote:

  you can use multiple thread groups and control each one with a timer,
 though
  the timing is probably going to vary depending on how fast the server
  responds.
 
  at best, jmeter will try to simulate peak load and lull load.
 
  a simple way would be to create 10 thread groups and have some thread
 groups
  set to a longer interval.

 Well, that would work. But my task is to reproduce the load as exactly
 as possible. I thaught, the access log sampler could do this.


 Christian

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Access Log Sampler

2008-01-04 Thread Peter Lin
in that case, if you get a rough approximation of the traffic pattern, you
should be able to run it multiple times and get comparable results.

peter

On Jan 4, 2008 11:13 AM, Christian Hufgard [EMAIL PROTECTED] wrote:

  exactly as possible will never be exactly what happened in production.
 the
  best one can hope for is the same traffic loads and patterns.

 Yes, I had to add some patterns and I hoped, I could do this easier with
 this Sampler.

 from your comments so far, it sounds like you want to reproduce a sudden
  traffic spike to see what happens on the server and possible see how
 long it
  takes for the server to recover under normal loads. Is that correct?

 Kind of. In deed I do not want to test not my server but some backends
 it contacts. Of course it would be easier to directly contact them. But
 the customer wants to see the behaviour of the whole system (we exchange
 one backend with another)

 Christian

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Access Log Sampler

2008-01-04 Thread Christian Hufgard
 you can use multiple thread groups and control each one with a timer, though
 the timing is probably going to vary depending on how fast the server
 responds.
 
 at best, jmeter will try to simulate peak load and lull load.
 
 a simple way would be to create 10 thread groups and have some thread groups
 set to a longer interval.

Well, that would work. But my task is to reproduce the load as exactly
as possible. I thaught, the access log sampler could do this.


Christian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Access Log Sampler

2008-01-04 Thread Christian Hufgard
 exactly as possible will never be exactly what happened in production. the
 best one can hope for is the same traffic loads and patterns.

Yes, I had to add some patterns and I hoped, I could do this easier with
this Sampler.

from your comments so far, it sounds like you want to reproduce a sudden
 traffic spike to see what happens on the server and possible see how long it
 takes for the server to recover under normal loads. Is that correct?

Kind of. In deed I do not want to test not my server but some backends
it contacts. Of course it would be easier to directly contact them. But
the customer wants to see the behaviour of the whole system (we exchange
one backend with another)

Christian

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: POST requests with Access Log Sampler

2007-07-05 Thread Yuval Kantor
I'm using Access Log Sampler, and I don't think it can send POST
requests (it also can't tell from the log what arguments to send), so
using HTTP Request Defaults won't help.


-Original Message-
From: sebb [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 04, 2007 4:59 PM
To: JMeter Users List
Subject: Re: POST requests with Access Log Sampler

Have you tried Http Request Defaults?

On 04/07/07, Yuval Kantor [EMAIL PROTECTED] wrote:
 Hello everybody,



 I would like to test a site using the Access Log Sampler.

 The problem is that about 5% of the HTTP requests are POST method.

 The Access Log Sampler can't send those requests since the POST
 arguments are not saved in the access log.

 I thought of sending default stubs when the sampler encounters a line
 with a POST , but I don't know how.



 Any Ideas?



 Thank you,

 Yuval



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



POST requests with Access Log Sampler

2007-07-04 Thread Yuval Kantor
Hello everybody, 

 

I would like to test a site using the Access Log Sampler.

The problem is that about 5% of the HTTP requests are POST method. 

The Access Log Sampler can't send those requests since the POST
arguments are not saved in the access log.

I thought of sending default stubs when the sampler encounters a line
with a POST , but I don't know how. 

 

Any Ideas?

 

Thank you,

Yuval



Re: POST requests with Access Log Sampler

2007-07-04 Thread sebb

Have you tried Http Request Defaults?

On 04/07/07, Yuval Kantor [EMAIL PROTECTED] wrote:

Hello everybody,



I would like to test a site using the Access Log Sampler.

The problem is that about 5% of the HTTP requests are POST method.

The Access Log Sampler can't send those requests since the POST
arguments are not saved in the access log.

I thought of sending default stubs when the sampler encounters a line
with a POST , but I don't know how.



Any Ideas?



Thank you,

Yuval




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Access log sampler : IllegalArgumentException: URI can't be null

2006-03-30 Thread Mikael Andersson
Hi

I am encountering a problem when using Access log sampler with apache log
files. I followed Access log sampler Step-by-step turorial (
http://jakarta.apache.org/jmeter/usermanual/jmeter_accesslog_sampler_step_by_step.pdf),
but still can not get it to work.

Test Structure:
-Test Plan
  -ThreadGroup
-Uniform random timer
- Access Log Sampler
- Aggregate Report

Some jmeter.log content:
2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Preparing class
org.apache.jmeter.protocol.http.sampler.AccessLogSampler
2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting domain=
http://web1.ebi.ac.uk
2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
portString=8550
2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
imageParsing=false
2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
parserClassName=org.apache.jmeter.protocol.http.util.accesslog.TCLogParser
2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
filterClassName=org.apache.jmeter.protocol.http.util.accesslog.LogFilter
2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
logFile=/scratch/usr/jmeter_work/log_dbfetch_get
2006/03/30 19:06:35 DEBUG - jmeter.protocol.http.util.accesslog.TCLogParser:
parsing line: web-nat-250-2.web-nat.ebi.ac.uk - - [29/Mar/2006:23:59:20
+0100] GET /Tools/dbfetch/dbfetch?db=emblid=NM_007045style=raw HTTP/1.0
200 19 - lwp-trivial/1.40
2006/03/30 19:06:35 DEBUG - jmeter.protocol.http.util.accesslog.TCLogParser:
filter is not null
2006/03/30 19:06:35 DEBUG - jmeter.protocol.http.util.accesslog.TCLogParser:
line was not filtered
2006/03/30 19:06:35 DEBUG - jmeter.protocol.http.sampler.HTTPSamplerBase:
adding argument: name: db value: embl metaData: =
2006/03/30 19:06:35 DEBUG - jmeter.protocol.http.sampler.HTTPSamplerBase:
adding argument: name: id value: NM_007045 metaData: =
2006/03/30 19:06:35 DEBUG - jmeter.protocol.http.sampler.HTTPSamplerBase:
adding argument: name: style value: raw metaData: =
2006/03/30 19:06:35 DEBUG - jmeter.protocol.http.sampler.HTTPSampler: Start
: samplehttp://[
http://web1.ebi.ac.uk]:8550/Tools/dbfetch/dbfetch?db=emblid=NM_007045style=raw
2006/03/30 19:06:35 WARN  - jmeter.protocol.http.sampler.AccessLogSampler:
Sampling failure java.lang.IllegalArgumentException: URI can't be null.
at sun.net.spi.DefaultProxySelector.select(DefaultProxySelector.java
:111)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(
HttpURLConnection.java:739)
at sun.net.www.protocol.http.HttpURLConnection.connect(
HttpURLConnection.java:669)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(
HttpURLConnection.java:913)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(
HttpURLConnection.java:1866)
at org.apache.jmeter.protocol.http.sampler.HTTPSampler.disconnect(
HTTPSampler.java:510)
at org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(
HTTPSampler.java:504)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(
HTTPSamplerBase.java:514)
at
org.apache.jmeter.protocol.http.sampler.AccessLogSampler.sampleWithParser(
AccessLogSampler.java:161)
at org.apache.jmeter.protocol.http.sampler.AccessLogSampler.sample(
AccessLogSampler.java:178)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:247)
at java.lang.Thread.run(Thread.java:595)


Grateful for any help.
Cheers,
Mikael


Re: Access log sampler : IllegalArgumentException: URI can't be null

2006-03-30 Thread Peter Lin
are you going to a proxy by any chance?  the error shows it might be proxy
related.

peter


On 3/30/06, Mikael Andersson [EMAIL PROTECTED] wrote:

 Hi

 I am encountering a problem when using Access log sampler with apache log
 files. I followed Access log sampler Step-by-step turorial (

 http://jakarta.apache.org/jmeter/usermanual/jmeter_accesslog_sampler_step_by_step.pdf
 ),
 but still can not get it to work.

 Test Structure:
 -Test Plan
   -ThreadGroup
 -Uniform random timer
 - Access Log Sampler
 - Aggregate Report

 Some jmeter.log content:
 2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Preparing
 class
 org.apache.jmeter.protocol.http.sampler.AccessLogSampler
 2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
 domain=
 http://web1.ebi.ac.uk
 2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
 portString=8550
 2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
 imageParsing=false
 2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
 parserClassName=org.apache.jmeter.protocol.http.util.accesslog.TCLogParser
 2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
 filterClassName=org.apache.jmeter.protocol.http.util.accesslog.LogFilter
 2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
 logFile=/scratch/usr/jmeter_work/log_dbfetch_get
 2006/03/30 19:06:35 DEBUG -
 jmeter.protocol.http.util.accesslog.TCLogParser:
 parsing line: web-nat-250-2.web-nat.ebi.ac.uk - - [29/Mar/2006:23:59:20
 +0100] GET /Tools/dbfetch/dbfetch?db=emblid=NM_007045style=raw
 HTTP/1.0
 200 19 - lwp-trivial/1.40
 2006/03/30 19:06:35 DEBUG -
 jmeter.protocol.http.util.accesslog.TCLogParser:
 filter is not null
 2006/03/30 19:06:35 DEBUG -
 jmeter.protocol.http.util.accesslog.TCLogParser:
 line was not filtered
 2006/03/30 19:06:35 DEBUG - jmeter.protocol.http.sampler.HTTPSamplerBase:
 adding argument: name: db value: embl metaData: =
 2006/03/30 19:06:35 DEBUG - jmeter.protocol.http.sampler.HTTPSamplerBase:
 adding argument: name: id value: NM_007045 metaData: =
 2006/03/30 19:06:35 DEBUG - jmeter.protocol.http.sampler.HTTPSamplerBase:
 adding argument: name: style value: raw metaData: =
 2006/03/30 19:06:35 DEBUG - jmeter.protocol.http.sampler.HTTPSampler:
 Start
 : samplehttp://[

 http://web1.ebi.ac.uk]:8550/Tools/dbfetch/dbfetch?db=emblid=NM_007045style=raw
 2006/03/30 19:06:35 WARN  - jmeter.protocol.http.sampler.AccessLogSampler:
 Sampling failure java.lang.IllegalArgumentException: URI can't be null.
 at sun.net.spi.DefaultProxySelector.select(
 DefaultProxySelector.java
 :111)
 at sun.net.www.protocol.http.HttpURLConnection.plainConnect(
 HttpURLConnection.java:739)
 at sun.net.www.protocol.http.HttpURLConnection.connect(
 HttpURLConnection.java:669)
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(
 HttpURLConnection.java:913)
 at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(
 HttpURLConnection.java:1866)
 at org.apache.jmeter.protocol.http.sampler.HTTPSampler.disconnect(
 HTTPSampler.java:510)
 at org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(
 HTTPSampler.java:504)
 at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(
 HTTPSamplerBase.java:514)
 at
 org.apache.jmeter.protocol.http.sampler.AccessLogSampler.sampleWithParser(
 AccessLogSampler.java:161)
 at org.apache.jmeter.protocol.http.sampler.AccessLogSampler.sample
 (
 AccessLogSampler.java:178)
 at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java
 :247)
 at java.lang.Thread.run(Thread.java:595)


 Grateful for any help.
 Cheers,
 Mikael




Re: Access log sampler : IllegalArgumentException: URI can't be null

2006-03-30 Thread Mikael Andersson
Hi,
your email got me thinking about how I specify the hostname and I had
http:// included in the name..
Removed http:// and only kept the host name, that removed the previous error
:) Thanks!

But now I have anothe question, how to I run through the entire log file? My
current project structure only seem to run one query, I thought the Access
log sampler would iterate over the entire log?


On 30/03/06, Peter Lin [EMAIL PROTECTED] wrote:

 are you going to a proxy by any chance?  the error shows it might be proxy
 related.

 peter


 On 3/30/06, Mikael Andersson [EMAIL PROTECTED] wrote:
 
  Hi
 
  I am encountering a problem when using Access log sampler with apache
 log
  files. I followed Access log sampler Step-by-step turorial (
 
 
 http://jakarta.apache.org/jmeter/usermanual/jmeter_accesslog_sampler_step_by_step.pdf
  ),
  but still can not get it to work.
 
  Test Structure:
  -Test Plan
-ThreadGroup
  -Uniform random timer
  - Access Log Sampler
  - Aggregate Report
 
  Some jmeter.log content:
  2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Preparing
  class
  org.apache.jmeter.protocol.http.sampler.AccessLogSampler
  2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
  domain=
  http://web1.ebi.ac.uk
  2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
  portString=8550
  2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
  imageParsing=false
  2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
  parserClassName=
 org.apache.jmeter.protocol.http.util.accesslog.TCLogParser
  2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
  filterClassName=org.apache.jmeter.protocol.http.util.accesslog.LogFilter
  2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
  logFile=/scratch/usr/jmeter_work/log_dbfetch_get
  2006/03/30 19:06:35 DEBUG -
  jmeter.protocol.http.util.accesslog.TCLogParser:
  parsing line: web-nat-250-2.web-nat.ebi.ac.uk - - [29/Mar/2006:23:59:20
  +0100] GET /Tools/dbfetch/dbfetch?db=emblid=NM_007045style=raw
  HTTP/1.0
  200 19 - lwp-trivial/1.40
  2006/03/30 19:06:35 DEBUG -
  jmeter.protocol.http.util.accesslog.TCLogParser:
  filter is not null
  2006/03/30 19:06:35 DEBUG -
  jmeter.protocol.http.util.accesslog.TCLogParser:
  line was not filtered
  2006/03/30 19:06:35 DEBUG - jmeter.protocol.http.sampler.HTTPSamplerBase
 :
  adding argument: name: db value: embl metaData: =
  2006/03/30 19:06:35 DEBUG - jmeter.protocol.http.sampler.HTTPSamplerBase
 :
  adding argument: name: id value: NM_007045 metaData: =
  2006/03/30 19:06:35 DEBUG - jmeter.protocol.http.sampler.HTTPSamplerBase
 :
  adding argument: name: style value: raw metaData: =
  2006/03/30 19:06:35 DEBUG - jmeter.protocol.http.sampler.HTTPSampler:
  Start
  : samplehttp://[
 
 
 http://web1.ebi.ac.uk]:8550/Tools/dbfetch/dbfetch?db=emblid=NM_007045style=raw
  2006/03/30 19:06:35 WARN  -
 jmeter.protocol.http.sampler.AccessLogSampler:
  Sampling failure java.lang.IllegalArgumentException: URI can't be null.
  at sun.net.spi.DefaultProxySelector.select(
  DefaultProxySelector.java
  :111)
  at sun.net.www.protocol.http.HttpURLConnection.plainConnect(
  HttpURLConnection.java:739)
  at sun.net.www.protocol.http.HttpURLConnection.connect(
  HttpURLConnection.java:669)
  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(
  HttpURLConnection.java:913)
  at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(
  HttpURLConnection.java:1866)
  at
 org.apache.jmeter.protocol.http.sampler.HTTPSampler.disconnect(
  HTTPSampler.java:510)
  at org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(
  HTTPSampler.java:504)
  at
 org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(
  HTTPSamplerBase.java:514)
  at
 
 org.apache.jmeter.protocol.http.sampler.AccessLogSampler.sampleWithParser(
  AccessLogSampler.java:161)
  at
 org.apache.jmeter.protocol.http.sampler.AccessLogSampler.sample
  (
  AccessLogSampler.java:178)
  at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java
  :247)
  at java.lang.Thread.run(Thread.java:595)
 
 
  Grateful for any help.
  Cheers,
  Mikael
 
 




Re: Access log sampler : IllegalArgumentException: URI can't be null

2006-03-30 Thread Mikael Andersson
Sorry, I was a bit to lazy there (rtfm on me)!

Tried adding a Loop controller and setting the Sampler as child, which
worked.

- Mikael

On 30/03/06, Mikael Andersson [EMAIL PROTECTED] wrote:

 Hi,
 your email got me thinking about how I specify the hostname and I had
 http:// included in the name..
 Removed http:// and only kept the host name, that removed the previous
 error :) Thanks!

 But now I have anothe question, how to I run through the entire log file?
 My current project structure only seem to run one query, I thought the
 Access log sampler would iterate over the entire log?



 On 30/03/06, Peter Lin [EMAIL PROTECTED] wrote:
 
  are you going to a proxy by any chance?  the error shows it might be
  proxy
  related.
 
  peter
 
 
  On 3/30/06, Mikael Andersson [EMAIL PROTECTED] wrote:
  
   Hi
  
   I am encountering a problem when using Access log sampler with apache
  log
   files. I followed Access log sampler Step-by-step turorial (
  
  
  http://jakarta.apache.org/jmeter/usermanual/jmeter_accesslog_sampler_step_by_step.pdf
   ),
   but still can not get it to work.
  
   Test Structure:
   -Test Plan
 -ThreadGroup
   -Uniform random timer
   - Access Log Sampler
   - Aggregate Report
  
   Some jmeter.log content:
   2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Preparing
   class
   org.apache.jmeter.protocol.http.sampler.AccessLogSampler
   2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
   domain=
   http://web1.ebi.ac.uk
   2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper : Setting
   portString=8550
   2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
   imageParsing=false
   2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
   parserClassName=
  org.apache.jmeter.protocol.http.util.accesslog.TCLogParser
   2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
   filterClassName=
  org.apache.jmeter.protocol.http.util.accesslog.LogFilter
   2006/03/30 19:06:35 DEBUG - jmeter.testbeans.TestBeanHelper: Setting
   logFile=/scratch/usr/jmeter_work/log_dbfetch_get
   2006/03/30 19:06:35 DEBUG -
   jmeter.protocol.http.util.accesslog.TCLogParser:
   parsing line: web-nat-250-2.web-nat.ebi.ac.uk - -
  [29/Mar/2006:23:59:20
   +0100] GET /Tools/dbfetch/dbfetch?db=emblid=NM_007045style=raw
   HTTP/1.0
   200 19 - lwp-trivial/1.40
   2006/03/30 19:06:35 DEBUG -
   jmeter.protocol.http.util.accesslog.TCLogParser:
   filter is not null
   2006/03/30 19:06:35 DEBUG -
   jmeter.protocol.http.util.accesslog.TCLogParser:
   line was not filtered
   2006/03/30 19:06:35 DEBUG -
  jmeter.protocol.http.sampler.HTTPSamplerBase:
   adding argument: name: db value: embl metaData: =
   2006/03/30 19:06:35 DEBUG -
  jmeter.protocol.http.sampler.HTTPSamplerBase :
   adding argument: name: id value: NM_007045 metaData: =
   2006/03/30 19:06:35 DEBUG -
  jmeter.protocol.http.sampler.HTTPSamplerBase:
   adding argument: name: style value: raw metaData: =
   2006/03/30 19:06:35 DEBUG - jmeter.protocol.http.sampler.HTTPSampler:
   Start
   : samplehttp://[
  
   http://web1.ebi.ac.uk]:8550/Tools/dbfetch/dbfetch?db=emblid=NM_007045style=raw
 
  http://web1.ebi.ac.uk%5D:8550/Tools/dbfetch/dbfetch?db=emblid=NM_007045style=raw
   2006/03/30 19:06:35 WARN  -
  jmeter.protocol.http.sampler.AccessLogSampler:
   Sampling failure java.lang.IllegalArgumentException: URI can't be
  null.
   at sun.net.spi.DefaultProxySelector.select (
   DefaultProxySelector.java
   :111)
   at sun.net.www.protocol.http.HttpURLConnection.plainConnect(
   HttpURLConnection.java:739)
   at sun.net.www.protocol.http.HttpURLConnection.connect (
   HttpURLConnection.java:669)
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(
   HttpURLConnection.java:913)
   at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(
   HttpURLConnection.java:1866)
   at
  org.apache.jmeter.protocol.http.sampler.HTTPSampler.disconnect(
   HTTPSampler.java:510)
   at org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(
   HTTPSampler.java:504)
   at
  org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(
   HTTPSamplerBase.java:514)
   at
  
  org.apache.jmeter.protocol.http.sampler.AccessLogSampler.sampleWithParser(
   AccessLogSampler.java:161)
   at
  org.apache.jmeter.protocol.http.sampler.AccessLogSampler.sample
   (
   AccessLogSampler.java:178)
   at org.apache.jmeter.threads.JMeterThread.run (
  JMeterThread.java
   :247)
   at java.lang.Thread.run(Thread.java:595)
  
  
   Grateful for any help.
   Cheers,
   Mikael
  
  
 
 



AW: scheduled distributed testing and access log sampler

2005-08-25 Thread Christian Baumgartner
thanks, maybe the sync of the machines was the problem with the scheduling
of the tests (they differ 2-3 min).. I'll try that out if I manage to get
the Access Logs working on all machines and Platforms via distributed
testing.

Happy to say that I read the manual before and knew about the override
functions delay and duration ;) so that was not my problem.

have a nice day
Christian

-Ursprüngliche Nachricht-
Von: Peter Lin [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 24. August 2005 18:58
An: JMeter Users List
Betreff: Re: scheduled distributed testing and access log sampler


that's one of the limitations of jmeter.

if you use / for the file separators, it should work, though you have to
copy the accesslogs to all the systems running jmeter-server. the easiest
way is to put the access logs in jmeter/bin/ directory.

make sure the scheduler date and time is correct. Also, make sure the time
is synchronized across the machines. if they are out of sync, that may have
a problem.

hope that helps

peter

On 8/24/05, Christian Baumgartner [EMAIL PROTECTED]
wrote:
 hi,
 
 today I had to play around with distribute tests and wanted to use an 
 access log sampler for realistig usage simulation. well, may i am 
 right, that i have to have the access logs on each server in the same 
 directory where it is in the original test plan? so i am not able to 
 have linux servers and a windows master for example?
 
 another thing is the scheduled start and end time of the tests. i want 
 my tests run for exact 30 minutes and tried the scheduling function. 
 it didn't work either - it didn't start. can i make anything wrong at 
 this point?
 
 i am using jmeter from cvs, but also tried stable 2.0.3.
 
 if it is so, it's really bad.
 
 
 
 thanks in advance (for reading)
 Christian
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]