First, pre-installation inspection environment
1. Check the Environment:
[Email protected] bin]# lsb_release-alsb Version: : Base-4.0-amd64:base-4.0-noarch: CORE-4.0-AMD64:CORE-4.0-NOARCH:GRAPHICS-4.0-AMD64:GRAPHICS-4.0-NOARCH:PRINTING-4.0-AMD64: Printing-4.0-noarchdistributor ID: centosdescription: CentOS release 6.4 (Final) Release: 6.4Codename: Final
2. Ensure that the following tools are installed:
Yum install gcc-y Yum install perl-y yum install UnixODBC yum install unixodbc-devel
Second, installation
1. Download and install Erlang
[Email protected] ~]#cd/usr/local[[email protected] local]#mdir-p erlangwget/http Www.erlang.org/download/otp_src_R14B04.tar.gz
Note: If the "configure:error:No Curses library functions found" error appears, try to install:
[Email protected] otp_src_r14b04]#yum install-y ncurses-devel
2. Download and install Tsung
[Email protected] ~]#cd/usr/local[[email protected] local]#mkdir-p Tsung
TAR-ZXVF tsung-1.4.2.tar.gz ./configure--prefix=/usr/local/tsung--with-erlang=/usr/local/ Erlangmakeinstall
3. Download and install the Perl template to generate the report template
[Email protected] ~]#cd/usr/localwget http://cpan.org/modules/by-module/Template/ template-toolkit-2.24.tar.gzcd template-toolkit-2.24 make Test
4. Download and install gnuplot for chat generation
[Email protected] local]#yum install-y gnuplot gd libpng zlib
III. setting environment variables after installation
Add Erlang, Tsung environment variables after installation
vim/etc/profile Export path= $PATH: $JAVA _home/bin:/usr/local/erlang/bin:/usr/local/tsung/bin:/usr/local/nginx/sbin:$ PATH (Modify your actual variable) : Wq save, exit source/etc/profile no error is successful tsung-v Erlang r14b04 (erts-5.8.5) [source] [64-bit] [rq:1] [async-threads:0] [hipe] [Kernel-poll:false]eshell V5.8.5 (Abort with ^G) 1>
Iv. using and generating reports
1. Create a new. Tsung directory under the root folder for log and XML configuration, and the test configuration file can be referenced in the/usr/local/tsung/share/doc/tsung/examples/directory
[Email protected] local]#mkdir ~/.tsung[[email protected] local]#cp/usr/local/tsung/share/doc/tsung/ Examples/http_simple.xml ~/.tsung/tsung.xml
2, run, default execution script ~/.tsung/tsung.xml configuration
Tsung Start Starting Tsung "Log directory is:/root/.tsung/log/20150311-0536"
3. Enter the log directory to see the generated report information
cd/root/.tsung/log/20150311-0536 ls-a... Match.log [email protected] Tsung.log tsung.xml
4. Enter the log directory where the graphical report needs to be generated, such as/root/.tsung/log/20150311-0536
/usr/local/tsung/lib/tsung/bin/tsung_stats.pl lsdata gnuplot.log gnuplot_scripts graph.html images match.log report.html [email protected] Tsung.log tsung.xml
5, drag the report.html to the Windows system, directly open to view.
CentOS Stress test Tool Tsung installation, use, and graphical report generation