CentOS 操作系统下搭建tsung性能测试环境_Part 2

by:授客 QQ1033553122

--------------------接CentOS

操作系统下搭建tsung性能测试环境_Part
1---------------------

#如上,提示错误,解决方法:安装perl-Test-Pod

[root@localhost
otp_src_17.1]# yum install perl-Test-Pod

#继续安装Template
Toolkit

[root@localhost
Template-Toolkit-2.25]# make test

[root@localhost
Template-Toolkit-2.25]# make install


步骤
5#安装perlgnuplot

[root@localhost software]#
tar -xvf gnuplot-4.0.0.tar.gz

[root@localhost software]#
cd gnuplot-4.0.0

[root@localhost
gnuplot-4.0.0]# ./configure --prefix=/usr/local/gnuplot

[root@localhost
gnuplot-4.0.0]# make && make install

...

touch: missing
file operand

Try `touch
--help' for more information.

../mkinstalldirs
/usr/local/gnuplot/info

mkdir -p --
/usr/local/gnuplot/info

/usr/bin/install
-c -m 644 gnuplot.info
/usr/local/gnuplot/info/gnuplot.info

/usr/bin/install:
cannot stat `gnuplot.info': No such file or directory

make[1]: ***
[install-info] Error 1

make[1]: Leaving
directory `/root/software/gnuplot-4.0.0/docs'

make: ***
[install-recursive] Error 1

#如上,提示错误,解决方法:安装texinfo

[root@localhost
otp_src_17.1]# yum install texinfo

#继续安装perlgnuplot

[root@localhost
gnuplot-4.0.0]# make && make install


步骤
6、安装mathplotlib

[root@localhost
otp_src_17.1]# yum list | grep matplotlib

[root@localhost
otp_src_17.1]# yum install python-matplotlib

#配置环境变量

[root@localhost
otp_src_17.1]vi /etc/profile

[root@localhost
otp_src_17.1]source /etc/profile

#验证tsplot是否安装成功

[root@localhost
otp_src_17.1]# tsplot

Traceback (most
recent call last):

File
"/usr/local/tsung/bin/tsplot", line 45, in

from pylab import *

...

from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK,
FigureCanvasGTK,\

File
"/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_gtk.py",
line 11, in

raise ImportError("Gtk* backend requires pygtk to be
installed.")

ImportError:
Gtk* backend requires pygtk to be installed.

#如上,提示错误,解决方法:安装pygtk

[root@localhost
otp_src_17.1]# yum install pygtk2

#再次验证tsplot是否安装成功

[root@localhost
gnuplot-4.0.0]# tsplot

Traceback
(most recent call last):

File
"/usr/local/tsung/bin/tsplot", line 45, in

from pylab import *

File
"/usr/lib64/python2.6/site-packages/pylab.py", line 1,
in

....

File
"/usr/lib64/python2.6/site-packages/matplotlib/backends/backend_gtk.py",
line 8, in

import gtk; gdk = gtk.gdk

File
"/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line
64, in

_init()

File
"/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line
52, in _init

_gtk.init_check()

RuntimeError:
could not open display

#如上,提示错误,原因再远tsplot只能在中断terminal中运行,解决方法:安装桌面

[root@localhost
otp_src_17.1]# yum grouplist | grep X

Legacy UNIX compatibility

Legacy X Window System compatibility

TeX
support

X
Window System

Xhosa Support

[root@localhost
otp_src_17.1]# yum groupinstall "X Window System"

#注意这里还得再安装Desktop,否则startx报错

[root@localhost
otp_src_17.1]# yum groupinstall Desktop

startx,桌面下使用,,见后文


步骤
7#关闭selinux(不关闭的话可能会话连接数等会被限制,上不去)

#查看selinux状态

[root@localhost ~]#
/usr/sbin/sestatus -v

SELinux
status:                
enabled

SELinuxfs
mount:               
/selinux

Current
mode:                  
enforcing

……….

#关闭(修改/etc/selinux/config,将SELINUX=enforcing改为SELINUX=disabled)

[root@localhost ~]# vi
/etc/selinux/config

...

#SELINUX=enforcing

#modified by
laiyu

SELINUX =
disabled

#
SELINUXTYPE= can take one of these two values:

...

[root@localhost ~]#
reboot


步骤
8#修改ulimit

说明:tsung.xml配置文件中,有个maxusers参数,用于突破由单一进程打开的socket最大数限制(缺省的,任意OS上为1024)和select系统调用可扩展性的不足。当用户数更限制更高时,将开启新的erlang虚拟机来处理新用户。默认的maxusers属性值为800.现在,有了内核轮询的允许,可以且应该为maxusers使用一个更大的值,比如300000,且不会有性能损失。但是需要提搞os的limit值

[root@localhost ~]#
ulimit
–n

1024

[root@localhost ~]# vi
/etc/security/limits.conf

...

#ftp            
hard   
nproc          
0

#@student       
-      
maxlogins      
4

#added by
laiyu#添加以下两行

*
soft nofile 65535

*
hard nofile 65535

# End of
file


步骤
9#实现免SSH密码登录(用于分布式集群,可暂时不设置)


步骤
10#配置文件

#创建默认的配置文件目录、日志文件目录

[root@localhost examples]#
mkdir -p ~/.tsung/log

#设置报告生成工具的路径(将日志分析程序复制到tsung/bin下,方便使用)

[root@localhost ~]# find /
-name tsung_stats.pl

/usr/local/tsung/lib/tsung/bin/tsung_stats.pl

/root/software/tsung-1.5.1/src/tsung_stats.pl

[root@localhost ~]# cp
/usr/local/tsung/lib/tsung/bin/tsung_stats.pl
/usr/local/tsung/bin/

#复制自带的例子到配置文件目录

[root@localhost examples]#
cp -rp /usr/local/tsung/share/doc/tsung/examples
~/.tsung/

#拿注册功能为例进行测试,配置tsung.xml文件

[root@localhost .tsung]# cp
examples/jabber_register.xml ~/.tsung/tsung.xml


步骤
11#启动测试

[root@localhost ~]# tsung
-f ~/.tsung/tsung.xml  -l ~/.tsung/log/
start

Starting
Tsung

"Log
directory is: /root/.tsung/log/20140903-1531"

"Maximum number
of concurrent users in a single VM reached and 'use_controller_vm'
is true, can't start new beam !!! Check 'maxusers' value in
configuration.~n"

^C

BREAK:
(a)bort (c)ontinue (p)roc info (i)nfo (l)oaded

(v)ersion (k)ill (D)b-tables (d)istribution

a

说明:

tsung

–f

指定运行时使用的配置文件(

默认 ~/.tsung/tsung.xml)

tsung

–l

指定日志路径(

默认~/.tsung/log/
)

#如上,报错了,解决方法,修改配置文件,如下,打开配置文件,增加maxusers属性

[root@localhost ~]# vi
~/.tsung/tsung.xml


 

修改如下

[root@localhost ~]# tsung
-f ~/.tsung/tsung.xml  -l ~/.tsung/log/
start

Starting
Tsung

"Log
directory is: /root/.tsung/log/20140903-1544"

。。。好了


步骤
12#生成测试报告

[root@localhost ~]# cd
~/.tsung/log/20140903-1544 #进入日志文件目录

[root@localhost
20140903-1544]# tsung_stats.pl

creating
subdirectory data

creating
subdirectory gnuplot_scripts

creating
subdirectory images

warn, last
interval (4) not equal to the first, use the first one
(10)

No data for
Bosh

No data for
Perfs

No data for
Transactions

No data for
Match

No data for
Event

No data for
Async

No data for
Size

size_rcv is
equal to 0 !

size_sent is
equal to 0 !

#注意,这里没数据...似乎是因为公司网络限制引起的

#获取报告

[root@localhost
20140903-1544]# cd ..

[root@localhost log]# tar
-cvf test.tar 20140903-1544

把test.tar下载到本地,解压,然后打开html文件即可


日志错误:
Could
not find/open font when opening font "arial"
解决方法


问题描述

如图,查看生成日志文件gnuplot.log,发现有错误提示提示

Could not
find/open font when opening font "arial", using internal
non-scalable


解决方法

在linux中添加arial字体

widonws下载字体文件到Linux

步骤1、打开C:\WINDOWS\Fonts,找到Arial,右键,复制到指定文件夹下

步骤2、

[root@localhost ~]#
mkdir/usr/share/fonts/arial

用类似xshell等工具,把刚才复制的字体上传到指定新建的arial目录下。

步骤3、设置环境变量

[root@localhost ~]# vi
~/.bash_profile

如下,添加如下红色的部分的字体

#
.bash_profile

# Get the
aliases and functions

if [ -f
~/.bashrc ]; then

. ~/.bashrc

fi

# User
specific environment and startup programs

export
GDFONTPATH=/usr/share/fonts/arial

export
GNUPLOT_DEFAULT_GDFONT="arial"

PATH=$PATH:$HOME/bin

export
PATH

保存,然后执行source命令

[root@localhost ~]# source
.bash_profile

#也可以如下方式生成图形

tsplot “name” log_path –d
output_dir

#获取图形报告

[root@localhost log]#
ls

20140903-1531 
connected.png    
finish_tn.png 
page_count.png    
page_mean_tn.png   
  request_mean.png    
size_rcv_tn.png  
test.tar

20140903-1541 
connected_tn.png  http.png      
page_count_tn.png 
request_count.png    
request_mean_tn.png 
size_sent.png    
users.png

20140903-1544  finish.png       
http_tn.png   
page_mean.png     
request_count_tn.png 
size_rcv.png        
size_sent_tn.png 
users_tn.png

[root@localhost log]# mkdir
output

[root@localhost log]# mv
*.png output

[root@localhost log]# tar
-cvf output.tar output

下载output.tar,然后解压,然后查看.png图片

注意:更多关于文件配置的信息请访问官网(如果有时间,我会继续更新这方面的内容

Tsung CentOS 操作系统下搭建tsung性能测试环境_Part 2的更多相关文章

  1. Tsung CentOS 操作系统下搭建tsung性能测试环境_Part 1

    CentOS 操作系统下搭建tsung性能测试环境_Part 1 by:授客 QQ:1033553122 步骤1.下载软件安装包 CentOS-6.0-x86_64-bin-DVD1.iso jdk- ...

  2. 在CentOS下搭建Android 开发环境

    在CentOS下搭建Android 开发环境 目录 1.环境搭建 1.1.JDK安装 1.2.Eclipse安装 1.3.ADT安装 1.4.Android SDK安装 1.5.Android NDK ...

  3. Windows操作系统下搭建Git服务器和客户端。

    本文将介绍如何在Windows操作系统下搭建Git服务器和客户端.服务器端采用的是Bonobo Git Server,一款用ASP.NET MVC开发的Git源代码管理工具,界面简洁,基于Web方式配 ...

  4. Centos 7 下搭建 Dokuwiki

    Centos 7 下搭建 Dokuwiki # Dokuwiki 是php的,所以要先搭建php环境,下载 apache和php,第1.2步下载完,相关的依赖都会下载## 1.下载 httpdyum ...

  5. Window下搭建foundation apps环境

    Window下搭建foundation apps环境 框架:AngularJS.Foundation, 构建工具:Gulp, 开发环境:node.js. 操作系统:windows (一)环境准备 1 ...

  6. mac os 下搭建android开发环境

    mac os 下搭建android开发环境 周银辉 mac os 下搭建android环境比较方便, 如下几个步骤: 1,安装jdk 先搞清楚自己是否已经安装,在命令行下:java -version, ...

  7. Mac下搭建php开发环境教程

    方案一:原生安装 这篇文章主要介绍了Mac下搭建php开发环境教程,Mac OS X 内置了Apache 和 PHP,这样使用起来非常方便.本文以Mac OS X 10.6.3为例,需要的朋友可以参考 ...

  8. 【原创】windows下搭建vue开发环境+IIS部署

    [原创]win10下搭建vue开发环境  如果要转发,请注明原作者和原产地,谢谢! 特别说明:下面任何命令都是在windows的命令行工具下进行输入,打开命令行工具的快捷方式如下图:     详细的安 ...

  9. Windows下搭建Git开发环境

    Windows下搭建Git开发环境主要有以下三种方法: 1,VS,vs2013和vs2015中已经集成了git插件了 2,msysGit+TortoiseGit 3,msysGit+SourceTre ...

随机推荐

  1. 【练习】Java中的读文件,文件的创建,写文件

    前言 大家好,给大家带来Java中的读文件,文件的创建,写文件的概述,希望你们喜欢 读文件 public static void read(String path,String filename){ ...

  2. js中的类

    概述 经典的老书害人啊,全是讨论怎么解决javascript里面用函数形式定义类的坑.结果es2015直接用class关键字解决了所有问题.虽然class关键字没有什么新东西,只是js现有继承结构的语 ...

  3. Javascript百学不厌 - 尾递归

    虽然偶尔也用过,但是从来没具体来整理过 普通递归: function fac(n) { ) ; ); } fac() 这是个阶乘.但是占用内存,因为: fac(5) (5*fac(4)) (5*(4* ...

  4. debian安装tftp服务

    步骤1:安装 apt-get install tftp-hpa tftpd-hpa tftp-hpa是client,tftpd-hpaserver 步骤2:建立tftp目录 mkdir /tftpbo ...

  5. vue 自学笔记(三) 计算属性与侦听器

    一:计算属性 虽然在模板内使用表达式对属性进行处理十分便利,例如在小胡子语法里写number + 1实现对数据的简单处理,但若我们在其中加入大量的代码,使得逻辑变重,导致难以维护.例如下面的代码,并不 ...

  6. 《JavaScript高级教程》学习笔记一、变量和数据类型

    JavaScript的核心语言特性在ECMA-262中是以名为ECMAScript的伪语言的形式来定义的. 一.变量和数据类型 1. 变量 JavaSript是弱类型语言,可以通过var定义任何类型变 ...

  7. RPC的原理总结

    一.RPC的引入 早期单机时代,一台电脑上运行多个进程,大家各干各的,老死不相往来.假如A进程需要一个画图的功能,B进程也需要一个画图的功能,程序员就必须为两个进程都写一个画图的功能.这不是整人么?于 ...

  8. spring cloud+.net core搭建微服务架构:配置中心续(五)

    前言 上一章最后讲了,更新配置以后需要重启客户端才能生效,这在实际的场景中是不可取的.由于目前Steeltoe配置的重载只能由客户端发起,没有实现处理程序侦听服务器更改事件,所以还没办法实现彻底实现这 ...

  9. 子shell以及什么时候进入子shell

    bash&shell系列文章:http://www.cnblogs.com/f-ck-need-u/p/7048359.html 子shell的概念贯穿整个shell,写shell脚本时更是不 ...

  10. httpd配置文件httpd.conf规则说明和一些基本指令

    apache httpd系列文章:http://www.cnblogs.com/f-ck-need-u/p/7576137.html 本文主要介绍的是httpd的配置文件,包括一些最基本的指令.配置规 ...