Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

parent proxy doc + update external file usage.

SVN Revision: 753
  • Loading branch information...
commit 532bfda941337f6b4a1603745896fc8d4e55051b 1 parent 6c17cc9
@nniclausse nniclausse authored
View
11 doc/tsung.1
@@ -3,13 +3,13 @@
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "TSUNG" "1" "08 août 2006" "" ""
+.TH "TSUNG" "1" "07 novembre 2007" "" ""
.SH NAME
tsung \- A distributed multi-protocol load testing tool.
.SH SYNOPSIS
-\fBtsung\fR [ \fB-f configuration file\fR ] [ \fB-l log file\fR ] [ \fB-r command\fR ] [ \fB-p plugin\fR ] [ \fB-L listen port\fR ] [ \fB-I IP\fR ] [ \fB-P port\fR ] [ \fBstart|stop|restart|debug|status|recorder|stop_recorder\fR ]
+\fBtsung\fR [ \fB-f configuration file\fR ] [ \fB-l log file\fR ] [ \fB-r command\fR ] [ \fB-p plugin\fR ] [ \fB-L listen port\fR ] [ \fB-I IP\fR ] [ \fB-P port\fR ] [ \fB-u \fR ] [ \fBstart|stop|restart|debug|status|recorder|stop_recorder\fR ]
.SH "DESCRIPTION"
.PP
@@ -72,10 +72,13 @@ Specifies the plugin used for the recorder. Default is http, available: http, pg
Listening port for the recorder. Default is 8090
.TP
\fB-I\fR
-For the pgsql recorder: server IP. default is 127.0.0.1
+For the pgsql recorder (or parent proxy): server IP. default is 127.0.0.1
.TP
\fB-P\fR
-For the pgsql recorder: server port. Default is 5432
+For the pgsql recorder (or parent proxy): server port. Default is 5432
+.TP
+\fB-u\fR
+For the http recorder: use a parent proxy
.SH "BUGS"
.PP
Please reports bugs to the mailing list
View
11 doc/tsung.1.sgml
@@ -37,6 +37,7 @@ A distributed multi-protocol load testing tool.
<arg><option>-L</option> listen port</arg>
<arg><option>-I</option> IP</arg>
<arg><option>-P</option> port</arg>
+ <arg><option>-u</option> </arg>
<arg>start|stop|restart|debug|status|recorder|stop_recorder</arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -139,13 +140,19 @@ A distributed multi-protocol load testing tool.
<varlistentry>
<term><option>-I</option></term>
<listitem>
- <para> For the pgsql recorder: server IP. default is 127.0.0.1 </para>
+ <para> For the pgsql recorder (or parent proxy): server IP. default is 127.0.0.1 </para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-P</option></term>
<listitem>
- <para> For the pgsql recorder: server port. Default is 5432</para>
+ <para> For the pgsql recorder (or parent proxy): server port. Default is 5432</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-u</option></term>
+ <listitem>
+ <para> For the http recorder: use a parent proxy</para>
</listitem>
</varlistentry>
</variablelist>
View
563 doc/user_manual.html
@@ -84,10 +84,10 @@ <H1 ALIGN=center>Tsung User's manual</H1>
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=1>
<TR><TD ALIGN=left NOWRAP bgcolor="#F2F2F2">Version:</TD>
-<TD ALIGN=left NOWRAP>710</TD>
+<TD ALIGN=left NOWRAP>750</TD>
</TR>
<TR><TD ALIGN=left NOWRAP bgcolor="#F2F2F2">Date :</TD>
-<TD ALIGN=left NOWRAP> 12th April,&nbsp;2007</TD>
+<TD ALIGN=left NOWRAP> 7th November,&nbsp;2007</TD>
</TR></TABLE>
</DIV>
@@ -138,47 +138,56 @@ <H2 CLASS="section">Contents</H2><!--SEC END -->
<LI CLASS="li-toc"><A HREF="#htoc24">6.3&nbsp;&nbsp;Authentication</A>
</UL>
<LI CLASS="li-toc"><A HREF="#htoc25">7&nbsp;&nbsp;Using the proxy recorder</A>
-<LI CLASS="li-toc"><A HREF="#htoc26">8&nbsp;&nbsp;Understanding tsung.xml configuration file</A>
<UL CLASS="toc"><LI CLASS="li-toc">
-<A HREF="#htoc27">8.1&nbsp;&nbsp;File structure</A>
-<LI CLASS="li-toc"><A HREF="#htoc28">8.2&nbsp;&nbsp;Clients and server</A>
-<LI CLASS="li-toc"><A HREF="#htoc29">8.3&nbsp;&nbsp;Monitoring</A>
-<LI CLASS="li-toc"><A HREF="#htoc30">8.4&nbsp;&nbsp;Defining the load progression</A>
-<LI CLASS="li-toc"><A HREF="#htoc31">8.5&nbsp;&nbsp;Setting options</A>
+<A HREF="#htoc26">7.1&nbsp;&nbsp;PostgreSQL</A>
+<LI CLASS="li-toc"><A HREF="#htoc27">7.2&nbsp;&nbsp;HTTP</A>
+</UL>
+<LI CLASS="li-toc"><A HREF="#htoc28">8&nbsp;&nbsp;Understanding tsung.xml configuration file</A>
+<UL CLASS="toc"><LI CLASS="li-toc">
+<A HREF="#htoc29">8.1&nbsp;&nbsp;File structure</A>
+<LI CLASS="li-toc"><A HREF="#htoc30">8.2&nbsp;&nbsp;Clients and server</A>
+<LI CLASS="li-toc"><A HREF="#htoc31">8.3&nbsp;&nbsp;Monitoring</A>
+<UL CLASS="toc"><LI CLASS="li-toc">
+<A HREF="#htoc32">8.3.1&nbsp;&nbsp;Erlang</A>
+<LI CLASS="li-toc"><A HREF="#htoc33">8.3.2&nbsp;&nbsp;SNMP</A>
+</UL>
+<LI CLASS="li-toc"><A HREF="#htoc34">8.4&nbsp;&nbsp;Defining the load progression</A>
+<LI CLASS="li-toc"><A HREF="#htoc35">8.5&nbsp;&nbsp;Setting options</A>
<UL CLASS="toc"><LI CLASS="li-toc">
-<A HREF="#htoc32">8.5.1&nbsp;&nbsp;Jabber options</A>
-<LI CLASS="li-toc"><A HREF="#htoc33">8.5.2&nbsp;&nbsp;HTTP options</A>
+<A HREF="#htoc36">8.5.1&nbsp;&nbsp;Jabber options</A>
+<LI CLASS="li-toc"><A HREF="#htoc37">8.5.2&nbsp;&nbsp;HTTP options</A>
</UL>
-<LI CLASS="li-toc"><A HREF="#htoc34">8.6&nbsp;&nbsp;Sessions</A>
+<LI CLASS="li-toc"><A HREF="#htoc38">8.6&nbsp;&nbsp;Sessions</A>
<UL CLASS="toc"><LI CLASS="li-toc">
-<A HREF="#htoc35">8.6.1&nbsp;&nbsp;HTTP</A>
-<LI CLASS="li-toc"><A HREF="#htoc36">8.6.2&nbsp;&nbsp;Jabber</A>
-<LI CLASS="li-toc"><A HREF="#htoc37">8.6.3&nbsp;&nbsp;PostgreSQL</A>
-<LI CLASS="li-toc"><A HREF="#htoc38">8.6.4&nbsp;&nbsp;Dynamic substitutions</A>
-<LI CLASS="li-toc"><A HREF="#htoc39">8.6.5&nbsp;&nbsp;Reading external file</A>
-<LI CLASS="li-toc"><A HREF="#htoc40">8.6.6&nbsp;&nbsp;Dynamic variables</A>
-<LI CLASS="li-toc"><A HREF="#htoc41">8.6.7&nbsp;&nbsp;Checking the server's response</A>
+<A HREF="#htoc39">8.6.1&nbsp;&nbsp;HTTP</A>
+<LI CLASS="li-toc"><A HREF="#htoc40">8.6.2&nbsp;&nbsp;Jabber</A>
+<LI CLASS="li-toc"><A HREF="#htoc41">8.6.3&nbsp;&nbsp;PostgreSQL</A>
+<LI CLASS="li-toc"><A HREF="#htoc42">8.6.4&nbsp;&nbsp;Dynamic substitutions</A>
+<LI CLASS="li-toc"><A HREF="#htoc43">8.6.5&nbsp;&nbsp;Reading external file</A>
+<LI CLASS="li-toc"><A HREF="#htoc44">8.6.6&nbsp;&nbsp;Dynamic variables</A>
+<LI CLASS="li-toc"><A HREF="#htoc45">8.6.7&nbsp;&nbsp;Checking the server's response</A>
</UL>
</UL>
-<LI CLASS="li-toc"><A HREF="#htoc42">9&nbsp;&nbsp;Statistics and reports</A>
+<LI CLASS="li-toc"><A HREF="#htoc46">9&nbsp;&nbsp;Statistics and reports</A>
<UL CLASS="toc"><LI CLASS="li-toc">
-<A HREF="#htoc43">9.1&nbsp;&nbsp;Available stats</A>
-<LI CLASS="li-toc"><A HREF="#htoc44">9.2&nbsp;&nbsp;Design</A>
-<LI CLASS="li-toc"><A HREF="#htoc45">9.3&nbsp;&nbsp;Generating the report</A>
-<LI CLASS="li-toc"><A HREF="#htoc46">9.4&nbsp;&nbsp;tsung summary</A>
-<LI CLASS="li-toc"><A HREF="#htoc47">9.5&nbsp;&nbsp;Graphical overview</A>
+<A HREF="#htoc47">9.1&nbsp;&nbsp;Available stats</A>
+<LI CLASS="li-toc"><A HREF="#htoc48">9.2&nbsp;&nbsp;Design</A>
+<LI CLASS="li-toc"><A HREF="#htoc49">9.3&nbsp;&nbsp;Generating the report</A>
+<LI CLASS="li-toc"><A HREF="#htoc50">9.4&nbsp;&nbsp;tsung summary</A>
+<LI CLASS="li-toc"><A HREF="#htoc51">9.5&nbsp;&nbsp;Graphical overview</A>
</UL>
-<LI CLASS="li-toc"><A HREF="#htoc48">10&nbsp;&nbsp;References</A>
-<LI CLASS="li-toc"><A HREF="#htoc49">11&nbsp;&nbsp;Acknowledgments</A>
-<LI CLASS="li-toc"><A HREF="#htoc50">A&nbsp;&nbsp;Frequently Asked Questions</A>
+<LI CLASS="li-toc"><A HREF="#htoc52">10&nbsp;&nbsp;References</A>
+<LI CLASS="li-toc"><A HREF="#htoc53">11&nbsp;&nbsp;Acknowledgments</A>
+<LI CLASS="li-toc"><A HREF="#htoc54">A&nbsp;&nbsp;Frequently Asked Questions</A>
<UL CLASS="toc"><LI CLASS="li-toc">
-<A HREF="#htoc51">A.1&nbsp;&nbsp;Tsung crashes when I start it </A>
-<LI CLASS="li-toc"><A HREF="#htoc52">A.2&nbsp;&nbsp;Tsung still doesn't start ...</A>
-<LI CLASS="li-toc"><A HREF="#htoc53">A.3&nbsp;&nbsp;Tsung still crashes/fails when I start it !</A>
-<LI CLASS="li-toc"><A HREF="#htoc54">A.4&nbsp;&nbsp;What is the format of the stats file tsung.log ?</A>
-<LI CLASS="li-toc"><A HREF="#htoc55">A.5&nbsp;&nbsp;How can I specify the number of concurrent users ?</A>
-<LI CLASS="li-toc"><A HREF="#htoc56">A.6&nbsp;&nbsp;SNMP monitoring doesn't work ?!</A>
+<A HREF="#htoc55">A.1&nbsp;&nbsp;Tsung crashes when I start it </A>
+<LI CLASS="li-toc"><A HREF="#htoc56">A.2&nbsp;&nbsp;Tsung still doesn't start ...</A>
+<LI CLASS="li-toc"><A HREF="#htoc57">A.3&nbsp;&nbsp;Tsung still crashes/fails when I start it !</A>
+<LI CLASS="li-toc"><A HREF="#htoc58">A.4&nbsp;&nbsp;What is the format of the stats file tsung.log ?</A>
+<LI CLASS="li-toc"><A HREF="#htoc59">A.5&nbsp;&nbsp;How can I specify the number of concurrent users ?</A>
+<LI CLASS="li-toc"><A HREF="#htoc60">A.6&nbsp;&nbsp;SNMP monitoring doesn't work ?!</A>
</UL>
+<LI CLASS="li-toc"><A HREF="#htoc61">B&nbsp;&nbsp;CHANGELOG</A>
</UL>
<!--TOC section Introduction-->
@@ -495,7 +504,7 @@ <H3 CLASS="subsection"><A NAME="htoc18">4.1</A>&nbsp;&nbsp;benchmarking a Web se
Record one or more sessions: start the recorder with: <TT>tsung
recorder</TT>, and then configure your browser to use Tsung
proxy recorder (the listen port is 8090). A session file will be
- created. For HTTPS recording, use <FONT COLOR=purple>http://{</FONT> instead of
+ created. For HTTPS recording, use <FONT COLOR=purple>http://ssl-</FONT> instead of
<FONT COLOR=purple>https://</FONT> in your browser.
<LI CLASS="li-enumerate">Edit / organize scenario, by adding recorded sessions in the
configuration file.
@@ -739,7 +748,7 @@ <H3 CLASS="subsection"><A NAME="htoc24">6.3</A>&nbsp;&nbsp;Authentication</H3><!
<TR><TD><PRE CLASS="verbatim">
&lt;session probability="100" name="jabber-plain" type="ts_jabber"&gt;
- &lt;request&gt; &lt;jabber type="connect" ack="no_ack"&gt;&lt;/jabber&gt; &lt;/request&gt;
+ &lt;request&gt; &lt;jabber type="connect" ack="local"&gt;&lt;/jabber&gt; &lt;/request&gt;
&lt;thinktime value="2"&gt;&lt;/thinktime&gt;
@@ -822,7 +831,7 @@ <H3 CLASS="subsection"><A NAME="htoc24">6.3</A>&nbsp;&nbsp;Authentication</H3><!
<TR><TD><PRE CLASS="verbatim">
&lt;session probability="100" name="jabber-sipdigest" type="ts_jabber"&gt;
- &lt;request&gt; &lt;jabber type="connect" ack="no_ack"&gt;&lt;/jabber&gt; &lt;/request&gt;
+ &lt;request&gt; &lt;jabber type="connect" ack="local"&gt;&lt;/jabber&gt; &lt;/request&gt;
&lt;thinktime value="2"&gt;&lt;/thinktime&gt;
@@ -858,12 +867,15 @@ <H2 CLASS="section"><A NAME="htoc25">7</A>&nbsp;&nbsp;Using the proxy recorder</
To start it, <TT>tsung -p PLUGIN recorder</TT>. <FONT COLOR=purple>http</FONT> is
the default plugin. For PostgreSQL, use <FONT COLOR=purple>pgsql</FONT>.<BR>
<BR>
-The proxy is listening to port 8090. The recorded session is
-created as <TT>~/.tsung/tsung_recorderYYYMMDD-HH:MM.xml</TT>; if it doesn't
-work, take a look at <TT>~/.tsung/log/tsung.log-tsung_recorder@hostname</TT><BR>
+The proxy is listening to port 8090. You can change the port with
+<FONT COLOR=purple>-L portnumber</FONT>. <BR>
<BR>
To stop it, use <TT>tsung stop_recorder</TT>.<BR>
<BR>
+The recorded session is created as
+<TT>~/.tsung/tsung_recorderYYYMMDD-HH:MM.xml</TT>; if it doesn't work,
+take a look at <TT>~/.tsung/log/tsung.log-tsung_recorder@hostname</TT><BR>
+<BR>
Once a session has been created, you can insert it in your main config
file, either by editing by hand the file, or by using an ENTITY
declaration, like:<BR>
@@ -901,9 +913,29 @@ <H2 CLASS="section"><A NAME="htoc25">7</A>&nbsp;&nbsp;Using the proxy recorder</
</TR></TABLE></TD>
</TR></TABLE></TD>
</TR></TABLE><BR>
+<!--TOC subsection PostgreSQL-->
+
+<H3 CLASS="subsection"><A NAME="htoc26">7.1</A>&nbsp;&nbsp;PostgreSQL</H3><!--SEC END -->
+
+For PostgreSQL, the proxy will connect to the server at IP 127.0.0.1
+and port 5432. Use <FONT COLOR=purple>-I serverIP</FONT> to change the IP and
+<FONT COLOR=purple>-P portnumber</FONT> to change the port.<BR>
+<BR>
+<!--TOC subsection HTTP-->
+
+<H3 CLASS="subsection"><A NAME="htoc27">7.2</A>&nbsp;&nbsp;HTTP</H3><!--SEC END -->
+
+For HTTPS recording, use <FONT COLOR=purple>http://ssl-</FONT> instead of
+<FONT COLOR=purple>https://</FONT> in your browser<BR>
+<BR>
+<B>New in 1.2.2:</B>: For HTTP, you can configure the recorder to
+use a parent proxy (but this will not work for https). Add the -u
+option to enable parent proxy, and use <FONT COLOR=purple>-I serverIP</FONT> to set
+the IP and <FONT COLOR=purple>-P portnumber</FONT> to set the port of the parent.<BR>
+<BR>
<!--TOC section Understanding tsung.xml configuration file-->
-<H2 CLASS="section"><A NAME="htoc26">8</A>&nbsp;&nbsp;Understanding tsung.xml configuration file</H2><!--SEC END -->
+<H2 CLASS="section"><A NAME="htoc28">8</A>&nbsp;&nbsp;Understanding tsung.xml configuration file</H2><!--SEC END -->
The default encoding is utf-8. You can use a different encoding, like in:<BR>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
@@ -936,7 +968,7 @@ <H2 CLASS="section"><A NAME="htoc26">8</A>&nbsp;&nbsp;Understanding tsung.xml co
</TR></TABLE><BR>
<!--TOC subsection File structure-->
-<H3 CLASS="subsection"><A NAME="htoc27">8.1</A>&nbsp;&nbsp;File structure</H3><!--SEC END -->
+<H3 CLASS="subsection"><A NAME="htoc29">8.1</A>&nbsp;&nbsp;File structure</H3><!--SEC END -->
Scenarios are enclosed into Tsung tags:<BR>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
@@ -993,7 +1025,7 @@ <H3 CLASS="subsection"><A NAME="htoc27">8.1</A>&nbsp;&nbsp;File structure</H3><!
<BR>
<!--TOC subsection Clients and server-->
-<H3 CLASS="subsection"><A NAME="htoc28">8.2</A>&nbsp;&nbsp;Clients and server</H3><!--SEC END -->
+<H3 CLASS="subsection"><A NAME="htoc30">8.2</A>&nbsp;&nbsp;Clients and server</H3><!--SEC END -->
Scenarios start with clients (Tsung cluster) and server definitions:<BR>
<BR>
@@ -1103,7 +1135,11 @@ <H3 CLASS="subsection"><A NAME="htoc28">8.2</A>&nbsp;&nbsp;Clients and server</H
<BR>
<!--TOC subsection Monitoring-->
-<H3 CLASS="subsection"><A NAME="htoc29">8.3</A>&nbsp;&nbsp;Monitoring</H3><!--SEC END -->
+<H3 CLASS="subsection"><A NAME="htoc31">8.3</A>&nbsp;&nbsp;Monitoring</H3><!--SEC END -->
+
+<!--TOC subsubsection Erlang-->
+
+<H4 CLASS="subsubsection"><A NAME="htoc32">8.3.1</A>&nbsp;&nbsp;Erlang</H4><!--SEC END -->
Scenarios can contain optional monitoring informations. For example,
here is a cluster monitoring definition based on Erlang agents, for
@@ -1143,9 +1179,50 @@ <H3 CLASS="subsection"><A NAME="htoc29">8.3</A>&nbsp;&nbsp;Monitoring</H3><!--SE
</TR></TABLE></TD>
</TR></TABLE></TD>
</TR></TABLE><BR>
+<!--TOC subsubsection SNMP-->
+
+<H4 CLASS="subsubsection"><A NAME="htoc33">8.3.2</A>&nbsp;&nbsp;SNMP</H4><!--SEC END -->
+
The type keyword snmp can replace the erlang keyword, if SNMP monitoring
is preferred. They can be mixed. erlang is the default value for
-monitoring.<BR>
+monitoring. Since version 1.2.2, you can customize the snmp version,
+community and port number.<BR>
+<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
+<TR><TD><TABLE BORDER=0 CELLPADDING=0
+ CELLSPACING=0>
+<TR><TD BGCOLOR=black COLSPAN="3"><TABLE CELLSPACING="1" CELLPADDING=0 BORDER=0>
+<TR><TD>
+ </TD>
+</TR></TABLE></TD>
+</TR>
+<TR><TD BGCOLOR=black COLSPAN="1"><TABLE CELLSPACING="1" CELLPADDING=0 BORDER=0>
+<TR><TD>
+ </TD>
+</TR></TABLE></TD>
+<TD><TABLE BORDER=0 CELLPADDING="1" CELLSPACING=0>
+<TR><TD><PRE CLASS="verbatim">
+ &lt;monitoring&gt;
+ &lt;monitor host="geronimo" type="snmp"/&gt;
+ &lt;monitor host="f14-2" type="erlang"&gt;&lt;/monitor&gt;
+ &lt;monitor host="db" type="snmp"&gt;
+ &lt;snmp version="v2" community="mycommunity" port="11161"/&gt;
+ &lt;/monitor&gt;
+ &lt;/monitoring&gt;
+</PRE></TD>
+</TR></TABLE></TD>
+<TD BGCOLOR=black COLSPAN="1"><TABLE CELLSPACING="1" CELLPADDING=0 BORDER=0>
+<TR><TD>
+ </TD>
+</TR></TABLE></TD>
+</TR>
+<TR><TD BGCOLOR=black COLSPAN="3"><TABLE CELLSPACING="1" CELLPADDING=0 BORDER=0>
+<TR><TD>
+ </TD>
+</TR></TABLE></TD>
+</TR></TABLE></TD>
+</TR></TABLE><BR>
+The default version is <FONT COLOR=purple>v1</FONT>, default community
+<FONT COLOR=purple>public</FONT> and default port <FONT COLOR=purple>161</FONT>.<BR>
<BR>
Note: For Erlang monitoring, monitored computers need to be
accessible through the network. SSH (or rsh) needs to be configured to
@@ -1155,7 +1232,7 @@ <H3 CLASS="subsection"><A NAME="htoc29">8.3</A>&nbsp;&nbsp;Monitoring</H3><!--SE
<BR>
<!--TOC subsection Defining the load progression-->
-<H3 CLASS="subsection"><A NAME="htoc30">8.4</A>&nbsp;&nbsp;Defining the load progression</H3><!--SEC END -->
+<H3 CLASS="subsection"><A NAME="htoc34">8.4</A>&nbsp;&nbsp;Defining the load progression</H3><!--SEC END -->
The load progression is set-up by defining several arrival phases:<BR>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
@@ -1204,6 +1281,12 @@ <H3 CLASS="subsection"><A NAME="htoc30">8.4</A>&nbsp;&nbsp;Defining the load pro
10 users will be generated every second. The test will finish when
all users have ended their session.<BR>
<BR>
+The complete sequence can be executed several times using the
+<TT>loop</TT> attribute in the <TT>load</TT> tag
+(<FONT COLOR=purple>loop='2'</FONT> means the sequence will be looped twice, so the
+complete load will be executed 3 times) (feature available since
+version 1.2.2).<BR>
+<BR>
The load generated in terms of HTTP requests / seconds will also
depend on the mean number of requests within a session (if you have a
mean value of 100 requests per session and 10 new users per seconds,
@@ -1211,7 +1294,7 @@ <H3 CLASS="subsection"><A NAME="htoc30">8.4</A>&nbsp;&nbsp;Defining the load pro
<BR>
<!--TOC subsection Setting options-->
-<H3 CLASS="subsection"><A NAME="htoc31">8.5</A>&nbsp;&nbsp;Setting options</H3><!--SEC END -->
+<H3 CLASS="subsection"><A NAME="htoc35">8.5</A>&nbsp;&nbsp;Setting options</H3><!--SEC END -->
Default values can be set-up globally: thinktime between requests
in the scenario and ssl cipher algorithms. These values overrides
@@ -1248,7 +1331,7 @@ <H3 CLASS="subsection"><A NAME="htoc31">8.5</A>&nbsp;&nbsp;Setting options</H3><
</TR></TABLE><BR>
<!--TOC subsubsection Jabber options-->
-<H4 CLASS="subsubsection"><A NAME="htoc32">8.5.1</A>&nbsp;&nbsp;Jabber options</H4><!--SEC END -->
+<H4 CLASS="subsubsection"><A NAME="htoc36">8.5.1</A>&nbsp;&nbsp;Jabber options</H4><!--SEC END -->
<A NAME="sec:jabber-options"></A>
Default values for specific protocols can be defined. Here is an
@@ -1298,7 +1381,7 @@ <H4 CLASS="subsubsection"><A NAME="htoc32">8.5.1</A>&nbsp;&nbsp;Jabber options</
</UL>
<!--TOC subsubsection HTTP options-->
-<H4 CLASS="subsubsection"><A NAME="htoc33">8.5.2</A>&nbsp;&nbsp;HTTP options</H4><!--SEC END -->
+<H4 CLASS="subsubsection"><A NAME="htoc37">8.5.2</A>&nbsp;&nbsp;HTTP options</H4><!--SEC END -->
For HTTP, you can set the <TT>UserAgent</TT> values
(available since Tsung 1.1.0), using a probability for each
@@ -1340,7 +1423,7 @@ <H4 CLASS="subsubsection"><A NAME="htoc33">8.5.2</A>&nbsp;&nbsp;HTTP options</H4
</TR></TABLE><BR>
<!--TOC subsection Sessions-->
-<H3 CLASS="subsection"><A NAME="htoc34">8.6</A>&nbsp;&nbsp;Sessions</H3><!--SEC END -->
+<H3 CLASS="subsection"><A NAME="htoc38">8.6</A>&nbsp;&nbsp;Sessions</H3><!--SEC END -->
Sessions define the content of the scenario itself. They describe
the requests to execute.<BR>
@@ -1361,11 +1444,11 @@ <H3 CLASS="subsection"><A NAME="htoc34">8.6</A>&nbsp;&nbsp;Sessions</H3><!--SEC
<BR>
<!--TOC subsubsection HTTP-->
-<H4 CLASS="subsubsection"><A NAME="htoc35">8.6.1</A>&nbsp;&nbsp;HTTP</H4><!--SEC END -->
+<H4 CLASS="subsubsection"><A NAME="htoc39">8.6.1</A>&nbsp;&nbsp;HTTP</H4><!--SEC END -->
This example shows several features of the HTTP protocol support in
Tsung: GET and POST request, basic authentication, transaction for
-statistics definition, ...<BR>
+statistics definition, conditional request (IF MODIFIED SINCE), ...<BR>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR><TD><TABLE BORDER=0 CELLPADDING=0
CELLSPACING=0>
@@ -1408,7 +1491,7 @@ <H4 CLASS="subsubsection"><A NAME="htoc35">8.6.1</A>&nbsp;&nbsp;HTTP</H4><!--SEC
&lt;/http&gt; &lt;/request&gt;
&lt;request&gt;
&lt;http url="/bla" method="GET" version="1.1"
- contents="bla=blu&amp;name=glop"&gt;
+ contents="bla=blu&amp;amp;name=glop"&gt;
&lt;www_authenticate userid="Aladdin"
passwd="open sesame"/&gt;&lt;/http&gt;
&lt;/request&gt;
@@ -1430,9 +1513,44 @@ <H4 CLASS="subsubsection"><A NAME="htoc35">8.6.1</A>&nbsp;&nbsp;HTTP</H4><!--SEC
</TR></TABLE></TD>
</TR></TABLE></TD>
</TR></TABLE><BR>
+<B>New in 1.2.2:</B> You can add any HTTP header now, as in:
+<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
+<TR><TD><TABLE BORDER=0 CELLPADDING=0
+ CELLSPACING=0>
+<TR><TD BGCOLOR=black COLSPAN="3"><TABLE CELLSPACING="1" CELLPADDING=0 BORDER=0>
+<TR><TD>
+ </TD>
+</TR></TABLE></TD>
+</TR>
+<TR><TD BGCOLOR=black COLSPAN="1"><TABLE CELLSPACING="1" CELLPADDING=0 BORDER=0>
+<TR><TD>
+ </TD>
+</TR></TABLE></TD>
+<TD><TABLE BORDER=0 CELLPADDING="1" CELLSPACING=0>
+<TR><TD><PRE CLASS="verbatim">
+ &lt;request&gt;
+ &lt;http url="/bla" method="GET" contents="bla=blu&amp;amp;name=glop"&gt;
+ &lt;www_authenticate userid="Aladdin" passwd="open sesame"/&gt;
+ &lt;http_header name="Cache-Control" value="no-cache"/&gt;
+ &lt;http_header name="Referer" value="http://www.w3.org/"/&gt;
+ &lt;/http&gt;
+ &lt;/request&gt;
+</PRE></TD>
+</TR></TABLE></TD>
+<TD BGCOLOR=black COLSPAN="1"><TABLE CELLSPACING="1" CELLPADDING=0 BORDER=0>
+<TR><TD>
+ </TD>
+</TR></TABLE></TD>
+</TR>
+<TR><TD BGCOLOR=black COLSPAN="3"><TABLE CELLSPACING="1" CELLPADDING=0 BORDER=0>
+<TR><TD>
+ </TD>
+</TR></TABLE></TD>
+</TR></TABLE></TD>
+</TR></TABLE><BR>
<!--TOC subsubsection Jabber-->
-<H4 CLASS="subsubsection"><A NAME="htoc36">8.6.2</A>&nbsp;&nbsp;Jabber</H4><!--SEC END -->
+<H4 CLASS="subsubsection"><A NAME="htoc40">8.6.2</A>&nbsp;&nbsp;Jabber</H4><!--SEC END -->
<A NAME="sec:sessions:jabber"></A>
@@ -1454,7 +1572,7 @@ <H4 CLASS="subsubsection"><A NAME="htoc36">8.6.2</A>&nbsp;&nbsp;Jabber</H4><!--S
&lt;sessions&gt;
&lt;session probability="70" name="jabber-example" type="ts_jabber"&gt;
- &lt;request&gt; &lt;jabber type="connect" ack="no_ack" /&gt; &lt;/request&gt;
+ &lt;request&gt; &lt;jabber type="connect" ack="local" /&gt; &lt;/request&gt;
&lt;thinktime value="2"&gt;&lt;/thinktime&gt;
@@ -1703,7 +1821,7 @@ <H5 CLASS="paragraph">raw XML</H5><!--SEC END -->
<BR>
<!--TOC subsubsection PostgreSQL-->
-<H4 CLASS="subsubsection"><A NAME="htoc37">8.6.3</A>&nbsp;&nbsp;PostgreSQL</H4><!--SEC END -->
+<H4 CLASS="subsubsection"><A NAME="htoc41">8.6.3</A>&nbsp;&nbsp;PostgreSQL</H4><!--SEC END -->
For postgresql, 4 types of requests are available:
<OL CLASS="enumerate" type=1><LI CLASS="li-enumerate">
@@ -1774,7 +1892,7 @@ <H4 CLASS="subsubsection"><A NAME="htoc37">8.6.3</A>&nbsp;&nbsp;PostgreSQL</H4><
</TR></TABLE><BR>
<!--TOC subsubsection Dynamic substitutions-->
-<H4 CLASS="subsubsection"><A NAME="htoc38">8.6.4</A>&nbsp;&nbsp;Dynamic substitutions</H4><!--SEC END -->
+<H4 CLASS="subsubsection"><A NAME="htoc42">8.6.4</A>&nbsp;&nbsp;Dynamic substitutions</H4><!--SEC END -->
Dynamic substitution are mark-up placed in element of the scenario.
For HTTP, this mark-up can be placed in basic authentication (www_authenticate
@@ -1904,7 +2022,7 @@ <H4 CLASS="subsubsection"><A NAME="htoc38">8.6.4</A>&nbsp;&nbsp;Dynamic substitu
</TR></TABLE><BR>
<!--TOC subsubsection Reading external file-->
-<H4 CLASS="subsubsection"><A NAME="htoc39">8.6.5</A>&nbsp;&nbsp;Reading external file</H4><!--SEC END -->
+<H4 CLASS="subsubsection"><A NAME="htoc43">8.6.5</A>&nbsp;&nbsp;Reading external file</H4><!--SEC END -->
<B>New in 1.0.3</B>: A new module <TT>ts_file_server</TT> is available. You
can use it to read external files. For example, if you need to read user
@@ -1941,7 +2059,39 @@ <H4 CLASS="subsubsection"><A NAME="htoc39">8.6.5</A>&nbsp;&nbsp;Reading external
</TR></TABLE></TD>
</TR></TABLE></TD>
</TR></TABLE><BR>
-Now you can build you own function to use it, for example:<BR>
+<B>New in 1.2.2</B>: You can read several files, using the <TT>id</TT>
+attribute to identify each file:
+<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
+<TR><TD><TABLE BORDER=0 CELLPADDING=0
+ CELLSPACING=0>
+<TR><TD BGCOLOR=black COLSPAN="3"><TABLE CELLSPACING="1" CELLPADDING=0 BORDER=0>
+<TR><TD>
+ </TD>
+</TR></TABLE></TD>
+</TR>
+<TR><TD BGCOLOR=black COLSPAN="1"><TABLE CELLSPACING="1" CELLPADDING=0 BORDER=0>
+<TR><TD>
+ </TD>
+</TR></TABLE></TD>
+<TD><TABLE BORDER=0 CELLPADDING="1" CELLSPACING=0>
+<TR><TD><PRE CLASS="verbatim">
+ &lt;option name="file_server" value="/tmp/userlist.csv"&gt;&lt;/option&gt;
+ &lt;option name="file_server" id='random' value="/tmp/randomnumbers.csv"&gt;&lt;/option&gt;
+</PRE></TD>
+</TR></TABLE></TD>
+<TD BGCOLOR=black COLSPAN="1"><TABLE CELLSPACING="1" CELLPADDING=0 BORDER=0>
+<TR><TD>
+ </TD>
+</TR></TABLE></TD>
+</TR>
+<TR><TD BGCOLOR=black COLSPAN="3"><TABLE CELLSPACING="1" CELLPADDING=0 BORDER=0>
+<TR><TD>
+ </TD>
+</TR></TABLE></TD>
+</TR></TABLE></TD>
+</TR></TABLE><BR>
+Now you can build you own function to use it, for example, create a
+file called <TT>readcsv.erl</TT>:<BR>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR><TD><TABLE BORDER=0 CELLPADDING=0
CELLSPACING=0>
@@ -1960,9 +2110,9 @@ <H4 CLASS="subsubsection"><A NAME="htoc39">8.6.5</A>&nbsp;&nbsp;Reading external
-export([user/1]).
user({Pid,DynVar})-&gt;
- {ok,Line} = ts_file_server:get_next_line(),
+ {ok,Line} = ts_file_server:get_next_line(),
[Username, Passwd] = string:tokens(Line,";"),
- "username=" ++ Username ++"&amp;amp;passwd=" ++ Passwd.
+ "username=" ++ Username ++"&amp;amp;password=" ++ Passwd.
</PRE></TD>
</TR></TABLE></TD>
<TD BGCOLOR=black COLSPAN="1"><TABLE CELLSPACING="1" CELLPADDING=0 BORDER=0>
@@ -1976,7 +2126,14 @@ <H4 CLASS="subsubsection"><A NAME="htoc39">8.6.5</A>&nbsp;&nbsp;Reading external
</TR></TABLE></TD>
</TR></TABLE></TD>
</TR></TABLE><BR>
-In your session, use something like: <BR>
+The output of the function will be a string <FONT COLOR=purple>username=USER&amp;password=PASSWORD</FONT><BR>
+<BR>
+Then compile it with <TT>erlc readcsv.erl</TT> and put
+<TT>readcsv.beam</TT> in <TT>\$prefix/lib/erlang/lib/tsung-VERSION/ebin</TT> directory.<BR>
+<BR>
+(If the file has an id set to <FONT COLOR=purple>random</FONT>, change the call to: <TT>ts_file_server:get_next_line(random)</TT>.)<BR>
+<BR>
+Then use something like this in your session:<BR>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR><TD><TABLE BORDER=0 CELLPADDING=0
CELLSPACING=0>
@@ -2016,7 +2173,7 @@ <H4 CLASS="subsubsection"><A NAME="htoc39">8.6.5</A>&nbsp;&nbsp;Reading external
<BR>
<!--TOC subsubsection Dynamic variables-->
-<H4 CLASS="subsubsection"><A NAME="htoc40">8.6.6</A>&nbsp;&nbsp;Dynamic variables</H4><!--SEC END -->
+<H4 CLASS="subsubsection"><A NAME="htoc44">8.6.6</A>&nbsp;&nbsp;Dynamic variables</H4><!--SEC END -->
In some cases, you may want to use a value given by the server in a
response later in the session, and this value is <B>dynamically
@@ -2159,7 +2316,7 @@ <H4 CLASS="subsubsection"><A NAME="htoc40">8.6.6</A>&nbsp;&nbsp;Dynamic variable
</TR></TABLE><BR>
<!--TOC subsubsection Checking the server's response-->
-<H4 CLASS="subsubsection"><A NAME="htoc41">8.6.7</A>&nbsp;&nbsp;Checking the server's response</H4><!--SEC END -->
+<H4 CLASS="subsubsection"><A NAME="htoc45">8.6.7</A>&nbsp;&nbsp;Checking the server's response</H4><!--SEC END -->
With the tag <TT>match</TT> in a <TT>request</TT> tag, you can check
the server's response against a given string, and do some actions
@@ -2251,12 +2408,12 @@ <H4 CLASS="subsubsection"><A NAME="htoc41">8.6.7</A>&nbsp;&nbsp;Checking the ser
<BR>
<!--TOC section Statistics and reports-->
-<H2 CLASS="section"><A NAME="htoc42">9</A>&nbsp;&nbsp;Statistics and reports</H2><!--SEC END -->
+<H2 CLASS="section"><A NAME="htoc46">9</A>&nbsp;&nbsp;Statistics and reports</H2><!--SEC END -->
<A NAME="sec:statistics-reports"></A>
<!--TOC subsection Available stats-->
-<H3 CLASS="subsection"><A NAME="htoc43">9.1</A>&nbsp;&nbsp;Available stats</H3><!--SEC END -->
+<H3 CLASS="subsection"><A NAME="htoc47">9.1</A>&nbsp;&nbsp;Available stats</H3><!--SEC END -->
<UL CLASS="itemize"><LI CLASS="li-itemize">
request (response time for each request)
@@ -2282,7 +2439,7 @@ <H3 CLASS="subsection"><A NAME="htoc43">9.1</A>&nbsp;&nbsp;Available stats</H3><
</UL>
<!--TOC subsection Design-->
-<H3 CLASS="subsection"><A NAME="htoc44">9.2</A>&nbsp;&nbsp;Design</H3><!--SEC END -->
+<H3 CLASS="subsection"><A NAME="htoc48">9.2</A>&nbsp;&nbsp;Design</H3><!--SEC END -->
A bit of explanation on the design and internals of the statistics engine:<BR>
<BR>
@@ -2307,7 +2464,7 @@ <H3 CLASS="subsection"><A NAME="htoc44">9.2</A>&nbsp;&nbsp;Design</H3><!--SEC EN
</UL>
<!--TOC subsection Generating the report-->
-<H3 CLASS="subsection"><A NAME="htoc45">9.3</A>&nbsp;&nbsp;Generating the report</H3><!--SEC END -->
+<H3 CLASS="subsection"><A NAME="htoc49">9.3</A>&nbsp;&nbsp;Generating the report</H3><!--SEC END -->
cd to the log directory of your test (say
<TT>~/.tsung/log/20040325-16:33/</TT>) and use the script
@@ -2344,7 +2501,7 @@ <H3 CLASS="subsection"><A NAME="htoc45">9.3</A>&nbsp;&nbsp;Generating the report
<BR>
<!--TOC subsection tsung summary-->
-<H3 CLASS="subsection"><A NAME="htoc46">9.4</A>&nbsp;&nbsp;tsung summary</H3><!--SEC END -->
+<H3 CLASS="subsection"><A NAME="htoc50">9.4</A>&nbsp;&nbsp;tsung summary</H3><!--SEC END -->
<BLOCKQUOTE CLASS="figure"><DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV>
<DIV CLASS="center">
@@ -2359,7 +2516,7 @@ <H3 CLASS="subsection"><A NAME="htoc46">9.4</A>&nbsp;&nbsp;tsung summary</H3><!-
<DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV></BLOCKQUOTE>
<!--TOC subsection Graphical overview-->
-<H3 CLASS="subsection"><A NAME="htoc47">9.5</A>&nbsp;&nbsp;Graphical overview</H3><!--SEC END -->
+<H3 CLASS="subsection"><A NAME="htoc51">9.5</A>&nbsp;&nbsp;Graphical overview</H3><!--SEC END -->
<BLOCKQUOTE CLASS="figure"><DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV>
<DIV CLASS="center">
@@ -2374,7 +2531,7 @@ <H3 CLASS="subsection"><A NAME="htoc47">9.5</A>&nbsp;&nbsp;Graphical overview</H
<DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV></BLOCKQUOTE>
<!--TOC section References-->
-<H2 CLASS="section"><A NAME="htoc48">10</A>&nbsp;&nbsp;References</H2><!--SEC END -->
+<H2 CLASS="section"><A NAME="htoc52">10</A>&nbsp;&nbsp;References</H2><!--SEC END -->
<UL CLASS="itemize"><LI CLASS="li-itemize">
<EM>Tsung</EM> home page: <A HREF="http://tsung.erlang-projects.org/"><TT>http://tsung.erlang-projects.org/</TT></A>
@@ -2387,7 +2544,7 @@ <H2 CLASS="section"><A NAME="htoc48">10</A>&nbsp;&nbsp;References</H2><!--SEC EN
</UL>
<!--TOC section Acknowledgments-->
-<H2 CLASS="section"><A NAME="htoc49">11</A>&nbsp;&nbsp;Acknowledgments</H2><!--SEC END -->
+<H2 CLASS="section"><A NAME="htoc53">11</A>&nbsp;&nbsp;Acknowledgments</H2><!--SEC END -->
The first version of this document was based on a talk given by Mickael
Rémond<SUP><A NAME="text4" HREF="#note4">4</A></SUP> during an Object
@@ -2396,11 +2553,11 @@ <H2 CLASS="section"><A NAME="htoc49">11</A>&nbsp;&nbsp;Acknowledgments</H2><!--S
<BR>
<!--TOC section Frequently Asked Questions-->
-<H2 CLASS="section"><A NAME="htoc50">A</A>&nbsp;&nbsp;Frequently Asked Questions</H2><!--SEC END -->
+<H2 CLASS="section"><A NAME="htoc54">A</A>&nbsp;&nbsp;Frequently Asked Questions</H2><!--SEC END -->
<!--TOC subsection Tsung crashes when I start it -->
-<H3 CLASS="subsection"><A NAME="htoc51">A.1</A>&nbsp;&nbsp;Tsung crashes when I start it </H3><!--SEC END -->
+<H3 CLASS="subsection"><A NAME="htoc55">A.1</A>&nbsp;&nbsp;Tsung crashes when I start it </H3><!--SEC END -->
Does your Erlang system has ssl support enabled ?<BR>
<BR>
@@ -2438,7 +2595,7 @@ <H3 CLASS="subsection"><A NAME="htoc51">A.1</A>&nbsp;&nbsp;Tsung crashes when I
</TR></TABLE><BR>
<!--TOC subsection Tsung still doesn't start ...-->
-<H3 CLASS="subsection"><A NAME="htoc52">A.2</A>&nbsp;&nbsp;Tsung still doesn't start ...</H3><!--SEC END -->
+<H3 CLASS="subsection"><A NAME="htoc56">A.2</A>&nbsp;&nbsp;Tsung still doesn't start ...</H3><!--SEC END -->
Most of the time, when a crash happened at startup without any traffic
generated, the problem arise because the main Erlang controller node cannot
@@ -2643,7 +2800,7 @@ <H3 CLASS="subsection"><A NAME="htoc52">A.2</A>&nbsp;&nbsp;Tsung still doesn't s
<BR>
<!--TOC subsection Tsung still crashes/fails when I start it !-->
-<H3 CLASS="subsection"><A NAME="htoc53">A.3</A>&nbsp;&nbsp;Tsung still crashes/fails when I start it !</H3><!--SEC END -->
+<H3 CLASS="subsection"><A NAME="htoc57">A.3</A>&nbsp;&nbsp;Tsung still crashes/fails when I start it !</H3><!--SEC END -->
First look at the log file
<TT>~/.tsung/log/XXX/tsung_controller@yourhostname'</TT> to see
@@ -2664,7 +2821,7 @@ <H3 CLASS="subsection"><A NAME="htoc53">A.3</A>&nbsp;&nbsp;Tsung still crashes/f
Erlang.
<!--TOC subsection What is the format of the stats file tsung.log ?-->
-<H3 CLASS="subsection"><A NAME="htoc54">A.4</A>&nbsp;&nbsp;What is the format of the stats file tsung.log ?</H3><!--SEC END -->
+<H3 CLASS="subsection"><A NAME="htoc58">A.4</A>&nbsp;&nbsp;What is the format of the stats file tsung.log ?</H3><!--SEC END -->
<BR>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR><TD><TABLE BORDER=0 CELLPADDING=0
@@ -2723,7 +2880,7 @@ <H3 CLASS="subsection"><A NAME="htoc54">A.4</A>&nbsp;&nbsp;What is the format of
<BR>
<!--TOC subsection How can I specify the number of concurrent users ?-->
-<H3 CLASS="subsection"><A NAME="htoc55">A.5</A>&nbsp;&nbsp;How can I specify the number of concurrent users ?</H3><!--SEC END -->
+<H3 CLASS="subsection"><A NAME="htoc59">A.5</A>&nbsp;&nbsp;How can I specify the number of concurrent users ?</H3><!--SEC END -->
You can't. But it's on purpose: the load generated by
<EM>Tsung</EM> is dependent on the arrival time between new
@@ -2739,7 +2896,7 @@ <H3 CLASS="subsection"><A NAME="htoc55">A.5</A>&nbsp;&nbsp;How can I specify the
<BR>
<!--TOC subsection SNMP monitoring doesn't work ?!-->
-<H3 CLASS="subsection"><A NAME="htoc56">A.6</A>&nbsp;&nbsp;SNMP monitoring doesn't work ?!</H3><!--SEC END -->
+<H3 CLASS="subsection"><A NAME="htoc60">A.6</A>&nbsp;&nbsp;SNMP monitoring doesn't work ?!</H3><!--SEC END -->
It use SNMP v1 and the 'public' community. It has been tested with
<A HREF="http://net-snmp.sourceforge.net/"><TT>http://net-snmp.sourceforge.net/</TT></A>.<BR>
@@ -2819,6 +2976,256 @@ <H3 CLASS="subsection"><A NAME="htoc56">A.6</A>&nbsp;&nbsp;SNMP monitoring doesn
</TR></TABLE></TD>
</TR></TABLE></TD>
</TR></TABLE><BR>
+<!--TOC section CHANGELOG-->
+
+<H2 CLASS="section"><A NAME="htoc61">B</A>&nbsp;&nbsp;CHANGELOG</H2><!--SEC END -->
+
+
+<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
+<TR><TD><TABLE BORDER=0 CELLPADDING=0
+ CELLSPACING=0>
+<TR><TD BGCOLOR=black COLSPAN="3"><TABLE CELLSPACING="1" CELLPADDING=0 BORDER=0>
+<TR><TD>
+ </TD>
+</TR></TABLE></TD>
+</TR>
+<TR><TD><TABLE BORDER=0 CELLPADDING="1" CELLSPACING=0>
+<TR><TD><PRE CLASS="verbatim"><I>1.2.0 -&gt; 1.2.1 Minor bugfixes and enhancements (07 Oct 2006)
+ Bugfix:
+ - [TSUN-5] get traffic from all interfaces instead of only eth0
+ in erlang os monitoring (Linux)
+ - [TSUN-18 the pgsql recorder fails if the client doesn't try
+ first an SSL connection
+ - [TSUN-19] a % character in some requests (eg. type=sql for
+ pgsql) make the config_server crash.
+ - [TSUN-20] pgsql client fails while parsing data from server
+ - [TSUN-21] substitution in URL is not working properly when a new server
+ or port is set
+ - [TSUN-23] set default http version (1.1)
+ - [TSUN-24] destination=previous doesn't work (jabber)
+ Improvement:
+ - [TSUN-15] listen port is now customizable with the command line
+ - [TSUN-17] add option to setup postgresql server IP and port at runtime
+ for the recorder
+ - [TSUN-22] add support for PUT, DELETE and HEAD methods for http
+
+1.1.0 -&gt; 1.2.0 Major feature enhancements (29 May 2006)
+ - change name: idx-tsunami is now called tsung
+ - add new plugin: pgsql for postgresql load testing
+ - new: it's now possible to set multiple servers (selected at runtime
+ by round robin)
+ - add size_rcv stats
+ - fix beams communication problem introduced in new erlang releases.
+ - import snmp_mgr src from R9C2 to enable SNMP with R10B
+ - rebuild boot scripts if erlang version is different from compile time
+ - many DTD improvements
+ - improved match: add loop|abort|restart on (no)match behavior,
+ multiple match tags is now possible (suggested by msmith@truelink.com)
+ - freemem and packet stats for Solaris (jasonwtucker@gmail.com)
+ - fix several small problems with 'use_controller_vm' option
+ - ip is no more mandatory (default is 0.0.0.0)
+ - clients and monitoring can use hosts list defined in environment
+ variables, for use with batch schedulers (openpbs/torque, LSF and OAR)
+ - performance improvements in stats engine for very high load
+ (use session_cache)
+ Recorder:
+ - add plugin architecture in recorder; add pgsql plugin
+ - fix regression in recorder for WWW-Authentication
+ (anders.nygren@gmail.com)
+ - close client socket when connection:closed is ask by the server
+ (this should enable https recording with IE)
+ Jabber:
+ - fix presence:roster request
+ - add presence:directed , presence:broadcast &amp; presence:final requests
+ for jabber (jasonwtucker@gmail.com)
+ - roster enhancements (jasonwtucker@gmail.com)
+ - sip-digest authentication (jasonwtucker@gmail.com)
+ - fix online: must use presence:initial to switch to online status
+ - add pubsub support (mickael.remond@process-one.net)
+ Http:
+ - fix single user agent case.
+ - minor fixes for HTTP parsing
+
+1.0.3 -&gt; 1.1.0 Major feature enhancements (5 Sep 2005)
+ - new feature: HTTP proxy load testing in now possible (set
+ http_use_server_as_proxy to true)
+ - add dynamic substitution support for jabber
+ - add 'raw' type of msg for Jabber (use the new 'data' attribute)
+ - add the dynamic variable list to dynamic substitutions
+ - UserAgent is now customizable for HTTP testing
+ - Add an option to run all components (controller and launcher)
+ within a single erlang beam (use_controller_vm). Should ease
+ idx-tsunami use for light load tests
+ - fix bash script for solaris (jasonwtucker@gmail.com)
+ - fix: several 'idx-tsunami status' can be run simultaneously
+ (reported by Adam Spotton)
+ - internal: Host header is now set during configuration phase
+ - fix last phase duration
+ - fix recorder: must log absolute url if only the scheme has changed
+
+1.0.2 -&gt; 1.0.3 Minor bugfixes (8 Jul 2005)
+ - add ts_file_server module
+ - fix broken https recording
+ Thx to johann.messner@jku.at for bug reporting :
+ - fix: forgot to add "?" when an URL is absolute and had a query
+ part
+ - fix regression in the recorder (introduced in 1.0.2): must use CAPS
+ for method, wrong content-length in recorder causing POST requests
+ to silently fail
+ - allow multiple 'dyn_variable' in DTD
+ - fix Host: header when port is != 80
+
+1.0.1 -&gt; 1.0.2: Minor bugfixes (6 Jun 2005)
+ - fix: the recorder is working now with R10B: replace call to
+ httpd_parse:request_header in recorder by an
+ internal func (the func was removed in R10B)
+ - update configure scripts (should build on RHEL3/x86_64)
+ - remote beam startup is now tunable (-r ssh/rsh)
+ - internal changes in ts_os_mon (suggested by R. Lenglet)
+
+1.0 -&gt; 1.0.1: Major bugfixes (18 Nov 2004)
+ - fix: broken free mem on non linux arch (Matthew Schulkind)
+ - add script to convert apache log file (combined) to idx-tsunami XML
+ - improved configure: add --with-erlang option and xmerl PATH detection
+ idx-tsunami now compiles both with R9C and R10B
+ - small fixes to the DTD
+ Thx to Jonathan Bresler for testing and bug reporting :
+ - fix: broken 'global', 'local' and 'no_ack' requests and size computation
+ - fix: broken ids in jabber messages
+ - fix: broken online/offline in user_server
+ - default thinktime can now be overriden
+ - many improvements/fixes in analyse_msg.pl
+
+1.0.beta7 -&gt; 1.0: Minor bugfixes (13 Aug 2004)
+ - fix: broken path when building debian package
+ - add rpm target in makefile
+ - implement status
+ - add 'match' in graph and doc
+ - fix add_dynparams for jabber
+
+1.0.beta6 -&gt; 1.0.beta7: Minor bugfixes (20 Jul 2004)
+ - HTTP: really (?) fix parsing of no content-length with connection:close
+ - better handling of configure (--prefix is working)
+ - add different types of output backend (currently, only 'text'
+ works; 'rrdtool' is started but unfinished)
+ - fix: ssl_ciphers option is working again
+
+1.0.beta5 -&gt; 1.0.beta6: Minor feature enhancements (5 May 2004)
+ - add a DTD for the configuration file
+ - add dynamic request substitution (mickael.remond@erlang-fr)
+ - add dynamic variable parsing from response (can be used
+ later in the session for request substitution)
+ - add response pattern to match (log if not match)
+ - HTTP: fix partial header parsing (mickael.remond@erlang-fr.org)
+ - HTTP: fix chunk parsing when the chunk-size is split across two packets
+ - HTTP: fix parsing of no content-length with connection:close case
+ - check for bad input (config file, &lt;client&gt; name)
+ - merge client and client_rcv processes into a single process
+ - fix: do not connect in init anymore; this fix too long phases when
+ connection time is high.
+ - connect stat is now for both new connections and reconnections
+ - check phase duration in launcher
+ - various code cleanup
+
+1.0.beta4 -&gt; 1.0.beta5: Major Feature enhancements (25 Mar 2004)
+ - add SNMP monitoring (not yet customizable)
+ - fix remote start: log filename is now encoded to avoid bad
+ parsing of log_file by 'erl'
+ Patches from mickael.remond@erlang-fr.org :
+ - Added ~/.idx-tsunami creation in idx-tsunami script if the directory
+ does not already exist
+ - Extension of XML attribute entity normalisation
+ - HTTP: fix Cookie support: Cookie are not necessarily separated by "; "
+ - HTTP: fix long POST request in the recorder: dorecord message
+ was missing enclosing curly brackets, and the body length counter
+ were mistakenly taking the header size in its total
+ - HTTP: Content-type support in the recorder (needed to handle
+ non-HTML form encoded posts)
+ - add autoconf support to detect Erlang installation path
+ - SOAP Support: IDX-Tsunami can now record and replay SOAP HTTP
+ scenario. The SOAPAction HTTP header is now recorded
+ - Preliminary Windows support: A workaround has been introduced in
+ the code to handle behaviour difference between Erlang Un*x and
+ Erlang Windows on how the command-line is handled. When an
+ assumtion is made on the string type of a parameter, it should be
+ check that this is actually a string and not an atom.
+
+1.0.beta3 -&gt; 1.0.beta4: Minor bugfixes (16 Mar 2004)
+ - fix lost cookie when transfer-encoding:chunked is used
+ - fix config parsing (the last request of the last page of a
+ sesssion was not marked as endpage)
+ - don't crash anymore on error during start or stop
+
+1.0.beta2 -&gt; 1.0.beta3: Minor feature enhancements (24 Feb 2004)
+ - fix stupid bug in start script for recorder
+ - HTTP: fix '&amp;' writes in the XML recorder for 'content' attribute
+ - HTTP: enhanced Cookies parsing ('domain' and 'path' implemented).
+ - ssl_ciphers can be customized
+ - change log directory structure: all log files in one directory per test
+ - add HTML reports (requires the perl Template toolkit)
+ - change stats names: page_resptime -&gt; page, response_time -&gt; request
+
+1.0.beta1 -&gt; 1.0.beta2: Minor feature enhancements (11 Feb 2004)
+ - reorganise the sources
+ - add tools to build a debian package
+ - fix documentations
+ - add minimalistic man page
+ - syntax change: GETIMS +date replace by GET +'if_modified_since'
+
+0.2.1 -&gt; 1.0.beta1: Major Feature Enhancements (3 Feb 2004)
+ - rewrite the configuration engine. Now use an XML file.
+ - add recording application: use as a HTTP proxy to record session into XML
+ format
+ - add support to OS monitoring (cpu, memory, network). Currently, use an
+ erlang agent on the remote nodes; SNMP is on the TODO list.
+ (mickael.remond@erlang-fr.org)
+ - can now use several IPs per client host
+ - several arrival phases can be set with different arrival rates and
+ duration
+ - can set test duration instead of number of users
+ - add user defined statistics using a 'transaction' tag
+ - HTTP: fix cookies and POST handling (mickael.remond@erlang-fr.org)
+ - HTTP: rewrite the parser (faster and cleaner)
+ - fix bad timeout computation when close occur for persistent client
+ - bugfixes and other enhancements.
+ - fix memory leak with ssl (half-closed connections)
+
+0.2.0 -&gt; 0.2.1: Minor bugfixes and small enhancements (9 Dec 2003)
+ - optimize session memory consumption: use an ets table to store session setup
+ - HTTP: fix crash when content-length is not set in headers
+ - HTTP: fix POST method
+ - HTTP: preliminary chunked-encoding support in HTTP/1.1
+ - HTTP: Absolute URL are handled (server and port can be overridden )
+ - no more .hosts.erlang required
+ - add stats on simultaneous users
+
+0.1.1 -&gt; 0.2.0: Major Feature Enhancements (Aug 2003)
+ - add 'realtime' stats
+ - add new 'parse' type of protocol
+ - add reconnection support (persistent client)
+ - add basic HTTP and HTTPS support
+ - split the application in two parts: a single controller (tsunami_controller),
+ and the clients (tsunami)
+ - switch to R9C
+
+0.1.0 -&gt; 0.1.1: Bugfix realease (Aug 2002)
+ - fix config file
+ - fix few typos in docs
+ - fix init script
+ - few optimizations in user_server.erl
+ - switch to R8B
+
+0.1.0: Initial release (May 2001)
+</I></PRE></TD>
+</TR></TABLE></TD>
+</TR>
+<TR><TD BGCOLOR=black COLSPAN="3"><TABLE CELLSPACING="1" CELLPADDING=0 BORDER=0>
+<TR><TD>
+ </TD>
+</TR></TABLE></TD>
+</TR></TABLE></TD>
+</TR></TABLE>
+<BR>
<!--BEGIN NOTES document-->
<HR WIDTH="50%" SIZE=1><DL CLASS="list"><DT CLASS="dt-list"><A NAME="note1" HREF="#text1"><FONT SIZE=5>1</FONT></A><DD CLASS="dd-list"><A HREF="http://www.erlang-projects.org/Members/mremond/events/dossier_de_presentat/block_10766817551485/file"><TT>http://www.erlang-projects.org/Members/mremond/events/dossier_de_presentat/block_10766817551485/file</TT></A>
<DT CLASS="dt-list"><A NAME="note2" HREF="#text2"><FONT SIZE=5>2</FONT></A><DD CLASS="dd-list"><A HREF="http://www.editions-eyrolles.com/php.accueil/Ouvrages/ouvrage.php3?ouv_ean13=9782212110791"><TT>http://www.editions-eyrolles.com/php.accueil/Ouvrages/ouvrage.php3?ouv_ean13=9782212110791</TT></A>
View
38 doc/user_manual.tex
@@ -494,18 +494,22 @@ \subsection{Authentication}
\section{Using the proxy recorder}
+
The recorder has two plugins: one for HTTP and one for PostgreSQL.
To start it, \command{tsung -p PLUGIN recorder}. \userinput{http} is
the default plugin. For PostgreSQL, use \userinput{pgsql}.
-The proxy is listening to port 8090. The recorded session is
-created as \file{~/.tsung/tsung_recorderYYYMMDD-HH:MM.xml}; if it doesn't
-work, take a look at \file{~/.tsung/log/tsung.log-tsung_recorder@hostname}
+The proxy is listening to port 8090. You can change the port with
+\userinput{-L portnumber}.
To stop it, use \command{tsung stop\_recorder}.
+The recorded session is created as
+\file{~/.tsung/tsung_recorderYYYMMDD-HH:MM.xml}; if it doesn't work,
+take a look at \file{~/.tsung/log/tsung.log-tsung_recorder@hostname}
+
Once a session has been created, you can insert it in your main config
file, either by editing by hand the file, or by using an ENTITY
declaration, like:
@@ -520,6 +524,24 @@ \section{Using the proxy recorder}
</sessions>
\end{Verbatim}
+\subsection{PostgreSQL}
+
+For PostgreSQL, the proxy will connect to the server at IP 127.0.0.1
+and port 5432. Use \userinput{-I serverIP} to change the IP and
+\userinput{-P portnumber} to change the port.
+
+\subsection{HTTP}
+
+For HTTPS recording, use \userinput{http://ssl-} instead of
+\userinput{https://} in your browser
+
+\strong{New in 1.2.2:}: For HTTP, you can configure the recorder to
+use a parent proxy (but this will not work for https). Add the -u
+option to enable parent proxy, and use \userinput{-I serverIP} to set
+the IP and \userinput{-P portnumber} to set the port of the parent.
+
+
+
\section{Understanding tsung.xml configuration file}
@@ -1111,7 +1133,8 @@ \subsubsection{Reading external file}
<option name="file_server" id='random' value="/tmp/randomnumbers.csv"></option>
\end{Verbatim}
-Now you can build you own function to use it, for example:
+Now you can build you own function to use it, for example, create a
+file called \file{readcsv.erl}:
\begin{Verbatim}
-module(readcsv).
@@ -1120,9 +1143,14 @@ \subsubsection{Reading external file}
user({Pid,DynVar})->
{ok,Line} = ts_file_server:get_next_line(),
[Username, Passwd] = string:tokens(Line,";"),
- "username=" ++ Username ++"&amp;passwd=" ++ Passwd.
+ "username=" ++ Username ++"&amp;password=" ++ Passwd.
\end{Verbatim}
+The output of the function will be a string \userinput{username=USER\&password=PASSWORD}
+
+Then compile it with \command{erlc readcsv.erl} and put
+\file{readcsv.beam} in \file{\$prefix/lib/erlang/lib/tsung-VERSION/ebin} directory.
+
(If the file has an id set to \userinput{random}, change the call to: \texttt{ts\_file\_server:get\_next\_line(random)}.)
Then use something like this in your session:
Please sign in to comment.
Something went wrong with that request. Please try again.