How to Use Tsung to test the Openfire service and tsung to test openfire
1. Install erlang, Tsung, and other software on the machines used for testing and Openfire service machines, with the same location and version
2. Run the Openfire service, including the cluster
3. Write or modify the Tsung script
1) The Openfire service is in cluster mode.
The tsung script is modified as follows:
<servers><server host="127.0.0.1" port="5222" type="tcp"><server host="192.168.1.1" port="5222" type="tcp"></server></server></servers>
2) Tsung is used to test the cluster mode.
As the maximum number of connections on a computer is limited, more users need to test multiple machines.
Password-free SSH Login is required for each test machine
The tsung script is modified as follows:
<clients><client cpu="4" host="localhost" maxusers="100000" weight="1"><client cpu="4" host="192.168.1.3" maxusers="100000" weight="1"></client></client></clients>
Modify the maximum number of connections on the computer
View Max connections
# Ulimit-n
Temporary modification, only valid for the Program on this page
# Ulimit-n 65535
Permanent modification: Modify/etc/security/limits. conf as the root user and add the following lines
Root soft onproc 65535
Root hard onproc 65535
4. Run the script
For example, if tsung is a single machine, # tsung-f one. xml start
One is the script name.
For example, if tsung is a cluster, # tsung-s-f jq. xml start