需求:openfiretsung测试时监控被测机的运行状态
原料:centos 6.4,openfire 3.9.1,tsung 1.5, net-snmp5.5-50
step1:安装net-snmp
yum -y install net-snmp
yum -y installnet-snmp-utils
yum -y installnet-snmp-libs
yum -y installnet-snmp-devel
编辑/etc/snmp/snmpd.confg
1.在此位置增加红色行,可以支持查看cpu,内存等信息
####
# Third, create a view for us to let the group have rights to:
# Make at least snmpwalk -v 1 localhost -c public system fast again.
# name incl/excl subtree mask(optional)
view systemview included .1
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
2.在此代码附近
###############################################################################
# Process checks.
#
# The following are examples of how to use the agent to check for
# processes running on the host. The syntax looks something like:
将下列行的#号注释去掉
#proc mountd
#proc ntalkd 4
#proc sendmail 10 1
3.在此代码附近
###############################################################################
# Executables/scripts
#
#
# You can also have programs run by the agent that return a single
# line of output and an exit code. Here are two examples.
将下列行的#号注释去掉
#exec echotest /bin/echo hello world
step2:tsung脚本增加监控节点
<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/local/share/tsung/tsung-1.0.dtd">
<tsung loglevel="notice" version="1.0">
<clients>
<client host="localhost" use_controller_vm="true" maxusers="900"></client>
</clients>
<!-- Server side setup -->
<servers>
<server host="127.0.0.1" port="5222" type="tcp"></server>
</servers>
<monitoring>
<monitor host="192.168.80.128" type="snmp">
<snmp version="v2" >
<!-- tsung 官网的代码,看不懂 -->
<!-- <oid value="1.3.6.1.4.1.42.2.145.3.163.1.1.2.11.0" name="heapused" type="sample" eval="fun(X)-> X/100 end. "></oid> -->
<!-- 使用自己定义的 -->
<oid value="1.3.6.1.4.1.2021.11.5.0" name="ssIOSend" type="sample"></oid>
<oid value="1.3.6.1.4.1.2021.11.6.0" name="ssIOReceive" type="sample"></oid>
<oid value="1.3.6.1.4.1.2021.4.6.0" name="ramUsed" type="sample"></oid>
<oid value="1.3.6.1.2.1.4.9" name="ipInDelivers" type="sample"></oid>
</snmp>
</monitor>
</monitoring>
<load>
<arrivalphase phase="1" duration="1" unit="minute">
<users maxnumber="900" interarrival="0.002" unit="second"></users>
</arrivalphase>
</load>
<!-- JABBER parameters -->
<!-- to synchronise users, use a global acknoledgement -->
<options>
<option type="ts_jabber" name="global_number" value="100"></option>
<option type="ts_jabber" name="userid_max" value="900"></option>
<option type="ts_jabber" name="domain" value="floatant"></option>
<option type="ts_jabber" name="username" value="tsung"></option>
<option type="ts_jabber" name="passwd" value="tsung"></option>
</options>
<sessions>
<session probability="100" name="jabber-example" type="ts_jabber">
<request>
<jabber type="connect" ack="no_ack"></jabber>
</request>
<thinktime value="2"></thinktime>
<transaction name="authenticate">
<request>
<jabber type="auth_get" ack="local"></jabber>
</request>
<request>
<jabber type="auth_set_plain" ack="local"></jabber>
</request>
</transaction>
<request>
<jabber type="presence:initial" ack="no_ack"/>
</request>
<thinktime value="2"></thinktime>
<transaction name="roster">
<request>
<jabber type="iq:roster:get" ack="local"></jabber>
</request>
</transaction>
<thinktime value="30"></thinktime>
<transaction name="online">
<request>
<jabber type="chat" ack="no_ack" size="16" destination="online"></jabber>
</request>
</transaction>
<thinktime value="30"></thinktime>
<transaction name="offline">
<request>
<jabber type="chat" ack="no_ack" size="56" destination="offline"></jabber>
</request>
</transaction>
<thinktime value="30"></thinktime>
<transaction name="close">
<request>
<jabber type="close" ack="no_ack"></jabber>
</request>
</transaction>
</session>
</sessions>
</tsung>
附linux snmp OID的链接 http://www.haiyun.me/archives/linux-snmp-oid.html
完成
分享到:
相关推荐
Openfire 3.9.3 Load Test Tsung配置xml,10万用户下集群测试的Tsung压力测试工具的jabber_cluster.xml,session 5分钟
调用openfire 服务器测试代码,有需要的可以自取
android Openfire的测试客户端程序,只是个测试程序
tsung是用erlang开发的一款简单易用的压力测试工具,目前仅支持linux各版本系统安装,有tar.gz和deb两种安装文件, 目前我们测试用的是CentOS或RedHat两种操作系统,因此选择tar.gz安装文件,总的来说tsung工具有...
openfire、spark测试环境,测试与openfire连接、创建账户、发消息等功能
这是一个简单地asmack连接Openfire的测试类,供初学者用。
Tsung安装使用的详细解说,主要针对xmpp的服务端(比如openfire的测试),编写测试场景的脚本配置详细说明。本人使用的是ubuntu操作系统、Tsung1.4.1
openFire 保存聊天记录插件 亲测100%有效 插件直接拷贝到OpenFire安装目录的plugin下 自动安装后 进入OpenFire管理后台 服务器==》档案文件==》存档设置 几个单选框都勾选, 聊天记录保存在 ofMessageArchive 表...
android openfire xmpp smack即时通讯,包括:聊天发生文字,表情,图片添加删除好友,消息提醒,群聊,邀请好友进入房间,欢迎大家下载
网上找了半天openfire插件开发的例子,都只是从原理上将的,并不利于菜鸟学习,所以我在这里从动手方面将下openfire插件的开发,此插件可以运行,使用者可以添加自定义功能。
jmeter之以openfire为例介绍xmpp协议测试-附件资源
smack(4.1.6)+openfire(4.0.2)的运用实践的测试用例
openfire服务端openfire 服务端 java linux 即时聊天
openfire mac系统安装文件 Openfire (formerly Wildfire) is a cross-platform real-time collaboration server based on the XMPP (Jabber) protocol.
openfire 聊天记录插件,已经经过测试,欢迎下载。
java android openfire+smack项目源码,已测试,修改ip地址后即可直接运行。
CentOS平台Openfire详细搭建过程,亲测可用
tsung安装使用,参数说明,模拟openfire注册用户,模拟用户openfire登录、状态更改、发送消息,对openfire长时间压力测试
Centos 下Openfire环境部署安装指南,适合新手部署openfire环境