Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Tsung: open source multi-protocol distributed load & stress testing tool

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Main features

High Performance: the load can be distributed on a cluster of client machines

Multi-protocols using a plugin system: HTTP, WebDAV, SOAP, PostgreSQL, MySQL, LDAP, XMPP/Jabber, BOSH, MQTT and AMQP are currently supported. SSL is also supported.

Several IP addresses can be used on a single machine using the underlying OS IP Aliasing

OS monitoring (CPU, memory and network traffic) using SNMP, Munin or Erlang agents on remote servers.

XML configuration system; several sessions can be used to simulate different type of users. Dynamic sessions can be easily described in XML (this can be used to retrieve at runtime an ID from the server output and use it later in the session).

In order to generate a realistic traffic, user think-times and the arrival rate can be randomize using a probability distribution

HTML reports can be generated during the load to view response times measurement, server CPU, etc.

Tsung is developed in Erlang, running Tsung, requires related erlang dependency package support.

one。 Install Tsung

Sudo apt-get updatesudo apt-get-y install tsung

Or download the Tsung source package and install: http://tsung.erlang-projects.org/

two。 Enable SNMP agent (snmpd) to monitor system operation

Install snmpd: apt-get install snmpd on the target system

Modify the configuration document / etc/snmp/snmpd.conf:

1) enable all monitoring side access: comment line agentAddress udp:127.0.0.1:161, and then enable line agentAddress udp:161,udp6: [: 1]: 1612) set snmp agent to monitor (OID branch) range: comment line view systemonly included .1.3.6.1.2.1.1 and view systemonly included .1.3.6.1.2.1.25.1 Then add the line view systemonly included. 13) rocommunity public default-V systemonly line and rocommunity public default-V systemonly line public is the default community, but change the customization 4) if you run snmpd in docker, after modifying the configuration document / etc/snmp/snmpd.conf, execute service snmpd [command], which is not valid for the started snmpd. Therefore, it is feasible to start snmpd:service snmpd start by restarting the container on which snmpd is running (expose 161and then executing service snmpd start).

The monitoring side installs snmp to detect the monitoring target system snmp agent

Sudo apt-get install snmpsnmpwalk-v 2c-c public [agent hostname or ip]

three。 Trial run Tsung and generate statistical report

Cd ~ mkdir .promogcp / usr/share/doc/tsung/examples/http_simple.xml .tsung / tsung.xmltsung start

Note:

1) after / usr/share/doc/tsung/examples:Tsung is installed, there are various configuration documents in this directory. For example, please refer to 2) ~ / .tsung / tsung.xml: default configuration file. If the file does not exist, you need to add the-f option, tsung-f myconfigfile.xml start3) ~ / .tsung / log: the log directory will be generated after running the command tsung start. 4) in this example, monitor type is snmp5) for the configuration of tsung.xml, please see: http://tsung.erlang-projects.org/user_manual/

Cenze@kylin:~/.tsung$ ls log20170115-2235cenzeThe Kylinpaste not equal to the first. Last interval $2235cenze@kylin:~/.tsung/log/20170115-2235 $/ usr/lib/tsung/bin/tsung_stats.plwarn, last interval (7) Use the first one (10) No data for BoshNo data for MatchNo data for EventNo data for AsyncNo data for Errorscenze@kylin:~/.tsung/log/20170115-2235$ ls-l Total amount 92drwxrwxr-x 2 cenze cenze 4096 January 15 22:51 data-rw-rw-r-- 1 cenze cenze 3344 January 15 22:51 gnuplot.logdrwxrwxr-x 2 cenze cenze 4096 January 15 22:51 gnuplot_scripts-rw-rw-r-- 1 cenze cenze 7333 January 15 22:51 graph.htmldrwxrwxr-x 2 Cenze cenze 4096 January 15 22:51 tsung.log-rw-rw-r-- 1 cenze cenze 961 January 15 22:35 match.log-rw-rw-r-- 1 cenze cenze 8151 January 15 22:51 report.html-rw-rw-r-- 1 cenze cenze 10157 January 15 22:45 tsung_controller@kylin.log-rw-rw-r-- 1 cenze cenze 36480 January 15 22:45 tsung.log-rw-rw-r-- 1 cenze cenze 961 January 15 22:35 tsung.xml

Note:

1) / usr/lib/tsung/bin/tsung_stats.pl: if tsung.log does not exist in the current directory, you need to specify the statistics log file through the option-- stats. After executing the script, relevant statistics report directories and documents will be generated under the current directory. 2) the above is the actual situation executed on this machine. Click report.html to open it in the browser and you will see the following interface:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report