Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update docs

SVN Revision: 1028
  • Loading branch information...
commit 272e833e8c57bed34c89d2ac48fbbbf52d02de01 1 parent 0d60e7b
@nniclausse nniclausse authored
Showing with 383 additions and 220 deletions.
  1. +18 −21 doc/tsplot.1
  2. +6 −5 doc/tsplot.1.sgml
  3. +227 −133 doc/user_manual.html
  4. +132 −61 doc/user_manual.tex
View
39 doc/tsplot.1
@@ -1,16 +1,10 @@
-.\" This manpage has been automatically generated by docbook2man
-.\" from a DocBook document. This tool can be found at:
-.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
-.\" Please send any bug reports, improvements, comments, patches,
-.\" etc. to Steve Cheng <steve@ggi-project.org>.
-.TH "TSPLOT" "1" "22 février 2009" "" ""
-
+.\\" auto-generated by docbook2man-spec $Revision: 1.1 $
+.TH "TSPLOT" "1" "February 2007" "" ""
.SH NAME
tsplot \- Plot several tsung logs on the same charts, for comparison purpose.
.SH SYNOPSIS
-
-\fBtsplot\fR [ \fB-c configuration file\fR ] [ \fB-d images output directory\fR ] [ \fB-v verbose\fR ] [ \fBlegend logfile\fR ]
-
+.sp
+\fBtsplot\fR [ \fB-c configuration file\fR ] [ \fB-d images output directory\fR ] [ \fB-v verbose\fR ] [ \fBlegend logfile\fR ]
.SH "DESCRIPTION"
.PP
Tsung comes with a plotting tool using
@@ -25,13 +19,13 @@ for further comparison and analyze.
\fB-c\fR
.TP
\fB--config\fR
-specifies the configuration file to use. Default is \fIhttp.en.plots.conf\fR\&.
+specifies the configuration file to use. Default is \fIhttp.en.plots.conf\fR.
.TP
\fB-d\fR
.TP
\fB--outdir\fR
directory where \fBtsplot\fR saves the images
-it produces, defaults to \fI/tmp/tsung\fR\&.
+it produces, defaults to \fI/tmp/tsung\fR.
.TP
\fB-v\fR
.TP
@@ -48,7 +42,7 @@ chart.
.PP
\fBtsplot\fR comes with two sample configuration
files, namely \fIhttp.plots.en.conf\fR and
-\fIpgsql.plots.en.conf\fR\&. They respectively define
+\fIpgsql.plots.en.conf\fR. They respectively define
charts to be plotted for a \fBtsung\fR HTTP test
and a \fBtsung\fR PGSQL test.
.PP
@@ -103,10 +97,10 @@ same as xfactor, but for vertical axis.
Depending on the data you obtain with your tests, you may
want to adapt the vertical scale of your plotting. For
example, the \fBpage.mean\fR statistic is
-logged in milliseconds by \fBtsung\fR\&. You
+logged in milliseconds by \fBtsung\fR. You
may want to display seconds if this unit better fits your
measures. Then simply set \fByfactor =
-1000\fR\&.
+1000\fR.
.TP
\fBstyles\fR
set here any number of \fBmatplotlib\fR
@@ -128,9 +122,11 @@ You then can define any number of plot, one by section, and give
them an arbitrary name. The name must be unique, and will be
used for naming output images.
.PP
+.PP
Any option available in DEFAULT section is also available in any
specific chart section, with the same meaning and effect. The
specific setting will systematically override the DEFAULT one.
+.PP
.TP
\fBtitle\fR
Title of the chart, as printed into the resulting image.
@@ -145,7 +141,7 @@ Tsung provide several types of statistics, as documented
here:
http://tsung.erlang-projects.org/user_manual.html#htoc53. The
two main types of statistics used are
-\fBsample\fR and \fBcounter\fR\&. A
+\fBsample\fR and \fBcounter\fR. A
third one is \fBgauge\fR but is only use for a
single statistic (users).
@@ -187,14 +183,15 @@ Please see the given configuration examples which should be
distributed in
\fI/usr/share/doc/tsung/tsung-plotter/http.plots.en.conf\fR
and
-\fI/usr/share/doc/tsung/tsung-plotter/pgsql.plots.en.conf\fR\&.
+\fI/usr/share/doc/tsung/tsung-plotter/pgsql.plots.en.conf\fR.
.SH "BUGS"
.PP
Please reports bugs to the mailing list
-<tsung-users@process-one.net>, see
-https://lists.process-one.net/mailman/listinfo/tsung-users for
+<tsung-users@process-one.net> or in the bug
+tracker <URL:https://support.process-one.net/browse/TSUN>,
+see also <URL:https://lists.process-one.net/mailman/listinfo/tsung-users> for
archives.
.SH "AUTHORS"
.PP
-\fBtsplot\fR is written by Dimitri
-Fontaine <dim@tapoueh.org>\&.
+\fBtsplot\fR is written by Dimitri Fontaine
+<dim@tapoueh.org>.
View
11 doc/tsplot.1.sgml
@@ -345,8 +345,9 @@ Plot several tsung logs on the same charts, for comparison purpose.
<title>BUGS</title>
<para>
Please reports bugs to the mailing list
- <email>tsung-users@process-one.net</email>, see
- <address>https://lists.process-one.net/mailman/listinfo/tsung-users</address> for
+ <email>tsung-users@process-one.net</email> or in the bug
+ tracker <ulink url="https://support.process-one.net/browse/TSUN"></ulink>,
+ see also <ulink url="https://lists.process-one.net/mailman/listinfo/tsung-users"></ulink> for
archives.
</para>
</refsect1>
@@ -354,9 +355,9 @@ Plot several tsung logs on the same charts, for comparison purpose.
<refsect1>
<title>AUTHORS</title>
<para>
- <command>tsplot</command> is written by <author>Dimitri
- Fontaine</author> <email>dim@tapoueh.org</email>.
+ <command>tsplot</command> is written by <author> <firstname>Dimitri</firstname>
+ <surname>Fontaine</surname></author>
+ <email>dim@tapoueh.org</email>.
</para>
</refsect1>
-
</refentry>
View
360 doc/user_manual.html
@@ -95,8 +95,8 @@
<!--ENDHTML-->
<!--CUT DEF section 1 --><H1 ALIGN=center>Tsung User’s manual</H1><DIV CLASS="center">
-<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=1><TR><TD ALIGN=left NOWRAP bgcolor="#F2F2F2"> Version:</TD><TD ALIGN=left NOWRAP>1017</TD></TR>
-<TR><TD ALIGN=left NOWRAP bgcolor="#F2F2F2"> Date :</TD><TD ALIGN=left NOWRAP>20 avril 2009</TD></TR>
+<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=1><TR><TD ALIGN=left NOWRAP bgcolor="#F2F2F2"> Version:</TD><TD ALIGN=left NOWRAP>1020</TD></TR>
+<TR><TD ALIGN=left NOWRAP bgcolor="#F2F2F2"> Date :</TD><TD ALIGN=left NOWRAP>30 juin 2009</TD></TR>
</TABLE>
</DIV><!--TOC section Table des matières-->
<H2 CLASS="section"><!--SEC ANCHOR -->Table des matières</H2><!--SEC END --><UL CLASS="toc"><LI CLASS="li-toc">
@@ -161,55 +161,60 @@ <H2 CLASS="section"><!--SEC ANCHOR -->Table des matières</H2><!--SEC END --><UL
</LI><LI CLASS="li-toc"><A HREF="#htoc43">6.3.3  Munin</A>
</LI></UL>
</LI><LI CLASS="li-toc"><A HREF="#htoc44">6.4  Defining the load progression</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc45">6.5  Setting options</A>
<UL CLASS="toc"><LI CLASS="li-toc">
-<A HREF="#htoc46">6.5.1  Jabber options</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc47">6.5.2  HTTP options</A>
+<A HREF="#htoc45">6.4.1  Randomly generated users</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc46">6.4.2  Statically generated users</A>
</LI></UL>
-</LI><LI CLASS="li-toc"><A HREF="#htoc48">6.6  Sessions</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc47">6.5  Setting options</A>
<UL CLASS="toc"><LI CLASS="li-toc">
-<A HREF="#htoc49">6.6.1  Thinktimes</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc50">6.6.2  HTTP</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc51">6.6.3  Jabber/XMPP</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc52">6.6.4  PostgreSQL</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc53">6.6.5  MySQL</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc54">6.6.6  LDAP</A>
+<A HREF="#htoc48">6.5.1  Jabber options</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc49">6.5.2  HTTP options</A>
</LI></UL>
-</LI><LI CLASS="li-toc"><A HREF="#htoc55">6.7  Advanced features</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc50">6.6  Sessions</A>
<UL CLASS="toc"><LI CLASS="li-toc">
-<A HREF="#htoc56">6.7.1  Dynamic substitutions</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc57">6.7.2  Reading external file</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc58">6.7.3  Dynamic variables</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc59">6.7.4  Checking the server’s response</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc60">6.7.5  Loops, If</A>
+<A HREF="#htoc51">6.6.1  Thinktimes</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc52">6.6.2  HTTP</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc53">6.6.3  Jabber/XMPP</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc54">6.6.4  PostgreSQL</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc55">6.6.5  MySQL</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc56">6.6.6  LDAP</A>
+</LI></UL>
+</LI><LI CLASS="li-toc"><A HREF="#htoc57">6.7  Advanced features</A>
+<UL CLASS="toc"><LI CLASS="li-toc">
+<A HREF="#htoc58">6.7.1  Dynamic substitutions</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc59">6.7.2  Reading external file</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc60">6.7.3  Dynamic variables</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc61">6.7.4  Checking the server’s response</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc62">6.7.5  Loops, If</A>
</LI></UL>
</LI></UL>
-</LI><LI CLASS="li-toc"><A HREF="#htoc61">7  Statistics and reports</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc63">7  Statistics and reports</A>
<UL CLASS="toc"><LI CLASS="li-toc">
-<A HREF="#htoc62">7.1  Available stats</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc63">7.2  Design</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc64">7.3  Generating the report</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc65">7.4  Tsung summary</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc66">7.5  Graphical overview</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc67">7.6  Tsung Plotter</A>
+<A HREF="#htoc64">7.1  Available stats</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc65">7.2  Design</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc66">7.3  Generating the report</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc67">7.4  Tsung summary</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc68">7.5  Graphical overview</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc69">7.6  Tsung Plotter</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc70">7.7  RRD</A>
</LI></UL>
-</LI><LI CLASS="li-toc"><A HREF="#htoc68">8  References</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc69">9  Acknowledgments</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc70">A  Frequently Asked Questions</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc71">8  References</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc72">9  Acknowledgments</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc73">A  Frequently Asked Questions</A>
<UL CLASS="toc"><LI CLASS="li-toc">
-<A HREF="#htoc71">A.1  Can’t start distributed clients: timeout error </A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc72">A.2  Tsung crashes when I start it </A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc73">A.3  Why do i have error_connect_emfile errors ?</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc74">A.4  Tsung still crashes/fails when I start it !</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc75">A.5  Can I dynamically follow redirect with HTTP ?</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc76">A.6  What is the format of the stats file tsung.log ?</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc77">A.7  How can I compute percentile/quartiles/median for transactions or requests
+<A HREF="#htoc74">A.1  Can’t start distributed clients: timeout error </A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc75">A.2  Tsung crashes when I start it </A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc76">A.3  Why do i have error_connect_emfile errors ?</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc77">A.4  Tsung still crashes/fails when I start it !</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc78">A.5  Can I dynamically follow redirect with HTTP ?</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc79">A.6  What is the format of the stats file tsung.log ?</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc80">A.7  How can I compute percentile/quartiles/median for transactions or requests
response time ?</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc78">A.8  How can I specify the number of concurrent users ?</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc79">A.9  SNMP monitoring doesn’t work ?!</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc81">A.8  How can I specify the number of concurrent users ?</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc82">A.9  SNMP monitoring doesn’t work ?!</A>
</LI></UL>
-</LI><LI CLASS="li-toc"><A HREF="#htoc80">B  Errors list</A>
-</LI><LI CLASS="li-toc"><A HREF="#htoc81">C  CHANGELOG</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc83">B  Errors list</A>
+</LI><LI CLASS="li-toc"><A HREF="#htoc84">C  CHANGELOG</A>
</LI></UL><!--TOC section Introduction-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc1">1</A>  Introduction</H2><!--SEC END --><!--TOC subsection What is Tsung ?-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc2">1.1</A>  What is Tsung ?</H3><!--SEC END --><P><EM>Tsung</EM> (formerly IDX-Tsunami) is a distributed load testing tool. It is
@@ -229,7 +234,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc3">1.2</A>  What is Erla
</LI><LI CLASS="li-itemize"><EM>Fault-tolerance</EM>:Erlang has been built to develop robust,
fault-tolerant systems. As such, wrong answer sent from the server
to <EM>Tsung</EM> does not make the whole running benchmark crash.
-</LI></UL><P>More informations on Erlang on <A HREF="http://www.erlang.org"><TT>http://www.erlang.org</TT></A> and
+</LI></UL><P>More information on Erlang on <A HREF="http://www.erlang.org"><TT>http://www.erlang.org</TT></A> and
<A HREF="http://www.erlang-projects.org/"><TT>http://www.erlang-projects.org/</TT></A></P><!--TOC subsection Tsung background-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc4">1.3</A>  Tsung background</H3><!--SEC END --><P>History:
</P><UL CLASS="itemize"><LI CLASS="li-itemize">
@@ -243,7 +248,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc4">1.3</A>  Tsung backgr
is available in the source archive
(<A HREF="https://svn.process-one.net/tsung/trunk/CONTRIBUTORS"><TT>https://svn.process-one.net/tsung/trunk/CONTRIBUTORS</TT></A>).</LI><LI CLASS="li-itemize">It is an industrial strength implementation of a <EM>stochastic model</EM>
for real users simulation. User events distribution is based on a
-Poisson Process. More information on this topic in:<P>Z. Liu, N. Niclausse, et C. Jalpa-Villanueva. <B>Traffic Model
+Poisson Process. More information on this topic in:<P>Z. Liu, N. Niclausse, and C. Jalpa-Villanueva. <B>Traffic Model
and Performance Evaluation of Web Servers</B>. <EM>Performance Evaluation,
Volume 46, Issue 2-3, October 2001</EM>.</P></LI><LI CLASS="li-itemize">This model has already been tested in the INRIA <EM>WAGON</EM>
research prototype (Web trAffic GeneratOr and beNchmark). WAGON was
@@ -255,7 +260,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc4">1.3</A>  Tsung backgr
4-node Tsung cluster (3xSun V240 + 1 Sun V440)
</LI><LI CLASS="li-itemize">10 000 simultaneous users.
<EM>Tsung</EM> was running on a 3-computers cluster (CPU
-800Mhz)
+800MHz)
</LI></UL>
</LI><LI CLASS="li-itemize"><EM>HTTP and HTTPS</EM> protocol:
<UL CLASS="itemize"><LI CLASS="li-itemize">
@@ -285,7 +290,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc6">2.1</A>  Tsung main f
</LI><LI CLASS="li-itemize"><EM>Distributed</EM>: the load can be distributed on a cluster of
client machines
</LI><LI CLASS="li-itemize"><EM>Multi-Protocols</EM> using a plug-in system: HTTP (both standard
-web traffic and SOAP), Webdav, Jabber/XMPP and PostgreSQL are currently
+web traffic and SOAP), WebDAV, Jabber/XMPP and PostgreSQL are currently
supported. Experimental LDAP and MySQL plugins were included in the 1.3.0 release.
</LI><LI CLASS="li-itemize"><EM>SSL</EM> support
</LI><LI CLASS="li-itemize"><EM>Several IP addresses</EM> can be used on a single machine using
@@ -319,8 +324,8 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc7">2.2</A>  HTTP related
handled).
</LI><LI CLASS="li-itemize">HTTP server or proxy server load testing.
</LI></UL><!--TOC subsection WEBDAV related features-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc8">2.3</A>  WEBDAV related features</H3><!--SEC END --><P>The Webdav (RFC 4918) plugin is a superset of the HTTP plugin. It adds the
-following features (some versioning extensions to WebDAV (RFC 3253)
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc8">2.3</A>  WEBDAV related features</H3><!--SEC END --><P>The WebDAV (RFC 4918) plugin is a superset of the HTTP plugin. It adds the
+following features (some versionning extensions to WebDAV (RFC 3253)
are also supported):</P><UL CLASS="itemize"><LI CLASS="li-itemize">
Methods implemented: DELETE, CONNECT, PROPFIND, PROPPATCH, COPY,
MOVE, LOCK, UNLOCK, MKCOL, REPORT, OPTIONS, MKACTIVITY, CHECKOUT, MERGE
@@ -360,7 +365,8 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc13">2.8</A>  Complete re
</LI><LI CLASS="li-itemize"><EM>Errors</EM>: Statistics on page return code to trace errors
</LI><LI CLASS="li-itemize"><EM>Target server behaviour</EM>: An Erlang agent can gather information
from the target server(s). Tsung produces graphs for CPU and memory
-consumption and network traffic. SNMP is also supported.
+consumption and network traffic. SNMP and munin is also supported to
+monitor remote servers.
</LI></UL><P>Note that <EM>Tsung</EM> takes care of the synchronization process
by itself. Gathered statistics are «synchronized».</P><P>It is possible to generate graphs during the benchmark as statistics
are gathered in real-time.</P><!--TOC subsection Highlights-->
@@ -378,13 +384,14 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc14">2.9</A>  Highlights<
combination of machines on the three cluster tiers (Web engine, EJB
engine and database)
</LI></UL><!--TOC section Installation-->
-<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc15">3</A>  Installation</H2><!--SEC END --><P>This package has been tested on Linux, FreeBSD and Solaris. It should
+<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc15">3</A>  Installation</H2><!--SEC END --><P>This package has been tested on Linux, FreeBSD and Solaris. A port is
+available on MacOS X. It should
work on Erlang supported platforms (Linux, Solaris, *BSD, Win32 and
MacOS-X).</P><!--TOC subsection Dependencies-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc16">3.1</A>  Dependencies</H3><!--SEC END --><UL CLASS="itemize"><LI CLASS="li-itemize">
Erlang/OTP R10B-0 and up
(<A HREF="http://www.erlang.org/download.html"><TT>http://www.erlang.org/download.html</TT></A>). Erlang is now
-part of fedora and debian repository.
+part of fedora and debian/ubuntu repositories.
</LI><LI CLASS="li-itemize">extended regexp module (used for dynamic variables):
gregexp.erl available at
<A HREF="http://www.cellicium.com/erlang/contribs/"><TT>http://www.cellicium.com/erlang/contribs/</TT></A> . The module is
@@ -470,11 +477,13 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc19">3.4</A>  Running</H3
</TD></TR>
</TABLE></TD></TR>
</TABLE></TD></TR>
-</TABLE><!--TOC subsection Feedback-->
+</TABLE><P>A typical way of using tsung is to run:
+<TT>tsung -f myconfigfile.xml start</TT>.</P><P>The command will print the current log directory created for the test, and wait until the test is
+over.</P><!--TOC subsection Feedback-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc20">3.5</A>  Feedback</H3><!--SEC END --><P>Use the Tsung mailing list (see
<A HREF="https://lists.process-one.net/mailman/listinfo/tsung-users"><TT>https://lists.process-one.net/mailman/listinfo/tsung-users</TT></A>) if you have
suggestions or questions about <EM>Tsung</EM>. You can also use the
-bugtracker available at <A HREF="https://support.process-one.net/browse/TSUN"><TT>https://support.process-one.net/browse/TSUN</TT></A>.
+bug-tracker available at <A HREF="https://support.process-one.net/browse/TSUN"><TT>https://support.process-one.net/browse/TSUN</TT></A>.
You can also try the #tsung IRC channel on Freenode.</P><!--TOC section Benchmark approach-->
<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc21">4</A>  Benchmark approach</H2><!--SEC END --><!--TOC subsection HTTP/WebDAV benchmark approach-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc22">4.1</A>  HTTP/WebDAV benchmark approach</H3><!--SEC END --><!--TOC subsubsection Benchmarking a Web server-->
@@ -570,7 +579,7 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc31">4.5.2</A>  Acknow
</TD></TR>
</TABLE></TD></TR>
</TABLE></TD></TR>
-</TABLE><P>)</P><P>You also have to specify the number of users to be connected:</P><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD><TABLE BORDER=0 CELLPADDING=0
+</TABLE><P>You also have to specify the number of users to be connected:</P><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>
@@ -754,7 +763,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc35">5.1</A>  PostgreSQL<
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.</P><!--TOC subsection HTTP and WEBDAV-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc36">5.2</A>  HTTP and WEBDAV</H3><!--SEC END --><P>For HTTPS recording, use <FONT COLOR=purple>http://ssl-</FONT> instead of
-<FONT COLOR=purple>https://</FONT> in your browser</P><P><B>New in 1.2.2:</B>: For HTTP, you can configure the recorder to
+<FONT COLOR=purple>https://</FONT> in your browser</P><P><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.</P><!--TOC section Understanding tsung.xml configuration file-->
@@ -798,7 +807,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc38">6.1</A>  File struct
slow down Tsung, so use with care. It is useful for debugging
purpose. You can use the attribute <FONT COLOR=purple>dumptraffic="light"</FONT> to
dump only the first 44 bytes.</P><P>The <TT>loglevel</TT> can also have a great impact on performance:
-For high load, <FONT COLOR=purple>warning</FONT> is recommended .
+For high load, <FONT COLOR=purple>warning</FONT> is recommended.
Possible values are:</P><UL CLASS="itemize"><LI CLASS="li-itemize">
emergency
</LI><LI CLASS="li-itemize">critical
@@ -815,13 +824,13 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc39">6.2</A>  Clients and
</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;clients&gt;
- &lt;client host="localhost" use_controller_vm="true"/&gt;
- &lt;/clients&gt;
+</TABLE></TD><TD><TABLE BORDER=0 CELLPADDING="1" CELLSPACING=0><TR><TD><PRE CLASS="verbatim"> &lt;clients&gt;
+ &lt;client host="localhost" use_controller_vm="true"/&gt;
+ &lt;/clients&gt;
-&lt;servers&gt;
- &lt;server host="192.168.1.1" port="80" type="tcp"&gt;&lt;/server&gt;
-&lt;/servers&gt;
+ &lt;servers&gt;
+ &lt;server host="192.168.1.1" port="80" type="tcp"&gt;&lt;/server&gt;
+ &lt;/servers&gt;
</PRE></TD></TR>
</TABLE></TD><TD BGCOLOR=black COLSPAN="1"><TABLE CELLSPACING="1" CELLPADDING=0 BORDER=0><TR><TD>
</TD></TR>
@@ -833,7 +842,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc39">6.2</A>  Clients and
</TABLE><P>This will start the load on the same host and on the same Erlang
virtual machine as the controller.</P><P>The server is the entry point into the cluster (<B>New in 1.2.0:</B>
if several servers are defined, a round robin algorithm is used to
-choose the server).</P><P>The next example is a more complex, and use several features for
+choose the server).</P><P>The next example is more complex, and use several features for
advanced distributed testing:</P><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>
@@ -845,9 +854,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc39">6.2</A>  Clients and
&lt;ip value="10.9.195.12"&gt;&lt;/ip&gt;
&lt;ip value="10.9.195.13"&gt;&lt;/ip&gt;
&lt;/client&gt;
- &lt;client host="memphis" weight="3" maxusers="600" cpu="2"&gt;
- &lt;ip value="10.9.195.14"&gt;&lt;/ip&gt;
- &lt;/client&gt;
+ &lt;client host="memphis" weight="3" maxusers="600" cpu="2"/&gt;
&lt;/clients&gt;
&lt;servers&gt;
@@ -867,7 +874,13 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc39">6.2</A>  Clients and
1.1.1:</B> IP is no longer mandatory. If not specified, the default IP will
be used.</P><P>In this example, a second machine is used in the Tsung cluster,
with a higher weight, and 2 cpus. Two Erlang virtual machines will be
-used to take advantage of the number of CPU.</P><P>By default, the load is distributed uniformly on all CPU (one cpu
+used to take advantage of the number of CPU.</P><BLOCKQUOTE CLASS="quote">
+<B>Note:</B> Even if an Erlang VM is now able to handle severals CPUs
+(erlang SMP), benchmarks shows that it’s more efficient to use one VM
+per CPU (with SMP disabled) for tsung clients. Only the controller node is using SMP
+erlang. Therefore, you cpu should be equal to the number of cores of
+your nodes.
+</BLOCKQUOTE><P>By default, the load is distributed uniformly on all CPU (one cpu
per client by default). The weight parameter (integer) can be used to
take into account the speed of the client machine. For instance, if
one real client has a weight of 1 and the other client has a weight
@@ -880,7 +893,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc39">6.2</A>  Clients and
the number of users is higher than the limit, a new erlang virtual
machine will be started to handle new users. The default value of
<TT>maxusers</TT> is 800 . Nowadays, with kernel polling enable, you
-can use a very large value for <TT>maxusers</TT> (30000 for example) without
+can and should use a very large value for <TT>maxusers</TT> (30000 for example) without
performance penalty (but don’t forget to raise the limit of the OS with
<TT>ulimit -n</TT>, see also FAQ <A HREF="#sec:faq:emfile">A.3</A>).</P><!--TOC subsection Monitoring-->
<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc40">6.3</A>  Monitoring</H3><!--SEC END --><P>Tsung is able to monitor remote servers using several backends that
@@ -912,8 +925,8 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc41">6.3.1</A>  Erlang
</TD></TR>
</TABLE></TD></TR>
</TABLE></TD></TR>
-</TABLE><P>Note: monitored computers need to be
-accessible through the network, and erlang communcations must be
+</TABLE><P>Note: monitored computers needs to be
+accessible through the network, and erlang communications must be
allowed (no firewall is better ). SSH (or rsh) needs to be configured to
allow connection without password on. <B>You must use the same
version of Erlang/OTP on all nodes otherwise it may not work
@@ -921,8 +934,9 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc41">6.3.1</A>  Erlang
of the other available agents:</P><!--TOC subsubsection SNMP-->
<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc42">6.3.2</A>  SNMP</H4><!--SEC END --><P>
The type keyword <FONT COLOR=purple>snmp</FONT> can replace the erlang keyword, if SNMP monitoring
-is preferred. They can be mixed. Since version 1.2.2, you can customize the snmp version,
-community and port number.</P><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD><TABLE BORDER=0 CELLPADDING=0
+is preferred. They can be mixed. Since version 1.2.2, you can customize the SNMP version,
+community and port number. It uses the MIB provided in
+<EM>net-snmp</EM> (see also <A HREF="#sec:faq:snmp">A.9</A>).</P><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>
@@ -945,7 +959,7 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc42">6.3.2</A>  SNMP</
</TABLE></TD></TR>
</TABLE><P>The default version is <FONT COLOR=purple>v1</FONT>, default community
<FONT COLOR=purple>public</FONT> and default port <FONT COLOR=purple>161</FONT>.</P><!--TOC subsubsection Munin-->
-<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc43">6.3.3</A>  Munin</H4><!--SEC END --><P>Since version 1.3.1, tsung is able to retrieve data from a munin-node agent
+<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc43">6.3.3</A>  Munin</H4><!--SEC END --><P>Since version <B>1.3.1</B>, Tsung is able to retrieve data from a munin-node agent
(see <A HREF="http://munin.projects.linpro.no/wiki/munin-node"><TT>http://munin.projects.linpro.no/wiki/munin-node</TT></A>). The <TT>type</TT>
keyword must be set to <FONT COLOR=purple>munin</FONT>, for example:</P><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>
@@ -966,7 +980,8 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc43">6.3.3</A>  Munin<
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><!--TOC subsection Defining the load progression-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc44">6.4</A>  Defining the load progression</H3><!--SEC END --><P>The load progression is set-up by defining several arrival phases:</P><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD><TABLE BORDER=0 CELLPADDING=0
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc44">6.4</A>  Defining the load progression</H3><!--SEC END --><!--TOC subsubsection Randomly generated users-->
+<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc45">6.4.1</A>  Randomly generated users</H4><!--SEC END --><P>The load progression is set-up by defining several arrival phases:</P><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>
@@ -1004,9 +1019,48 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc44">6.4</A>  Defining th
version 1.2.2).</P><P>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,
-the theoretical average throughput will be 1000 requests/ sec).</P><!--TOC subsection Setting options-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc45">6.5</A>  Setting options</H3><!--SEC END --><P>Default values can be set-up globally: <TT>thinktime</TT> between requests
-in the scenario and ssl cipher algorithms. These values overrides
+the theoretical average throughput will be 1000 requests/ sec).</P><!--TOC subsubsection Statically generated users-->
+<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc46">6.4.2</A>  Statically generated users</H4><!--SEC END --><P>If you want to start a given session (see  <A HREF="#sec:sessions">6.6</A>) at a given time during the test,
+it is possible since version <B>1.3.1</B>:
+</P><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;load&gt;
+ &lt;arrivalphase phase="1" duration="10" unit="minute"&gt;
+ &lt;users interarrival="2" unit="second"&gt;&lt;/users&gt;
+ &lt;/arrivalphase&gt;
+ &lt;user session="http-example" start_time="185" unit="second"&gt;&lt;/users&gt;
+ &lt;user session="http-example" start_time="10" unit="minute"&gt;&lt;/users&gt;
+ &lt;user session="foo" start_time="11" unit="minute"&gt;&lt;/users&gt;
+&lt;/load&gt;
+ &lt;sessions&gt;
+ &lt;session name="http-example" probability="0" type="ts_http"&gt;
+ &lt;request&gt; &lt;http url="/" method="GET"&gt;&lt;/http&gt; &lt;/request&gt;
+ &lt;/session&gt;
+ &lt;session name="foo" probability="100" type="ts_http"&gt;
+ &lt;request&gt; &lt;http url="/" method="GET"&gt;&lt;/http&gt; &lt;/request&gt;
+ &lt;/session&gt;
+ &lt;sessions&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><P>In this example, we have two sessions, one has a "0" probability (and
+therefore will not be used in the first phase), and the other
+100%. We define 3 users starting respectively 3mn and 5 seconds
+after the beginning of the test (using the <FONT COLOR=purple>http-example</FONT>
+session), one starting after 10 minutes, and a last one starting after
+11 minutes (using the <FONT COLOR=purple>foo</FONT> session this time)</P><!--TOC subsection Setting options-->
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc47">6.5</A>  Setting options</H3><!--SEC END --><P>Default values can be set-up globally: <TT>thinktime</TT> between requests
+in the scenario, ssl cipher algorithms, TCP/UDP buffer sizes (the default
+value is 32KB). These values overrides
those set in session configuration tags if override is true.
</P><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>
@@ -1017,6 +1071,10 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc45">6.5</A>  Setting opt
</TABLE></TD><TD><TABLE BORDER=0 CELLPADDING="1" CELLSPACING=0><TR><TD><PRE CLASS="verbatim"> &lt;option name="thinktime" value="3" random="false" override="true"/&gt;
&lt;option name="ssl_ciphers"
value="EXP1024-RC4-SHA,EDH-RSA-DES-CBC3-SHA"/&gt;
+ &lt;option name="tcp_snd_buffer" value="16384"&gt;&lt;/option&gt;
+ &lt;option name="tcp_rcv_buffer" value="16384"&gt;&lt;/option&gt;
+ &lt;option name="udp_snd_buffer" value="16384"&gt;&lt;/option&gt;
+ &lt;option name="udp_rcv_buffer" value="16384"&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>
@@ -1044,7 +1102,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc45">6.5</A>  Setting opt
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><P>To disable hibernation, you must set the value to <FONT COLOR=purple>infinity</FONT>.</P><!--TOC subsubsection Jabber options-->
-<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc46">6.5.1</A>  Jabber options</H4><!--SEC END --><P>
+<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc48">6.5.1</A>  Jabber options</H4><!--SEC END --><P>
<A NAME="sec:jabber-options"></A></P><P>Default values for specific protocols can be defined. Here is an
example of option values for Jabber/XMPP:</P><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>
@@ -1075,7 +1133,7 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc46">6.5.1</A>  Jabber
</LI><LI CLASS="li-itemize">username = tsunguser
</LI><LI CLASS="li-itemize">passwd = sesame
</LI></UL><P>You can also set the <TT>muc_service</TT> here (see previous example).</P><!--TOC subsubsection HTTP options-->
-<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc47">6.5.2</A>  HTTP options</H4><!--SEC END --><P>For HTTP, you can set the <TT>UserAgent</TT> values
+<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc49">6.5.2</A>  HTTP options</H4><!--SEC END --><P>For HTTP, you can set the <TT>UserAgent</TT> values
(<B>available since Tsung 1.1.0</B>), using a probability for each
value (the sum of all probabilities must be equal to 100)</P><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>
@@ -1100,7 +1158,8 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc47">6.5.2</A>  HTTP o
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><!--TOC subsection Sessions-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc48">6.6</A>  Sessions</H3><!--SEC END --><P>Sessions define the content of the scenario itself. They describe
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc50">6.6</A>  Sessions</H3><!--SEC END --><P>
+<A NAME="sec:sessions"></A></P><P>Sessions define the content of the scenario itself. They describe
the requests to execute.</P><P>Each session has a given probability. This is used to decide which
session a new user will execute. The sum of all session<CODE>'</CODE>s
probabilities must be 100.</P><P>A transaction is just a way to have customized statistics. Say if you
@@ -1112,7 +1171,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc48">6.6</A>  Sessions</H
<FONT COLOR=purple>index.en.html + header.gif</FONT>. Be warn that If you have a
thinktime inside the transaction, the thinktime will be part of the
response time.</P><!--TOC subsubsection Thinktimes-->
-<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc49">6.6.1</A>  Thinktimes</H4><!--SEC END --><P>You can set static or random thinktimes to separate requests. By
+<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc51">6.6.1</A>  Thinktimes</H4><!--SEC END --><P>You can set static or random thinktimes to separate requests. By
default, a random thinktime will be a exponential distribution with
mean equals to <TT>value</TT>.</P><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>
@@ -1131,7 +1190,8 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc49">6.6.1</A>  Thinkt
</TABLE></TD></TR>
</TABLE><P>In this case, the thinktime will be an exponential distribution with a
mean equals to 20 seconds.</P><P><B>Since version 1.3.0</B>, you can also use a range
-<FONT COLOR=purple>[min:max]</FONT> instead of a mean for random thinktimes:
+<FONT COLOR=purple>[min:max]</FONT> instead of a mean for random thinktimes (the
+distribution will be uniform in the interval):
</P><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>
@@ -1148,7 +1208,7 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc49">6.6.1</A>  Thinkt
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><!--TOC subsubsection HTTP-->
-<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc50">6.6.2</A>  HTTP</H4><!--SEC END --><P>This example shows several features of the HTTP protocol support in
+<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc52">6.6.2</A>  HTTP</H4><!--SEC END --><P>This example shows several features of the HTTP protocol support in
Tsung: GET and POST request, basic authentication, transaction for
statistics definition, conditional request (IF MODIFIED SINCE), ...</P><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>
@@ -1223,7 +1283,7 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc50">6.6.2</A>  HTTP</
</TD></TR>
</TABLE></TD></TR>
</TABLE></TD></TR>
-</TABLE><P><B>New in 1.3.O:</B> You can also read the content of a POST or PUT
+</TABLE><P><B>New in 1.3.0:</B> You can also read the content of a POST or PUT
request from an external file:</P><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>
@@ -1240,7 +1300,7 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc50">6.6.2</A>  HTTP</
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><!--TOC subsubsection Jabber/XMPP-->
-<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc51">6.6.3</A>  Jabber/XMPP</H4><!--SEC END --><P><A NAME="sec:sessions:jabber"></A>
+<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc53">6.6.3</A>  Jabber/XMPP</H4><!--SEC END --><P><A NAME="sec:sessions:jabber"></A>
</P><P>Here is an example of a session definition for the Jabber/XMPP protocol:
</P><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>
@@ -1500,7 +1560,7 @@ <H5 CLASS="paragraph"><!--SEC ANCHOR -->raw XML</H5><!--SEC END --><P>
</TABLE></TD></TR>
</TABLE><P>Beware: you must encode XML characters like <FONT COLOR=purple>&lt;</FONT>
,<FONT COLOR=purple>&gt;</FONT>, <FONT COLOR=purple>&amp;</FONT>, etc.</P><!--TOC subsubsection PostgreSQL-->
-<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc52">6.6.4</A>  PostgreSQL</H4><!--SEC END --><P>For PostgreSQL, 4 types of requests are available:
+<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc54">6.6.4</A>  PostgreSQL</H4><!--SEC END --><P>For PostgreSQL, 4 types of requests are available:
</P><OL CLASS="enumerate" type=1><LI CLASS="li-enumerate">
connect (to a given database with a given username
</LI><LI CLASS="li-enumerate">authenticate (with password or not)
@@ -1554,7 +1614,7 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc52">6.6.4</A>  Postgr
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><!--TOC subsubsection MySQL-->
-<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc53">6.6.5</A>  MySQL</H4><!--SEC END --><P>
+<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc55">6.6.5</A>  MySQL</H4><!--SEC END --><P>
<A NAME="sec:session:mysql"></A>
For MySQL, 4 types of requests are available (same as PostgreSQL):
</P><OL CLASS="enumerate" type=1><LI CLASS="li-enumerate">
@@ -1594,7 +1654,7 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc53">6.6.5</A>  MySQL<
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><!--TOC subsubsection LDAP-->
-<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc54">6.6.6</A>  LDAP</H4><!--SEC END --><P>
+<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc56">6.6.6</A>  LDAP</H4><!--SEC END --><P>
<A NAME="sec:session:ldap"></A></P><!--TOC paragraph Authentication-->
<H5 CLASS="paragraph"><!--SEC ANCHOR -->Authentication</H5><!--SEC END --><P>
The recommended mechanism used to authenticate users against a LDAP
@@ -1604,7 +1664,7 @@ <H5 CLASS="paragraph"><!--SEC ANCHOR -->Authentication</H5><!--SEC END --><P>
</LI><LI CLASS="li-enumerate">Try to bind as the user, with the distinguished name found in the first step and the user’s password
</LI></OL><P>If the bind is successful, the user is authenticated (this is the
scheme used, among others, by the LDAP authentication module for
-apache <A HREF="http://httpd.apache.org/docs/2.0/mod/mod_auth_ldap.html"><TT>http://httpd.apache.org/docs/2.0/mod/mod_auth_ldap.html</TT></A>)</P><!--TOC paragraph LDAP Setup-->
+Apache <A HREF="http://httpd.apache.org/docs/2.0/mod/mod_auth_ldap.html"><TT>http://httpd.apache.org/docs/2.0/mod/mod_auth_ldap.html</TT></A>)</P><!--TOC paragraph LDAP Setup-->
<H5 CLASS="paragraph"><!--SEC ANCHOR -->LDAP Setup</H5><!--SEC END --><P>
For this example we are going to use a simple repository with the following hierarchy:</P><BLOCKQUOTE CLASS="figure"><DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV>
<DIV CLASS="center">
@@ -1781,8 +1841,8 @@ <H5 CLASS="paragraph"><!--SEC ANCHOR -->Other examples</H5><!--SEC END --><TABLE
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><!--TOC subsection Advanced features-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc55">6.7</A>  Advanced features</H3><!--SEC END --><!--TOC subsubsection Dynamic substitutions-->
-<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc56">6.7.1</A>  Dynamic substitutions</H4><!--SEC END --><P>Dynamic substitution are mark-up placed in element of the scenario.
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc57">6.7</A>  Advanced features</H3><!--SEC END --><!--TOC subsubsection Dynamic substitutions-->
+<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc58">6.7.1</A>  Dynamic substitutions</H4><!--SEC END --><P>Dynamic substitution are mark-up placed in element of the scenario.
For HTTP, this mark-up can be placed in basic authentication (www_authenticate
tag: userid and passwd attributes), URL (to change GET parameter)
and POST content.</P><P>Those mark-up are of the form <FONT COLOR=purple>%%Module:Function%%</FONT>.
@@ -1836,7 +1896,8 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc56">6.7.1</A>  Dynami
</TABLE></TD></TR>
</TABLE><P>(use <TT>erlc</TT> to compiled the code, and put the resulting .beam
file in <TT>\$PREFIX/lib/erlang/lib/tsung-X.X.X/ebin/</TT> on all client
-machines)</P><P>As you can see, writing scenario with dynamic substitution is trivial.</P><P>If you want to set unique id, you can use the built-in function
+machines)</P><P>As you can see, writing scenario with dynamic substitution is
+simple. It can be even simpler using dynamic variables (see later).</P><P>If you want to set unique id, you can use the built-in function
<TT>ts_user_server:get_unique_id</TT>.
</P><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>
@@ -1858,12 +1919,13 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc56">6.7.1</A>  Dynami
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><!--TOC subsubsection Reading external file-->
-<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc57">6.7.2</A>  Reading external file</H4><!--SEC END --><P>
+<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc59">6.7.2</A>  Reading external file</H4><!--SEC END --><P>
<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
names and passwd from a CSV file, you can do it with it (currently,
-you can read only a single file). <EM>Note: Reading usernames and
-password from a CSV file is not possible for Jabber.</EM></P><P>You have to add this in the XML configuration file:
+you can read only a single file).</P><BLOCKQUOTE CLASS="quote">
+<B>Note:</B> Reading usernames and password from a CSV file is not possible for Jabber.
+</BLOCKQUOTE><P>You have to add this in the XML configuration file:
</P><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>
@@ -1920,7 +1982,10 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc57">6.7.2</A>  Readin
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><P>The output of the function will be a string <FONT COLOR=purple>username=USER&amp;password=PASSWORD</FONT></P><P>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.</P><P>(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>.)</P><P>Then use something like this in your session:</P><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD><TABLE BORDER=0 CELLPADDING=0
+<TT>readcsv.beam</TT> in
+<TT>\$prefix/lib/erlang/lib/tsung-VERSION/ebin</TT> directory (if the
+file has an id set to <FONT COLOR=purple>random</FONT>, change the call to:<BR>
+<TT>ts_file_server:get_next_line(random)</TT>).</P><P>Then use something like this in your session:</P><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>
@@ -1986,7 +2051,7 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc57">6.7.2</A>  Readin
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><P>Much simpler than the old method !</P><!--TOC subsubsection Dynamic variables-->
-<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc58">6.7.3</A>  Dynamic variables</H4><!--SEC END --><P>In some cases, you may want to use a value given by the server in a
+<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc60">6.7.3</A>  Dynamic variables</H4><!--SEC END --><P>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
generated</B> by the server for each user. For this, you can use
<FONT COLOR=purple>&lt;dyn_variable&gt;</FONT> in the scenario</P><P>Let’s take an example with HTTP. You can easily grab a value in a HTML
@@ -2072,8 +2137,8 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc58">6.7.3</A>  Dynami
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><P><B>Since version 1.3.0</B>, more powerful dynamic variables are implemented:</P><P>You can set dynamic variables not only while parsing server data, but
-you can build them using external files or generated them with a function
-or generate random numbers/strings:</P><P>Five type of dynamic variables are currently implemented (<TT>sourcetype</TT> tag):
+you can build them using external files or generate them with a function
+or generate random numbers/strings:</P><P>Six types of dynamic variables are currently implemented (<TT>sourcetype</TT> tag):
</P><OL CLASS="enumerate" type=1><LI CLASS="li-enumerate">
Dynamic variables defined by calling an erlang function:
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD><TABLE BORDER=0 CELLPADDING=0
@@ -2114,7 +2179,7 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc58">6.7.3</A>  Dynami
</TABLE></TD></TR>
</TABLE><TT>delimiter</TT> can be any string, and <TT>order</TT> can be
<FONT COLOR=purple>iter</FONT> or <FONT COLOR=purple>random</FONT>
-</LI><LI CLASS="li-enumerate">Dynamic variable can be a random number
+</LI><LI CLASS="li-enumerate">A dynamic variable can be a random number (uniform distribution)
<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>
@@ -2132,7 +2197,7 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc58">6.7.3</A>  Dynami
</TD></TR>
</TABLE></TD></TR>
</TABLE></TD></TR>
-</TABLE></LI><LI CLASS="li-enumerate">Dynamic variable can be a random string
+</TABLE></LI><LI CLASS="li-enumerate">A dynamic variable can be a random string
<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>
@@ -2150,10 +2215,10 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc58">6.7.3</A>  Dynami
</TD></TR>
</TABLE></TD></TR>
</TABLE></TD></TR>
-</TABLE></LI><LI CLASS="li-enumerate">Dynamic variable can be a urandom string: this is much faster than
+</TABLE></LI><LI CLASS="li-enumerate">A dynamic variable can be a urandom string: this is much faster than
the random string, but the string is not really random: the same set
of characters is always used.
-</LI><LI CLASS="li-enumerate">Dynamic variable can be genarated by dynamic evaluation of
+</LI><LI CLASS="li-enumerate">A dynamic variable can be generated by dynamic evaluation of
erlang code:
<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>
@@ -2176,7 +2241,7 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc58">6.7.3</A>  Dynami
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE></LI></OL><P>A <TT>setdynvars</TT> can be defined anywhere in a session.</P><!--TOC subsubsection Checking the server’s response-->
-<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc59">6.7.4</A>  Checking the server’s response</H4><!--SEC END --><!--TOC paragraph Regexp-->
+<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc61">6.7.4</A>  Checking the server’s response</H4><!--SEC END --><!--TOC paragraph Regexp-->
<H5 CLASS="paragraph"><!--SEC ANCHOR -->Regexp</H5><!--SEC END --><P>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
depending on the result. In any case, if it matches, this will
@@ -2239,12 +2304,12 @@ <H5 CLASS="paragraph"><!--SEC ANCHOR -->XPath</H5><!--SEC END --><P>A new way to
based on XML/HTML parsing. This feature uses the mochiweb library
and <B>only works with erlang R12B and newer version</B>.</P><P>This give us some benefices:</P><UL CLASS="itemize"><LI CLASS="li-itemize">
XPath is simple to write and to read, and match very well with
-html pages
+HTML pages
</LI><LI CLASS="li-itemize">The parser works on binaries(), and doesn’t create any
-string(). In constrant, the regexp module works on string(), so the
+string(). In contrast, the regexp module works on string(), so the
entire page needs to be <TT>binary_to_list/1</TT> transformed before
processing it.
-</LI><LI CLASS="li-itemize">The cost of parsing the html and build the tree is amortized
+</LI><LI CLASS="li-itemize">The cost of parsing the HTML and build the tree is amortized
between all the dyn_variables defined for a given request
</LI></UL><P>To utilize xpath expression, use a <TT>xpath</TT> attribute when
defining the dyn_variable, instead of <TT>regexp</TT>, like:
@@ -2267,7 +2332,7 @@ <H5 CLASS="paragraph"><!--SEC ANCHOR -->XPath</H5><!--SEC END --><P>A new way to
</TABLE><P>There is a bug in the xpath engine, result nodes from "descendant-or-self" aren’t returned in document order. This isn’t a problem for the most common cases.
However, queries like <FONT COLOR=purple>//img[1]/@src</FONT> are not recommended, as the order of the <FONT COLOR=purple>&lt;img&gt;</FONT> elements returned from //img is not the expected.
The order is respected for paths without "descendant-or-self" axis, so this: <FONT COLOR=purple>/html/body/div[2]/img[3]/@src</FONT> is interpreted as expected and can be safely used.</P><P>Basic tests shows a x4 improvement in speed over the <EM>regexp</EM> implementation.</P><!--TOC subsubsection Loops, If-->
-<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc60">6.7.5</A>  Loops, If</H4><!--SEC END --><P><B>Since 1.3.0</B>, it’s now possible to add conditional/unconditional loops in a session:</P><!--TOC paragraph &lt;for&gt;-->
+<H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc62">6.7.5</A>  Loops, If</H4><!--SEC END --><P><B>Since 1.3.0</B>, it’s now possible to add conditional/unconditional loops in a session:</P><!--TOC paragraph &lt;for&gt;-->
<H5 CLASS="paragraph"><!--SEC ANCHOR -->&lt;for&gt;</H5><!--SEC END --><P>Repeat the enclosing actions a fixed number of times. A dynamic
variable is used as counter, so the current iteration could be used in
requests. List of attributes:</P><DL CLASS="description"><DT CLASS="dt-description">
@@ -2350,9 +2415,9 @@ <H5 CLASS="paragraph"><!--SEC ANCHOR -->&lt;if&gt;</H5><!--SEC END --><TABLE BOR
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><P>You can use <TT>eq</TT> or <TT>neq</TT> to check the variable.</P><!--TOC section Statistics and reports-->
-<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc61">7</A>  Statistics and reports</H2><!--SEC END --><P>
+<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc63">7</A>  Statistics and reports</H2><!--SEC END --><P>
<A NAME="sec:statistics-reports"></A></P><!--TOC subsection Available stats-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc62">7.1</A>  Available stats</H3><!--SEC END --><UL CLASS="itemize"><LI CLASS="li-itemize">
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc64">7.1</A>  Available stats</H3><!--SEC END --><UL CLASS="itemize"><LI CLASS="li-itemize">
<TT>request</TT> Response time for each request.
</LI><LI CLASS="li-itemize"><TT>page</TT> Response time for each set of requests (a page is a group
of request not separated by a thinktime).
@@ -2383,7 +2448,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc62">7.1</A>  Available s
session. Count the number of messages sent to the server in response
of a message received from from the server. <B>new in 1.2.2</B>.
</LI></UL><!--TOC subsection Design-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc63">7.2</A>  Design</H3><!--SEC END --><P>A bit of explanation on the design and internals of the statistics engine:</P><P>Tsung was designed to handle thousands of requests/sec, for very
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc65">7.2</A>  Design</H3><!--SEC END --><P>A bit of explanation on the design and internals of the statistics engine:</P><P>Tsung was designed to handle thousands of requests/sec, for very
long period of times (several hours) so it do not write all data to
the disk (for performance reasons). Instead it computes on the fly an
estimation of the mean and standard variation for each type of data,
@@ -2401,7 +2466,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc63">7.2</A>  Design</H3>
</LI><LI CLASS="li-itemize"><TT>sum</TT> for ex. the cumulative HTTP response’s size (it gives an
estimated bandwidth usage).
</LI></UL><!--TOC subsection Generating the report-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc64">7.3</A>  Generating the report</H3><!--SEC END --><P>cd to the log directory of your test (say
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc66">7.3</A>  Generating the report</H3><!--SEC END --><P>cd to the log directory of your test (say
<TT>~/.tsung/log/20040325-16:33/</TT>) and use the script
<TT>tsung_stats.pl</TT>:</P><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>
@@ -2444,8 +2509,8 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc64">7.3</A>  Generating
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><!--TOC subsection Tsung summary-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc65">7.4</A>  Tsung summary</H3><!--SEC END --><P>
-Figure <A HREF="#fig:report">3</A> show an example of a summary report.
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc67">7.4</A>  Tsung summary</H3><!--SEC END --><P>
+Figure <A HREF="#fig:report">3</A> shows an example of a summary report.
</P><BLOCKQUOTE CLASS="figure"><DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV>
<DIV CLASS="center">
<IMG SRC="images/tsung-report.png" ALT="images/tsung-report.png">
@@ -2454,7 +2519,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc65">7.4</A>  Tsung summa
</TABLE></DIV>
<A NAME="fig:report"></A>
<DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV></BLOCKQUOTE><!--TOC subsection Graphical overview-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc66">7.5</A>  Graphical overview</H3><!--SEC END --><P>Figure <A HREF="#fig:graph">4</A> show an example of a graphical report.</P><BLOCKQUOTE CLASS="figure"><DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV>
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc68">7.5</A>  Graphical overview</H3><!--SEC END --><P>Figure <A HREF="#fig:graph">4</A> shows an example of a graphical report.</P><BLOCKQUOTE CLASS="figure"><DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV>
<DIV CLASS="center">
<IMG SRC="images/tsung-graph.png" ALT="images/tsung-graph.png">
</DIV>
@@ -2462,15 +2527,42 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc66">7.5</A>  Graphical o
</TABLE></DIV>
<A NAME="fig:graph"></A>
<DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV></BLOCKQUOTE><!--TOC subsection Tsung Plotter-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc67">7.6</A>  Tsung Plotter</H3><!--SEC END --><P>
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc69">7.6</A>  Tsung Plotter</H3><!--SEC END --><P>
Tsung-Plotter (<TT>tsplot</TT> command) is an optional tool recently
added in the Tsung distribution (it is written in Python), useful to
compare different tests runned by Tsung. <TT>tsplot</TT> is able to
-plot data from several tsung.log files onto the same charts serie, for
-further comparison and analyze. You can easily customise the plots you
-want to generate. You can get more information in the manual page of
-the tool (man tsplot).</P><P>Here’s an example of the charts generated by tsplot:</P><P>FIXME</P><!--TOC section References-->
-<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc68">8</A>  References</H2><!--SEC END --><UL CLASS="itemize"><LI CLASS="li-itemize">
+plot data from several <TT>tsung.log</TT> files onto the same charts,
+for further comparisons and analyzes. You can easily customize the
+plots you want to generate by editing simple configuration files. You
+can get more information in the manual page of the tool (<TT>man
+tsplot</TT>).</P><P>Example of use:
+</P><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">tsplot "First test" firsttest/tsung.log "Second test" secondtest/tsung.log -d outputdir
+</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><P>Here’s an example of the charts generated by tsplot (figure <A HREF="#fig:graph:tsplot">5</A>):</P><BLOCKQUOTE CLASS="figure"><DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV>
+<DIV CLASS="center">
+<IMG SRC="images/connected.png" ALT="images/connected.png">
+</DIV>
+<DIV CLASS="caption"><TABLE CELLSPACING=6 CELLPADDING=0><TR><TD VALIGN=top ALIGN=left>Figure 5: Graphical output of tsplot</TD></TR>
+</TABLE></DIV>
+<A NAME="fig:graph:tsplot"></A>
+<DIV CLASS="center"><HR WIDTH="80%" SIZE=2></DIV></BLOCKQUOTE><!--TOC subsection RRD-->
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc70">7.7</A>  RRD</H3><!--SEC END --><P>
+A contributed perl script <TT>tsung-rrd.pl</TT> is able to create rrd
+files from the tsung log files. It’s available in <TT>/usr/lib/tsung/bin/tsung-rrd.pl</TT></P><!--TOC section References-->
+<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc71">8</A>  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>
</LI><LI CLASS="li-itemize"><EM>Tsung</EM> description (French)<SUP><A NAME="text1" HREF="#note1">1</A></SUP>
</LI><LI CLASS="li-itemize">Erlang web site <A HREF="http://www.erlang.org/"><TT>http://www.erlang.org/</TT></A>
@@ -2480,12 +2572,12 @@ <H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc68">8</A>  References</H2><
Joe Armstrong, Stockholm, 2003 <SUP><A NAME="text3" HREF="#note3">3</A></SUP>
</LI><LI CLASS="li-itemize"><EM>Tutorial on How to write a Tsung plugin</EM>, written by t ty, <A HREF="http://www.process-one.net/en/wiki/Writing_a_Tsung_plugin/"><TT>http://www.process-one.net/en/wiki/Writing_a_Tsung_plugin/</TT></A>
</LI></UL><!--TOC section Acknowledgments-->
-<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc69">9</A>  Acknowledgments</H2><!--SEC END --><P>The first version of this document was based on a talk given by Mickael
+<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc72">9</A>  Acknowledgments</H2><!--SEC END --><P>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
Web benchmarking workshop in April 2004 (more info at
<A HREF="http://jmob.objectweb.org/"><TT>http://jmob.objectweb.org/</TT></A>).</P><!--TOC section Frequently Asked Questions-->
-<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc70">A</A>  Frequently Asked Questions</H2><!--SEC END --><!--TOC subsection Can’t start distributed clients: timeout error -->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc71">A.1</A>  Can’t start distributed clients: timeout error </H3><!--SEC END --><P>Most of the time, when a crash happened at startup without any traffic
+<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc73">A</A>  Frequently Asked Questions</H2><!--SEC END --><!--TOC subsection Can’t start distributed clients: timeout error -->
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc74">A.1</A>  Can’t start distributed clients: timeout error </H3><!--SEC END --><P>Most of the time, when a crash happened at startup without any traffic
generated, the problem arise because the main Erlang controller node cannot
create a "slave" Erlang virtual machine. The message looks like:</P><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>
@@ -2531,7 +2623,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc71">A.1</A>  Can’t sta
</LI><LI CLASS="li-enumerate">Tsung and Erlang are not installed on all clients nodes
</LI><LI CLASS="li-enumerate">Erlang version or location (install path) is not the same on all clients nodes
</LI><LI CLASS="li-enumerate">A firewall is dropping erlang packets: indeed erlang virtual machines use
-several tcp ports (dynamically generated) to communicate.
+several TCP ports (dynamically generated) to communicate.
</LI><LI CLASS="li-enumerate">SELinux: You should disable SELinux on all clients.
</LI><LI CLASS="li-enumerate">Bad <TT>/etc/hosts:</TT>
This one is wrong (real hostname should not refer to localhost/loopback):
@@ -2619,7 +2711,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc71">A.1</A>  Can’t sta
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><!--TOC subsection Tsung crashes when I start it -->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc72">A.2</A>  Tsung crashes when I start it </H3><!--SEC END --><P>Does your Erlang system has ssl support enabled ?</P><P>to test it:
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc75">A.2</A>  Tsung crashes when I start it </H3><!--SEC END --><P>Does your Erlang system has ssl support enabled ?</P><P>to test it:
</P><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>
@@ -2639,7 +2731,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc72">A.2</A>  Tsung crash
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><!--TOC subsection Why do i have error_connect_emfile errors ?-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc73">A.3</A>  Why do i have error_connect_emfile errors ?</H3><!--SEC END --><P>
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc76">A.3</A>  Why do i have error_connect_emfile errors ?</H3><!--SEC END --><P>
<A NAME="sec:faq:emfile"></A>
emfile error means : <EM>too many open files</EM></P><P>This happens usually when you set a high value for <TT>maxusers</TT>
(<TT>in the &lt;client&gt;</TT> section) (the default value is 800).</P><P>The errors means that you are running out of file descriptors; you
@@ -2648,7 +2740,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc73">A.3</A>  Why do i ha
<TT>/etc/security/limits.conf</TT> for Linux ) or decrease <TT>maxusers</TT>
(Tsung will have to start several virtual machine on the same host to
bypass the maxusers limit).</P><!--TOC subsection Tsung still crashes/fails when I start it !-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc74">A.4</A>  Tsung still crashes/fails when I start it !</H3><!--SEC END --><P>
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc77">A.4</A>  Tsung still crashes/fails when I start it !</H3><!--SEC END --><P>
First look at the log file
<TT>~/.tsung/log/XXX/tsung_controller@yourhostname'</TT> to see
if there is a problem.</P><P>If the file is not created and a crashed dump file is present, maybe
@@ -2660,7 +2752,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc74">A.4</A>  Tsung still
an erlang shell on the <TT>tsung_controller</TT> node. Use
<TT>toolbar:start().</TT> to launch the graphical tools provided by
Erlang.</P><!--TOC subsection Can I dynamically follow redirect with HTTP ?-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc75">A.5</A>  Can I dynamically follow redirect with HTTP ?</H3><!--SEC END --><P>If your HTTP server sends 30X responses (redirect) with dynamic URLs,
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc78">A.5</A>  Can I dynamically follow redirect with HTTP ?</H3><!--SEC END --><P>If your HTTP server sends 30X responses (redirect) with dynamic URLs,
you can handle this situation using a dynamic variable:</P><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>
@@ -2711,7 +2803,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc75">A.5</A>  Can I dynam
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><!--TOC subsection What is the format of the stats file tsung.log ?-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc76">A.6</A>  What is the format of the stats file tsung.log ?</H3><!--SEC END --><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD><TABLE BORDER=0 CELLPADDING=0
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc79">A.6</A>  What is the format of the stats file tsung.log ?</H3><!--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>
@@ -2752,11 +2844,11 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc76">A.6</A>  What is the
<TT>session</TT> and transactions (<TT>tr_XXX</TT>:</P><P><TT> # stats:’name’ 10sec_count, 10sec_mean, 10sec_stdvar,
max, min, mean, count</TT></P><P>or for HTTP returns code, size ...</P><P><TT> # stats:’name’ count(during the last 10sec), totalcount(since the beginning)</TT></P><!--TOC subsection How can I compute percentile/quartiles/median for transactions or requests
response time ?-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc77">A.7</A>  How can I compute percentile/quartiles/median for transactions or requests
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc80">A.7</A>  How can I compute percentile/quartiles/median for transactions or requests
response time ?</H3><!--SEC END --><P>It’s not directly possible. But since <B>version 1.3.0</B>, you can
use a new experimental statistic backend: set <FONT COLOR=purple>backend="fullstats"</FONT></P><P>This will print every statistics data in a raw format in a file named
<TT>tsung-fullstats.log</TT>. <B>Warning</B>: this may impact the performance of
-the controller node (a lot of data may be written to disk).</P><P>The data looks like:
+the controller node (a lot of data has to be written to disk).</P><P>The data looks like:
</P><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>
@@ -2789,7 +2881,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc77">A.7</A>  How can I c
</TABLE></TD></TR>
</TABLE><P>You will have to write your own script to analyze the output.
The format of the file may change in a future release.</P><!--TOC subsection How can I specify the number of concurrent users ?-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc78">A.8</A>  How can I specify the number of concurrent users ?</H3><!--SEC END --><P>You can’t. But it’s on purpose: the load generated by
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc81">A.8</A>  How can I specify the number of concurrent users ?</H3><!--SEC END --><P>You can’t. But it’s on purpose: the load generated by
<EM>Tsung</EM> is dependent on the arrival time between new
clients. Indeed, once a client has finished his session in
<EM>tsung</EM>, it stops. So the number of concurrent users is
@@ -2798,7 +2890,9 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc78">A.8</A>  How can I s
load, set the inter-arrival time is to 1/0.27778 = 3.6 <I>sec</I> (<TT>&lt;users
interarrival="3.6" unit="second"&gt;</TT> in the <TT>arrivalphase</TT> node in the
XML config file).</P><!--TOC subsection SNMP monitoring doesn’t work ?!-->
-<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc79">A.9</A>  SNMP monitoring doesn’t work ?!</H3><!--SEC END --><P>It use SNMP v1 and the ’public’ community. It has been tested with
+<H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc82">A.9</A>  SNMP monitoring doesn’t work ?!</H3><!--SEC END --><P>
+<A NAME="sec:faq:snmp"></A>
+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>.</P><P>You can try with <TT>snmpwalk</TT> to see if your snmpd config is ok:</P><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>
@@ -2845,7 +2939,7 @@ <H3 CLASS="subsection"><!--SEC ANCHOR --><A NAME="htoc79">A.9</A>  SNMP monito
</TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE><!--TOC section Errors list-->
-<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc80">B</A>  Errors list</H2><!--SEC END --><DL CLASS="description"><DT CLASS="dt-description">
+<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc83">B</A>  Errors list</H2><!--SEC END --><DL CLASS="description"><DT CLASS="dt-description">
<B>error_closed</B></DT><DD CLASS="dd-description"> Only for non persistent session (XMPP); the
server unexpectedly closed the connection; the session is aborted.
</DD><DT CLASS="dt-description"><B>error_inet_&lt;ERRORNAME&gt;</B></DT><DD CLASS="dd-description"> Network error; see
@@ -2877,7 +2971,7 @@ <H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc80">B</A>  Errors list</H2>
</DD><DT CLASS="dt-description"><B>error_mysql_badpacket</B></DT><DD CLASS="dd-description"> Bad packet received for mysql server while parsing data.
</DD><DT CLASS="dt-description"><B>error_pgsql</B></DT><DD CLASS="dd-description"> Error reported by the postgresql server.
</DD></DL><!--TOC section CHANGELOG-->
-<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc81">C</A>  CHANGELOG</H2><!--SEC END --><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><TR><TD><TABLE BORDER=0 CELLPADDING=0
+<H2 CLASS="section"><!--SEC ANCHOR --><A NAME="htoc84">C</A>  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>
View
193 doc/user_manual.tex
@@ -32,7 +32,7 @@ \section{Introduction}
\subsection{What is Tsung ?}
\program{Tsung} (formerly IDX-Tsunami) is a distributed load testing tool. It is
-protocol-independent and can currently be used to stress HTTP, WebDAV, SOAP,
+ protocol-independent and can currently be used to stress HTTP, WebDAV, SOAP,
PostgreSQL, MySQL, LDAP, and Jabber/XMPP servers.
It is distributed under the GNU General Public License version 2.
@@ -62,7 +62,7 @@ \subsection{What is Erlang and why is it important for Tsung ?}
to \program{Tsung} does not make the whole running benchmark crash.
\end{itemize}
-More informations on Erlang on \url{http://www.erlang.org} and
+More information on Erlang on \url{http://www.erlang.org} and
\url{http://www.erlang-projects.org/}
@@ -84,7 +84,7 @@ \subsection{Tsung background}
for real users simulation. User events distribution is based on a
Poisson Process. More information on this topic in:
-Z. Liu, N. Niclausse, et C. Jalpa-Villanueva. \strong{Traffic Model
+Z. Liu, N. Niclausse, and C. Jalpa-Villanueva. \strong{Traffic Model
and Performance Evaluation of Web Servers}. \emph{Performance Evaluation,
Volume 46, Issue 2-3, October 2001}.
@@ -104,7 +104,7 @@ \subsection{Tsung background}
4-node Tsung cluster (3xSun V240 + 1 Sun V440)
\item 10 000 simultaneous users.
\program{Tsung} was running on a 3-computers cluster (CPU
- 800Mhz)
+ 800MHz)
\end{itemize}
\item \emph{HTTP and HTTPS} protocol:
\begin{itemize}
@@ -143,7 +143,7 @@ \subsection{Tsung main features}
\item \emph{Distributed}: the load can be distributed on a cluster of
client machines
\item \emph{Multi-Protocols} using a plug-in system: HTTP (both standard
-web traffic and SOAP), Webdav, Jabber/XMPP and PostgreSQL are currently
+web traffic and SOAP), WebDAV, Jabber/XMPP and PostgreSQL are currently
supported. Experimental LDAP and MySQL plugins were included in the 1.3.0 release.
\item \emph{SSL} support
\item \emph{Several IP addresses} can be used on a single machine using
@@ -183,8 +183,8 @@ \subsection{HTTP related features}
\subsection{WEBDAV related features}
-The Webdav (RFC 4918) plugin is a superset of the HTTP plugin. It adds the
-following features (some versioning extensions to WebDAV (RFC 3253)
+The WebDAV (RFC 4918) plugin is a superset of the HTTP plugin. It adds the
+following features (some versionning extensions to WebDAV (RFC 3253)
are also supported):
\begin{itemize}
@@ -241,7 +241,8 @@ \subsection{Complete reports set}
\item \emph{Errors}: Statistics on page return code to trace errors
\item \emph{Target server behaviour}: An Erlang agent can gather information
from the target server(s). Tsung produces graphs for CPU and memory
-consumption and network traffic. SNMP is also supported.
+consumption and network traffic. SNMP and munin is also supported to
+monitor remote servers.
\end{itemize}
\par Note that \program{Tsung} takes care of the synchronization process
by itself. Gathered statistics are «synchronized».
@@ -273,7 +274,8 @@ \subsection{Highlights}
\section{Installation}
-This package has been tested on Linux, FreeBSD and Solaris. It should
+This package has been tested on Linux, FreeBSD and Solaris. A port is
+available on MacOS X. It should
work on Erlang supported platforms (Linux, Solaris, *BSD, Win32 and
MacOS-X).
@@ -281,7 +283,7 @@ \subsection{Dependencies}
\begin{itemize}
\item Erlang/OTP R10B-0 and up
(\url{http://www.erlang.org/download.html}). Erlang is now
- part of fedora and debian repository.
+ part of fedora and debian/ubuntu repositories.
\item extended regexp module (used for dynamic variables):
gregexp.erl available at
\url{http://www.cellicium.com/erlang/contribs/} . The module is
@@ -354,12 +356,18 @@ \subsection{Running}
-h display this help and exit
\end{Verbatim}
+A typical way of using tsung is to run:
+\command{tsung -f myconfigfile.xml start}.
+
+The command will print the current log directory created for the test, and wait until the test is
+over.
+
\subsection{Feedback}
Use the Tsung mailing list (see
\url{https://lists.process-one.net/mailman/listinfo/tsung-users}) if you have
suggestions or questions about \program{Tsung}. You can also use the
-bugtracker available at \url{https://support.process-one.net/browse/TSUN}.
+bug-tracker available at \url{https://support.process-one.net/browse/TSUN}.
You can also try the \#tsung IRC channel on Freenode.
\section{Benchmark approach}
@@ -473,7 +481,7 @@ \subsubsection{Acknowledgments of messages}
\begin{Verbatim}
<request> <jabber type="presence" ack="global"/> </request>
\end{Verbatim}
-)
+
You also have to specify the number of users to be connected:
@@ -638,7 +646,7 @@ \subsection{HTTP and WEBDAV}
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
+\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.
@@ -673,7 +681,7 @@ \subsection{File structure}
dump only the first 44 bytes.
The \varname{loglevel} can also have a great impact on performance:
- For high load, \userinput{warning} is recommended .
+ For high load, \userinput{warning} is recommended.
Possible values are:
\begin{itemize}
@@ -696,13 +704,13 @@ \subsection{Clients and server}
For non distributed load, you can use a basic setup like:
\begin{Verbatim}
- <clients>
- <client host="localhost" use_controller_vm="true"/>
- </clients>
+ <clients>
+ <client host="localhost" use_controller_vm="true"/>
+ </clients>
-<servers>
- <server host="192.168.1.1" port="80" type="tcp"></server>
-</servers>
+ <servers>
+ <server host="192.168.1.1" port="80" type="tcp"></server>
+ </servers>
\end{Verbatim}
This will start the load on the same host and on the same Erlang
@@ -712,7 +720,7 @@ \subsection{Clients and server}
if several servers are defined, a round robin algorithm is used to
choose the server).
-The next example is a more complex, and use several features for
+The next example is more complex, and use several features for
advanced distributed testing:
\begin{Verbatim}
@@ -721,9 +729,7 @@ \subsection{Clients and server}
<ip value="10.9.195.12"></ip>
<ip value="10.9.195.13"></ip>
</client>
- <client host="memphis" weight="3" maxusers="600" cpu="2">
- <ip value="10.9.195.14"></ip>
- </client>
+ <client host="memphis" weight="3" maxusers="600" cpu="2"/>
</clients>
<servers>
@@ -742,6 +748,14 @@ \subsection{Clients and server}
with a higher weight, and 2 cpus. Two Erlang virtual machines will be
used to take advantage of the number of CPU.
+ \begin{quote}
+ \strong{Note:} Even if an Erlang VM is now able to handle severals CPUs
+ (erlang SMP), benchmarks shows that it's more efficient to use one VM
+ per CPU (with SMP disabled) for tsung clients. Only the controller node is using SMP
+ erlang. Therefore, you cpu should be equal to the number of cores of
+ your nodes.
+ \end{quote}
+
By default, the load is distributed uniformly on all CPU (one cpu
per client by default). The weight parameter (integer) can be used to
take into account the speed of the client machine. For instance, if
@@ -757,7 +771,7 @@ \subsection{Clients and server}
the number of users is higher than the limit, a new erlang virtual
machine will be started to handle new users. The default value of
\varname{maxusers} is 800 . Nowadays, with kernel polling enable, you
- can use a very large value for \varname{maxusers} (30000 for example) without
+ can and should use a very large value for \varname{maxusers} (30000 for example) without
performance penalty (but don't forget to raise the limit of the OS with
\command{ulimit -n}, see also FAQ \ref{sec:faq:emfile}).
@@ -789,8 +803,8 @@ \subsubsection{Erlang}
\end{Verbatim}
-Note: monitored computers need to be
-accessible through the network, and erlang communcations must be
+Note: monitored computers needs to be
+accessible through the network, and erlang communications must be
allowed (no firewall is better ). SSH (or rsh) needs to be configured to
allow connection without password on. \strong{You must use the same
version of Erlang/OTP on all nodes otherwise it may not work
@@ -801,8 +815,9 @@ \subsubsection{Erlang}
\subsubsection{SNMP}
The type keyword \userinput{snmp} can replace the erlang keyword, if SNMP monitoring
-is preferred. They can be mixed. Since version 1.2.2, you can customize the snmp version,
-community and port number.
+is preferred. They can be mixed. Since version 1.2.2, you can customize the SNMP version,
+community and port number. It uses the MIB provided in
+\program{net-snmp} (see also \ref{sec:faq:snmp}).
\begin{Verbatim}
<monitoring>
@@ -819,7 +834,7 @@ \subsubsection{SNMP}
\subsubsection{Munin}
-Since version 1.3.1, tsung is able to retrieve data from a munin-node agent
+Since version \strong{1.3.1}, Tsung is able to retrieve data from a munin-node agent
(see \url{http://munin.projects.linpro.no/wiki/munin-node}). The \varname{type}
keyword must be set to \userinput{munin}, for example:
@@ -832,6 +847,8 @@ \subsubsection{Munin}
\subsection{Defining the load progression}
+\subsubsection{Randomly generated users}
+
The load progression is set-up by defining several arrival phases:
\begin{Verbatim}
@@ -867,6 +884,36 @@ \subsection{Defining the load progression}
mean value of 100 requests per session and 10 new users per seconds,
the theoretical average throughput will be 1000 requests/ sec).
+\subsubsection{Statically generated users}
+
+If you want to start a given session (see ~\ref{sec:sessions}) at a given time during the test,
+it is possible since version \strong{1.3.1}:
+\begin{Verbatim}
+ <load>
+ <arrivalphase phase="1" duration="10" unit="minute">
+ <users interarrival="2" unit="second"></users>
+ </arrivalphase>
+ <user session="http-example" start_time="185" unit="second"></users>
+ <user session="http-example" start_time="10" unit="minute"></users>
+ <user session="foo" start_time="11" unit="minute"></users>
+</load>
+ <sessions>
+ <session name="http-example" probability="0" type="ts_http">
+ <request> <http url="/" method="GET"></http> </request>
+ </session>
+ <session name="foo" probability="100" type="ts_http">
+ <request> <http url="/" method="GET"></http> </request>
+ </session>
+ <sessions>
+\end{Verbatim}
+
+In this example, we have two sessions, one has a "0" probability (and
+therefore will not be used in the first phase), and the other
+100\%. We define 3 users starting respectively 3mn and 5 seconds
+after the beginning of the test (using the \userinput{http-example}
+session), one starting after 10 minutes, and a last one starting after
+11 minutes (using the \userinput{foo} session this time)
+
\subsection{Setting options}
\par Default values can be set-up globally: \varname{thinktime} between requests
@@ -921,7 +968,7 @@ \subsubsection{Jabber options}
\item passwd = sesame
\end{itemize}
-You can also set the \varname{muc_service} here (see previous example).
+You can also set the \varname{muc\_service} here (see previous example).
\subsubsection{HTTP options}
@@ -941,7 +988,7 @@ \subsubsection{HTTP options}
\end{Verbatim}
\subsection{Sessions}
-
+\label{sec:sessions}
Sessions define the content of the scenario itself. They describe
the requests to execute.
@@ -951,6 +998,8 @@ \subsection{Sessions}
session a new user will execute. The sum of all session\verb|'|s
probabilities must be 100.
+
+
A transaction is just a way to have customized statistics. Say if you
want to know the response time of the login page of your website, you
just have to put all the requests of this page (HTML + embedded
@@ -975,7 +1024,8 @@ \subsubsection{Thinktimes}
mean equals to 20 seconds.
\strong{Since version 1.3.0}, you can also use a range
-\userinput{[min:max]} instead of a mean for random thinktimes:
+\userinput{[min:max]} instead of a mean for random thinktimes (the
+distribution will be uniform in the interval):
\begin{Verbatim}
<thinktime min="2" max="10" random="true"></thinktime>
\end{Verbatim}
@@ -1040,7 +1090,7 @@ \subsubsection{HTTP}
</request>
\end{Verbatim}
-\strong{New in 1.3.O:} You can also read the content of a POST or PUT
+\strong{New in 1.3.0:} You can also read the content of a POST or PUT
request from an external file:
\begin{Verbatim}
@@ -1362,7 +1412,7 @@ \subsubsection{LDAP}
If the bind is successful, the user is authenticated (this is the
scheme used, among others, by the LDAP authentication module for
-apache \url{http://httpd.apache.org/docs/2.0/mod/mod_auth_ldap.html})
+Apache \url{http://httpd.apache.org/docs/2.0/mod/mod_auth_ldap.html})
\paragraph{LDAP Setup}
For this example we are going to use a simple repository with the following hierarchy:
@@ -1541,7 +1591,8 @@ \subsubsection{Dynamic substitutions}
file in \file{\$PREFIX/lib/erlang/lib/tsung-X.X.X/ebin/} on all client
machines)
-As you can see, writing scenario with dynamic substitution is trivial.
+As you can see, writing scenario with dynamic substitution is
+simple. It can be even simpler using dynamic variables (see later).
If you want to set unique id, you can use the built-in function
\varname{ts\_user\_server:get\_unique\_id}.
@@ -1557,8 +1608,11 @@ \subsubsection{Reading external file}
\strong{New in 1.0.3}: A new module \varname{ts\_file\_server} is available. You
can use it to read external files. For example, if you need to read user
names and passwd from a CSV file, you can do it with it (currently,
-you can read only a single file). \emph{Note: Reading usernames and
-password from a CSV file is not possible for Jabber.}
+you can read only a single file).
+
+\begin{quote}
+ \strong{Note:} Reading usernames and password from a CSV file is not possible for Jabber.
+\end{quote}
You have to add this in the XML configuration file:
\begin{Verbatim}
@@ -1588,9 +1642,10 @@ \subsubsection{Reading external file}
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)}.)
+\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:
@@ -1682,10 +1737,10 @@ \subsubsection{Dynamic variables}
\strong{Since version 1.3.0}, more powerful dynamic variables are implemented:
You can set dynamic variables not only while parsing server data, but
-you can build them using external files or generated them with a function
+you can build them using external files or generate them with a function
or generate random numbers/strings:
-Five type of dynamic variables are currently implemented (\varname{sourcetype} tag):
+Six types of dynamic variables are currently implemented (\varname{sourcetype} tag):
\begin{enumerate}
\item Dynamic variables defined by calling an erlang function:
\begin{Verbatim}
@@ -1702,22 +1757,22 @@ \subsubsection{Dynamic variables}
\end{Verbatim}
\varname{delimiter} can be any string, and \varname{order} can be
\userinput{iter} or \userinput{random}
-\item Dynamic variable can be a random number
+\item A dynamic variable can be a random number (uniform distribution)
\begin{Verbatim}
<setdynvars sourcetype="random_number" start="3" end="32">
<var name="rndint" />
</setdynvars>
\end{Verbatim}
-\item Dynamic variable can be a random string
+\item A dynamic variable can be a random string
\begin{Verbatim}
<setdynvars sourcetype="random_string" length="13">
<var name="rndstring1" />
</setdynvars>
\end{Verbatim}
-\item Dynamic variable can be a urandom string: this is much faster than
+\item A dynamic variable can be a urandom string: this is much faster than
the random string, but the string is not really random: the same set
of characters is always used.
-\item Dynamic variable can be genarated by dynamic evaluation of
+\item A dynamic variable can be generated by dynamic evaluation of
erlang code:
\begin{Verbatim}
<setdynvars sourcetype="eval"
@@ -1789,12 +1844,12 @@ \subsubsection{Checking the server's response}
\begin{itemize}
\item XPath is simple to write and to read, and match very well with
- html pages
+ HTML pages
\item The parser works on binaries(), and doesn't create any
- string(). In constrant, the regexp module works on string(), so the
+ string(). In contrast, the regexp module works on string(), so the
entire page needs to be \varname{binary\_to\_list/1} transformed before
processing it.
-\item The cost of parsing the html and build the tree is amortized
+\item The cost of parsing the HTML and build the tree is amortized
between all the dyn\_variables defined for a given request
\end{itemize}
@@ -1975,7 +2030,7 @@ \subsection{Generating the report}
\end{Verbatim}
\subsection{Tsung summary}
-Figure \ref{fig:report} show an example of a summary report.
+Figure \ref{fig:report} shows an example of a summary report.
\begin{figure}[htb]
\begin{center}
\includegraphics[width=0.6\linewidth]{tsung-report}
@@ -1986,7 +2041,7 @@ \subsection{Tsung summary}
\subsection{Graphical overview}
-Figure \ref{fig:graph} show an example of a graphical report.
+Figure \ref{fig:graph} shows an example of a graphical report.
\begin{figure}[htb]
\begin{center}
@@ -1999,14 +2054,30 @@ \subsection{Tsung Plotter}
Tsung-Plotter (\command {tsplot} command) is an optional tool recently
added in the Tsung distribution (it is written in Python), useful to
compare different tests runned by Tsung. \command{tsplot} is able to
-plot data from several tsung.log files onto the same charts serie, for
-further comparison and analyze. You can easily customise the plots you
-want to generate. You can get more information in the manual page of
-the tool (man tsplot).
+plot data from several \file{tsung.log} files onto the same charts,
+for further comparisons and analyzes. You can easily customize the
+plots you want to generate by editing simple configuration files. You
+can get more information in the manual page of the tool (\command{man
+ tsplot}).
-Here's an example of the charts generated by tsplot:
+Example of use:
+\begin{Verbatim}
+tsplot "First test" firsttest/tsung.log "Second test" secondtest/tsung.log -d outputdir
+\end{Verbatim}
-FIXME
+Here's an example of the charts generated by tsplot (figure \ref{fig:graph:tsplot}):
+
+\begin{figure}[htb]
+ \begin{center}
+ \includegraphics[width=0.6\linewidth]{connected}
+ \end{center}
+ \caption{Graphical output of tsplot}
+ \label{fig:graph:tsplot}
+\end{figure}
+
+\subsection{RRD}
+A contributed perl script \command{tsung-rrd.pl} is able to create rrd
+files from the tsung log files. It's available in \file{/usr/lib/tsung/bin/tsung-rrd.pl}
\section{References}
@@ -2066,7 +2137,7 @@ \subsection{Can't start distributed clients: timeout error }
\item Tsung and Erlang are not installed on all clients nodes
\item Erlang version or location (install path) is not the same on all clients nodes
\item A firewall is dropping erlang packets: indeed erlang virtual machines use
-several tcp ports (dynamically generated) to communicate.
+several TCP ports (dynamically generated) to communicate.
\item SELinux: You should disable SELinux on all clients.
\item Bad \file{/etc/hosts:}
This one is wrong (real hostname should not refer to localhost/loopback):
@@ -2247,7 +2318,7 @@ \subsection{How can I compute percentile/quartiles/median for transactions or re
This will print every statistics data in a raw format in a file named
\file{tsung-fullstats.log}. \strong{Warning}: this may impact the performance of
-the controller node (a lot of data may be written to disk).
+the controller node (a lot of data has to be written to disk).
The data looks like:
\begin{Verbatim}
@@ -2288,7 +2359,7 @@ \subsection{How can I specify the number of concurrent users ?}
XML config file).
\subsection{SNMP monitoring doesn't work ?!}
-
+\label{sec:faq:snmp}
It use SNMP v1 and the 'public' community. It has been tested with
\url{http://net-snmp.sourceforge.net/}.
Please sign in to comment.
Something went wrong with that request. Please try again.