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 R13B 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 mathplotlib (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:

./configure
make
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
Options:
    -f <file>     set configuration file (default is ~/.tsung/tsung.xml)
                   (use - for standard input)
    -l <logdir>   set log directory (default is ~/.tsung/log/YYYYMMDD-HHMM/)
    -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)
    -m <file>     write monitoring output on this file (default is tsung.log)
                   (use - for standard output)
    -F            use long names (FQDN) for erlang nodes
    -w            warmup delay (default is 10 sec)
    -v            print version information and exit
    -6            use IPv6 for Tsung internal communications
    -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.

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://support.process-one.net/browse/TSUN.

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