Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add an option to set an unique id in the erlang nodes name (TSUN-116)

SVN Revision: 1017
  • Loading branch information...
commit e0bd0f1fca2705da9aab02db04e5b8e72ed41922 1 parent 25caf25
@nniclausse nniclausse authored
View
60 doc/tsung-recorder.1
@@ -1,25 +1,19 @@
-.\" 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 "TSUNG-RECORDER" "1" "05 mars 2009" "" ""
-
+.\\" auto-generated by docbook2man-spec $Revision: 1.1 $
+.TH "TSUNG-RECORDER" "1" "March 2009" "" ""
.SH NAME
tsung-recorder \- Proxy recorder for the tsung load testing tool.
.SH SYNOPSIS
-
-\fBtsung-recorder\fR [ \fB-l log file\fR ] [ \fB-r command\fR ] [ \fB-p plugin\fR ] [ \fB-L listen port\fR ] [ \fB-I IP\fR ] [ \fB-P port\fR ] [ \fB-u \fR ] [ \fBstart|stop|restart|record_tag\fR ]
-
+.sp
+\fBtsung-recorder\fR [ \fB-l log file\fR ] [ \fB-r command\fR ] [ \fB-p plugin\fR ] [ \fB-L listen port\fR ] [ \fB-I IP\fR ] [ \fB-P port\fR ] [ \fB-u \fR ] [ \fBstart|stop|restart|record_tag\fR ]
.SH "DESCRIPTION"
.PP
\fBtsung\fR is a distributed load testing
-tool. It is protocol-independent and can currently be used to
+tool. It is protocol-independent and can currently be used to
stress and benchmark HTTP, WebDAV, LDAP, PostgreSQL, MySQL and
Jabber/XMPP servers. \fBtsung-recorder\fR can be
used to record sessions (only for HTTP, WebDAV and Postgresql) that can be edited and replayed later by tsung
.PP
-tsung-recorder is a proxy that records a session in the
+tsung-recorder is a proxy that records a session in the
tsung native XML format; it can be used by your favorite client (browser in the case of the http plugin).
.TP
\fBstart\fR
@@ -35,24 +29,33 @@ while recording a session.
.SH "MANUAL"
.PP
A manual should be available at
-\fI/usr/share/doc/tsung/user_manual.html\fR\&. It
+\fI/usr/share/doc/tsung/user_manual.html\fR. It
is also available online at
+.sp
+.RS
+.sp
+.nf
http://tsung.erlang-projects.org/user_manual.html
+.sp
+.fi
+.RE
+.sp
.SH "OPTIONS"
.TP
-\fB-l\fR
+\fB-l logfile\fR
Specifies the log file to use. The default log file name is \fI~/tsung/log/tsung.log\fR
.TP
-\fB-p\fR
-Specifies the plugin used for the recorder. Default is http, available: http, pgsql,webdav
+\fB-p plugin\fR
+Specifies the plugin used for the recorder. Default is
+http, available: http, pgsql, webdav
.TP
-\fB-L\fR
+\fB-L port\fR
Listening port for the recorder. Default is 8090
.TP
-\fB-I\fR
+\fB-I IP\fR
For the pgsql recorder (or parent proxy): server IP. default is 127.0.0.1
.TP
-\fB-P\fR
+\fB-P port\fR
For the pgsql recorder (or parent proxy): server port. Default is 5432
.TP
\fB-u\fR
@@ -61,15 +64,24 @@ For the http recorder: use a parent proxy
.PP
Please reports bugs to the mailing list
<tsung-users@process-one.net>, see
-https://lists.process-one.net/mailman/listinfo/tsung-users for
+.sp
+.RS
+.sp
+.nf
+https://lists.process-one.net/mailman/listinfo/tsung-users
+.sp
+.fi
+.RE
+.sp
+for
archives.
.SH "SEE ALSO"
.PP
-\fIerlang\fR(3)
-and \fItsung\fR(3)
+\fBerlang\fR(3)
+and \fBtsung\fR(1)
.SH "AUTHORS"
.PP
-\fBTsung\fR is written by Nicolas Niclausse
-<nicolas@niclux.org>\&. Contributors list
+\fBTsung\fR is written by Nicolas Niclausse
+<nicolas@niclux.org>. Contributors list
is available in
\fI/usr/share/doc/tsung/CONTRIBUTORS\fR
View
20 doc/tsung-recorder.1.sgml
@@ -89,31 +89,32 @@ Proxy recorder for the tsung load testing tool.
<title>options</title>
<variablelist>
<varlistentry>
- <term><option>-l</option></term>
+ <term><option>-l logfile</option></term>
<listitem>
<para>Specifies the log file to use. The default log file name is <filename>~/tsung/log/tsung.log</filename></para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-p</option></term>
+ <term><option>-p plugin</option></term>
<listitem>
- <para> Specifies the plugin used for the recorder. Default is http, available: http, pgsql,webdav</para>
+ <para> Specifies the plugin used for the recorder. Default is
+ http, available: http, pgsql, webdav</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-L</option></term>
+ <term><option>-L port</option></term>
<listitem>
<para> Listening port for the recorder. Default is 8090</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-I</option></term>
+ <term><option>-I IP</option></term>
<listitem>
<para> For the pgsql recorder (or parent proxy): server IP. default is 127.0.0.1 </para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-P</option></term>
+ <term><option>-P port</option></term>
<listitem>
<para> For the pgsql recorder (or parent proxy): server port. Default is 5432</para>
</listitem>
@@ -138,19 +139,18 @@ Proxy recorder for the tsung load testing tool.
<refsect1>
<title>see also</title>
<para>
-<filename>erlang</filename><manvolnum>3</manvolnum>
- and <filename>tsung</filename><manvolnum>3</manvolnum>
+ <citerefentry><refentrytitle>erlang</refentrytitle><manvolnum>3</manvolnum></citerefentry>
+ and <citerefentry><refentrytitle>tsung</refentrytitle><manvolnum>1</manvolnum></citerefentry>
</para>
</refsect1>
<refsect1>
<title>Authors</title>
<para>
- <command>Tsung</command> is written by <author>Nicolas Niclausse</author>
+ <command>Tsung</command> is written by <author><firstname>Nicolas</firstname> <surname>Niclausse</surname></author>
<email>nicolas@niclux.org</email>. Contributors list
is available in
<filename>/usr/share/doc/tsung/CONTRIBUTORS</filename>
</para>
</refsect1>
-
</refentry>
View
59 doc/tsung.1
@@ -1,33 +1,27 @@
-.\" 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 "TSUNG" "1" "05 mars 2009" "" ""
-
+.\\" auto-generated by docbook2man-spec $Revision: 1.1 $
+.TH "TSUNG" "1" "January 2004" "" ""
.SH NAME
tsung \- A distributed multi-protocol load testing tool.
.SH SYNOPSIS
-
-\fBtsung\fR [ \fB-f configuration file\fR ] [ \fB-l log file\fR ] [ \fB-r command\fR ] [ \fB-v\fR ] [ \fB-h\fR ] [ \fBstart|stop|restart|debug|status\fR ]
-
+.sp
+\fBtsung\fR [ \fB-f configuration file\fR ] [ \fB-l log file\fR ] [ \fB-r command\fR ] [ \fB-v\fR ] [ \fB-h\fR ] [ \fBstart|stop|restart|debug|status\fR ]
.SH "DESCRIPTION"
.PP
\fBtsung\fR is a distributed load testing
-tool. It is protocol-independent and can currently be used to
+tool. It is protocol-independent and can currently be used to
stress and benchmark HTTP, WebDAV, LDAP, PostgreSQL, MySQL and Jabber/XMPP servers.
.PP
It simulates user behaviour using an XML description file,
reports many measurements in real time (statistics can be
customized with transactions, and graphics generated using
-gnuplot).
+gnuplot).
.PP
For HTTP, it supports 1.0 and 1.1, has a proxy mode to
record sessions, supports GET and POST methods, Cookies, and Basic
-WWW-authentication. It also has support for SSL.
+WWW-authentication. It also has support for SSL.
.PP
Several config examples can be found in
-\fI/usr/share/doc/tsung/examples/\fR\&.
+\fI/usr/share/doc/tsung/examples/\fR.
.TP
\fBstart\fR
start tsung load testing
@@ -43,20 +37,32 @@ print current status of a running instance of tsung (must be run on the controll
.SH "MANUAL"
.PP
A manual should be available at
-\fI/usr/share/doc/tsung/user_manual.html\fR\&. It
+\fI/usr/share/doc/tsung/user_manual.html\fR. It
is also available online at
+.sp
+.RS
+.sp
+.nf
http://tsung.erlang-projects.org/user_manual.html
+.sp
+.fi
+.RE
+.sp
.SH "OPTIONS"
.TP
-\fB-f\fR
+\fB-f filename\fR
specifies the configuration file to use. The default file name is \fI~/.tsung/tsung.xml\fR
.TP
-\fB-l\fR
+\fB-l logfile\fR
Specifies the log file to use. The default log file name is \fI~/tsung/log/tsung.log\fR
.TP
-\fB-r\fR
+\fB-r command\fR
Specifies an alternative to ssh (rsh for ex.) for starting a slave node on a remote host
.TP
+\fB-i id\fR
+set controller id (default is empty). Needed to start
+several controllers on the same host.
+.TP
\fB-v\fR
Show version
.TP
@@ -66,14 +72,23 @@ Show usage
.PP
Please reports bugs to the mailing list
<tsung-users@process-one.net>, see
-https://lists.process-one.net/mailman/listinfo/tsung-users for
+.sp
+.RS
+.sp
+.nf
+https://lists.process-one.net/mailman/listinfo/tsung-users
+.sp
+.fi
+.RE
+.sp
+for
archives.
.SH "SEE ALSO"
.PP
-\fIerlang\fR(3)
+\fBerlang\fR(3)
.SH "AUTHORS"
.PP
-\fBTsung\fR is written by Nicolas Niclausse
-<nicolas@niclux.org>\&. Contributors list
+\fBTsung\fR is written by Nicolas Niclausse
+<nicolas@niclux.org>. Contributors list
is available in
\fI/usr/share/doc/tsung/CONTRIBUTORS\fR
View
17 doc/tsung.1.sgml
@@ -100,24 +100,31 @@ A distributed multi-protocol load testing tool.
<title>options</title>
<variablelist>
<varlistentry>
- <term><option>-f</option></term>
+ <term><option>-f filename</option></term>
<listitem>
<para>specifies the configuration file to use. The default file name is <filename>~/.tsung/tsung.xml</filename></para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-l</option></term>
+ <term><option>-l logfile</option></term>
<listitem>
<para>Specifies the log file to use. The default log file name is <filename>~/tsung/log/tsung.log</filename></para>
</listitem>
</varlistentry>
<varlistentry>
- <term><option>-r</option></term>
+ <term><option>-r command</option></term>
<listitem>
<para> Specifies an alternative to ssh (rsh for ex.) for starting a slave node on a remote host</para>
</listitem>
</varlistentry>
<varlistentry>
+ <term><option>-i id</option></term>
+ <listitem>
+ <para> set controller id (default is empty). Needed to start
+ several controllers on the same host.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term><option>-v</option></term>
<listitem>
<para> Show version</para>
@@ -142,14 +149,14 @@ A distributed multi-protocol load testing tool.
<refsect1>
<title>see also</title>
- <para><filename>erlang</filename><manvolnum>3</manvolnum>
+ <para><citerefentry><refentrytitle>erlang</refentrytitle><manvolnum>3</manvolnum></citerefentry>
</para>
</refsect1>
<refsect1>
<title>Authors</title>
<para>
- <command>Tsung</command> is written by <author>Nicolas Niclausse</author>
+ <command>Tsung</command> is written by <author><firstname>Nicolas</firstname> <surname>Niclausse</surname></author>
<email>nicolas@niclux.org</email>. Contributors list
is available in
<filename>/usr/share/doc/tsung/CONTRIBUTORS</filename>
View
6 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>1000</TD></TR>
-<TR><TD ALIGN=left NOWRAP bgcolor="#F2F2F2"> Date :</TD><TD ALIGN=left NOWRAP>9 mars 2009</TD></TR>
+<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=1><TR><TD ALIGN=left NOWRAP bgcolor="#F2F2F2"> Version:</TD><TD ALIGN=left NOWRAP>1001</TD></TR>
+<TR><TD ALIGN=left NOWRAP bgcolor="#F2F2F2"> Date :</TD><TD ALIGN=left NOWRAP>4 avril 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">
@@ -466,7 +466,7 @@ <H4 CLASS="subsubsection"><!--SEC ANCHOR --><A NAME="htoc22">4.1.1</A>  Benchm
interarrival time between users and the duration of the phase to estimate
the number of simultaneous users for each given phase.
</LI><LI CLASS="li-enumerate">Launch benchmark with your first application parameters set-up:
-<TT>tsung start</TT>
+<TT>tsung start</TT> (run <TT>man tsung</TT> for more options)
</LI><LI CLASS="li-enumerate">Wait for the end of the test or stop by hand with
<TT>tsung stop</TT> (reports can also be generated during the
test (see § <A HREF="#sec:statistics-reports">7</A>) : the statistics are
View
2  doc/user_manual.tex
@@ -365,7 +365,7 @@ \subsubsection{Benchmarking a Web server}
interarrival time between users and the duration of the phase to estimate
the number of simultaneous users for each given phase.
\item Launch benchmark with your first application parameters set-up:
- \command{tsung start}
+ \command{tsung start} (run \command{man tsung} for more options)
\item Wait for the end of the test or stop by hand with
\command{tsung stop} (reports can also be generated during the
test (see § \ref{sec:statistics-reports}) : the statistics are
View
15 src/tsung_controller/ts_config_server.erl
@@ -367,7 +367,7 @@ handle_cast({newbeam, Host, _}, State=#state{ hostname=LocalHost,config=Config})
%% start a launcher on a new beam with slave module
handle_cast({newbeam, Host, Arrivals}, State=#state{last_beam_id = NodeId}) ->
- Name = "tsung" ++ integer_to_list(NodeId),
+ Name = set_nodename(NodeId),
{ok, [[BootController]]} = init:get_argument(boot),
?DebugF("BootController ~p~n", [BootController]),
{ok, [[?TSUNGPATH,PathVar]]} = init:get_argument(boot_var),
@@ -681,3 +681,16 @@ static_name_to_session(Sessions, Static) ->
Res=lists:map(Search, Static),
?LOGF("Static users with session id ~p~n",[Res],?DEB),
Res.
+
+%% @spec set_nodename(NodeId::integer()) -> string()
+%% @doc set slave node name: check if controller node name has an id,
+%% and put it in the slave name
+set_nodename(NodeId) when is_integer(NodeId)->
+ CId = case atom_to_list(node()) of
+ "tsung_controller@"++_ ->
+ "";
+ "tsung_controller"++Tail ->
+ [Id|_] = string:tokens(Tail,"@"),
+ Id++"_"
+ end,
+ "tsung"++ CId++ integer_to_list(NodeId).
View
5 tsung.sh.in
@@ -121,6 +121,7 @@ usage() {
echo "Options:"
echo " -f <file> set configuration file (default is ~/.tsung/tsung.xml)"
echo " -l <logfile> set log file (default is ~/.tsung/log/tsung.log)"
+ echo " -i <id> set controller id (default is empty)"
echo " -r <command> set remote connector (default is ssh)"
echo " -v print version information and exit"
echo " -h display this help and exit"
@@ -144,6 +145,10 @@ do
r) ERL_RSH=" -rsh $OPTARG ";;
F) NAMETYPE="-name";;
v) version;;
+ i) ID=$OPTARG
+ COOKIE=$COOKIE"_"$ID
+ CONTROLLER=$CONTROLLER"_"$ID
+ ;;
h) usage;;
*) usage ;;
esac
Please sign in to comment.
Something went wrong with that request. Please try again.