3. Installation

This package has been tested on Linux, FreeBSD and Solaris. A port is available on Mac OS X. It should work on Erlang supported platforms (Linux, Solaris, *BSD, Win32 and Mac OS X).

On Mac OS X you can install Tsung via Homebrew (http://brew.sh/): brew install tsung.

3.1. Dependencies

  • Erlang/OTP R14B and up (download). Erlang is now part of Fedora and Debian/Ubuntu repositories.
  • pgsql module made by Christian Sunesson (for the PostgreSQL plugin): sources available at http://jungerl.sourceforge.net/ . The module is included in the source and binary distribution of Tsung. It is released under the EPL License.
  • mysql module made by Magnus Ahltorp & Fredrik Thulin (for the mysql plugin): sources available at http://www.stacken.kth.se/projekt/yxa/. The modified module is included in the source and binary distribution of Tsung. It is released under the three-clause BSD License.
  • eldap module (for the LDAP plugin): sources available at http://jungerl.sourceforge.net/. The module is included in the source and binary distribution of Tsung. It is released under the GPL License.
  • mochiweb libs (for XPath parsing, optionally used for dynamic variables in the HTTP plugin): sources available at https://github.com/mochi/mochiweb. The module is included in the source and binary distribution of Tsung. It is released under the MIT License.
  • gnuplot and perl5 (optional; for graphical output with tsung_stats.pl script). The Template Toolkit is used for HTML reports (see http://template-toolkit.org/).
  • python and matplotlib (optional; for graphical output with tsung-plotter).
  • for distributed tests, you need SSH access to remote machines without password (use a RSA/DSA key without passphrase or ssh-agent). Alternatively rsh is also supported.
  • bash

3.2. Compilation

To compile Tsung, just download the latest version from http://tsung.erlang-projects.org/dist/ and run:

make install

If you want to download the latest development version, use git:

git clone https://github.com/processone/tsung.git, see also https://github.com/processone/tsung.

You can also build packages with make deb (on Debian and Ubuntu) and make rpm (on Fedora, RHEL and other rpm based distribution).

3.3. Configuration

The default configuration file is ~/.tsung/tsung.xml (there are several sample files in /usr/share/doc/tsung/examples).

Log files are saved in ~/.tsung/log/. A new subdirectory is created for each test using the current date and time as name, e.g. ~/.tsung/log/20040217-0940.

3.4. Running

Two commands are installed in the directory $PREFIX/bin: tsung and tsung-recorder. A man page is available for both commands.

$ tsung -h
Usage: tsung <options> start|stop|debug|status
    -f <file>     set configuration file (default is ~/.tsung/tsung.xml)
                   (use - for standard input)
    -l <logdir>   set log directory where YYYYMMDD-HHMM dirs are created (default is ~/.tsung/log/)
    -i <id>       set controller id (default is empty)
    -r <command>  set remote connector (default is ssh)
    -s            enable erlang smp on client nodes
    -p <max>      set maximum erlang processes per vm (default is 250000)
    -X <dir>      add additional erlang load paths (multiple -X arguments allowed)
    -m <file>     write monitoring output on this file (default is tsung.log)
                   (use - for standard output)
    -F            use long names (FQDN) for erlang nodes
    -L <lifetime> SSL session lifetime (600sec by default)
    -w <delay>    warmup delay (default is 1 sec)
    -n            disable web GUI (started by default on port 8091)
    -k            keep web GUI (and controller) alive after the test has finished
    -v            print version information and exit
    -6            use IPv6 for Tsung internal communications
    -x <tags>     list of requests tag to be excluded from the run (separated by comma)
    -h            display this help and exit

A typical way of using tsung is to run: tsung -f myconfigfile.xml start.

The command will print the current log directory created for the test, and wait until the test is over. By default an embedded web server will be started on the controller node and will listen on the 8091 port (this can be disabled with the -n option.

3.5. Feedback

Use the Tsung mailing list if you have suggestions or questions about Tsung. You can also use the bug tracker available at https://github.com/processone/tsung/issues

You can also try the #tsung IRC channel on Freenode.

Table Of Contents

Previous topic

2. Features

Next topic

4. Benchmark Approach

This Page