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

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

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


--------------------接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、#安装perl的gnuplot

[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

 

#继续安装perl的gnuplot

[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图片

 

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

 

目录
相关文章
|
监控 安全 测试技术
【01】卓伊凡收到冒充税务机关的诈骗程序-决定在沙盒Sandbox环境中运行测试下-广大企业同胞们注意防诈骗
【01】卓伊凡收到冒充税务机关的诈骗程序-决定在沙盒Sandbox环境中运行测试下-广大企业同胞们注意防诈骗
532 14
【01】卓伊凡收到冒充税务机关的诈骗程序-决定在沙盒Sandbox环境中运行测试下-广大企业同胞们注意防诈骗
|
机器学习/深度学习 存储 算法
强化学习算法基准测试:6种算法在多智能体环境中的表现实测
本文系统研究了多智能体强化学习的算法性能与评估框架,选用井字棋和连珠四子作为基准环境,对比分析Q-learning、蒙特卡洛、Sarsa等表格方法在对抗场景中的表现。实验表明,表格方法在小规模状态空间(如井字棋)中可有效学习策略,但在大规模状态空间(如连珠四子)中因泛化能力不足而失效,揭示了向函数逼近技术演进的必要性。研究构建了标准化评估流程,明确了不同算法的适用边界,为理解强化学习的可扩展性问题提供了实证支持与理论参考。
730 0
强化学习算法基准测试:6种算法在多智能体环境中的表现实测
|
存储 人工智能 编译器
【03】鸿蒙实战应用开发-华为鸿蒙纯血操作系统Harmony OS NEXT-测试hello word效果-虚拟华为手机真机环境调试-为DevEco Studio编译器安装中文插件-测试写一个滑动块效果-介绍诸如ohos.ui等依赖库-全过程实战项目分享-从零开发到上线-优雅草卓伊凡
【03】鸿蒙实战应用开发-华为鸿蒙纯血操作系统Harmony OS NEXT-测试hello word效果-虚拟华为手机真机环境调试-为DevEco Studio编译器安装中文插件-测试写一个滑动块效果-介绍诸如ohos.ui等依赖库-全过程实战项目分享-从零开发到上线-优雅草卓伊凡
1260 11
【03】鸿蒙实战应用开发-华为鸿蒙纯血操作系统Harmony OS NEXT-测试hello word效果-虚拟华为手机真机环境调试-为DevEco Studio编译器安装中文插件-测试写一个滑动块效果-介绍诸如ohos.ui等依赖库-全过程实战项目分享-从零开发到上线-优雅草卓伊凡
|
缓存 Java 测试技术
【01】噩梦终结flutter配安卓android鸿蒙harmonyOS 以及next调试环境配鸿蒙和ios真机调试环境-flutter项目安卓环境配置-gradle-agp-ndkVersion模拟器运行真机测试环境-本地环境搭建-如何快速搭建android本地运行环境-优雅草卓伊凡-很多人在这步就被难倒了
【01】噩梦终结flutter配安卓android鸿蒙harmonyOS 以及next调试环境配鸿蒙和ios真机调试环境-flutter项目安卓环境配置-gradle-agp-ndkVersion模拟器运行真机测试环境-本地环境搭建-如何快速搭建android本地运行环境-优雅草卓伊凡-很多人在这步就被难倒了
2449 3
【01】噩梦终结flutter配安卓android鸿蒙harmonyOS 以及next调试环境配鸿蒙和ios真机调试环境-flutter项目安卓环境配置-gradle-agp-ndkVersion模拟器运行真机测试环境-本地环境搭建-如何快速搭建android本地运行环境-优雅草卓伊凡-很多人在这步就被难倒了
|
Cloud Native 安全 Linux
龙蜥操作系统:CentOS 谢幕之后,国产云原生系统的崛起之路
龙蜥操作系统(Anolis OS)是 CentOS 停止维护后,由阿里云等企业联合发起的开源项目。它以双内核架构和全栈优化为核心,提供无缝替代 CentOS 的方案,兼容主流生态并针对云计算场景深度优化。其技术亮点包括 RHCK 和 ANCK 双内核、性能优化、全栈安全及国密算法支持。龙蜥适用于云原生基础设施、企业级应用部署及开发环境,社区已吸引 200 多家单位参与。未来规划涵盖 AI 框架优化、RISC-V 架构适配及桌面环境构建,正重新定义云时代的操作系统边界。
5157 0
|
Kubernetes Cloud Native 区块链
Arista cEOS 4.30.10M - 针对云原生环境设计的容器化网络操作系统
Arista cEOS 4.30.10M - 针对云原生环境设计的容器化网络操作系统
600 0
|
机器学习/深度学习 人工智能 算法
BALROG:基准测试工具,用于评估 LLMs 和 VLMs 在复杂动态环境中的推理能力
BALROG 是一款用于评估大型语言模型(LLMs)和视觉语言模型(VLMs)在复杂动态环境中推理能力的基准测试工具。它通过一系列挑战性的游戏环境,如 NetHack,测试模型的规划、空间推理和探索能力。BALROG 提供了一个开放且细粒度的评估框架,推动了自主代理研究的进展。
723 3
BALROG:基准测试工具,用于评估 LLMs 和 VLMs 在复杂动态环境中的推理能力
|
弹性计算 运维 安全
阿里云操作系统迁移最佳实践|飞天技术沙龙-CentOS 迁移替换专场
本次方案的主题是阿里云操作系统迁移最佳实践,Alibaba Cloud Linux /Anolis OS 兼容 CentOS 生态,因此能够很丝滑的进行迁移替换。无论是对企业的运维人员,还是对企业操作系统的使用者来说,相对简化了它的维护成本。通过 SMC 操作系统迁移实践带用户深入了解,不仅阐述了原地迁移方案的独特优势,还针对不同的迁移场景,逐步剖析了整个迁移流程,力求使复杂的操作变得直观易懂,实现了真正的“白屏化”体验。 1. CentOS 迁移背景 2. 操作系统迁移实践 3. 迁移故障处理
741 2
|
安全 大数据 Linux
云上体验最佳的服务器操作系统 - Alibaba Cloud Linux | 飞天技术沙龙-CentOS 迁移替换专场
本次方案的主题是云上体验最佳的服务器操作系统 - Alibaba Cloud Linux ,从 Alibaba Cloud Linux 的产生背景、产品优势以及云上用户使用它享受的技术红利等方面详细进行了介绍。同时,通过国内某社交平台、某快递企业、某手机客户大数据业务 3 大案例,成功助力客户实现弹性扩容能力提升、性能提升、降本增效。 1. 背景介绍 2. 产品介绍 3. 案例分享
681 1
|
Unix Linux Docker
CentOS停更沉寂,RHEL巨变限制源代:Docker容器化技术的兴起助力操作系统新格局
操作系统是计算机系统的核心软件,管理和控制硬件与软件资源,为用户和应用程序提供高效、安全的运行环境。Linux作为开源、跨平台的操作系统,具有高度可定制性、稳定性和安全性,广泛应用于服务器、云计算、物联网等领域。其发展得益于庞大的社区支持,多种发行版如Ubuntu、Debian、Fedora等满足不同需求。
761 5

热门文章

最新文章