Home

also in PDF - Tsung

image

Contents

1. lt ELEMENT monitor snmp munin mysqladmin gt lt ATTLIST monitor host NMTOKEN REQUIRED batch true false false type snmp erlang munin erlang gt lt ELEMENT mysqladmin EMPTY gt lt ATTLIST mysqladmin port NMTOKEN 3306 username NMTOKEN root password NMTOKEN IMPLIED gt lt ELEMENT snmp oid gt lt ATTLIST snmp version vl v2 vi community NMTOKEN public port NMTOKEN 161 gt lt ELEMENT oid EMPTY gt lt ATTLIST oid value NMTOKEN REQUIRED name NMTOKEN REQUIRED type NMTOKEN sample eval CDATA IMPLIED gt lt ELEMENT munin EMPTY gt lt ATTLIST munin port NMTOKEN 4949 gt lt ELEMENT load arrivalphase user gt lt ATTLIST load duration NMTOKEN IMPLIED unit hour minute second second loop NMTOKEN 0 gt lt ELEMENT arrivalphase users session_setup gt lt ATTLIST arrivalphase duration NMTOKEN REQUIRED phase NMTOKEN REQUIRED unit hour minute second millisecond REQUIRED gt lt ELEMENT users EMPTY gt lt ATTLIST users interarrival NMTOKEN IMPLIED arrivalrate NMTOKEN IM
2. Use erlc to compiled the code and put the resulting beam file in SPREFIX 1ib erlang lib tsung X X X ebin on all client machines As you can see writing scenario with dynamic substitution is simple It can be even simpler using dynamic variables see later If you want to set unique id you can use the built in function ts_user_server get_unique_id lt session name rec20040316 08 47 probability 100 type ts_http gt lt request subst true gt lt http url echo id ts_user_server get_unique_id method GET gt lt request gt lt session gt 6 7 2 Reading external file New in 1 0 3 A new module ts_file_server is available You can use it to read external files For example if you need to read user names and passwd from a CSV file you can do it with it currently you can read only a single file You have to add this in the XML configuration file 48 Chapter 6 Understanding tsung xml configuration file Tsung Documentation Release 1 6 0 lt option name file_server value tmp userlist csv gt lt option gt New in 1 2 2 You can read several files using the id attribute to identify each file lt option name file_server value tmp userlist csv gt lt option gt lt option name file_server id random value tmp randomnumbers csv gt lt option gt Now you can build your own function to use it for example create a file called readcsv erl module readcsv export user 1
3. user Pid DynVar gt ok Line ts file server get next line Username Passwd string tokens Line username Username amp password Passwd The output of the function will be a string username USER amp password PASSWORD Then compile it with erlc readesv erl and put readcsv beamin prefix lib erlang lib tsung VERSION ebin directory if the file has an id set to random change the call to ts file server get next line randon Then use something like this in your session lt request subst true gt lt http gt lt request gt Two functions are available ts_file_server get_next_line and ts_file_server get_random_line For the get_next_line function when the end of file is reached the first line of the file will be the next line New in 1 3 0 you no longer have to create an external function to parse a simple csv file you can use setdynvars see next section for detailed documentation lt setdynvars sourcetype file fileid userlist csv delimiter order iter gt lt var name username gt lt var name user_password gt lt setdynvars gt This defines two dynamic variables username and user_password filled with the next entry from the csv file Using the previous example the request is now lt request subst true gt lt http url login cgi version 1 0 contents username _username amp amp password 33 user password33samp op login
4. img_format lt format gt output format for images default png available format ps svg png pdf Version 1 4 0 adds a new graphical output based on http danvk org dygraphs 7 5 Tsung summary Figure Report shows an example of a summary report 7 3 Design 61 Tsung Documentation Release 1 6 0 Tung HA version 1 3 0 Main Statistics Stats Report e Main statistics e Transactions 0 894 msec 0 298 msec 5703 5 sec Ponori at 98 32 msec 2 10msec 5703 3 sec 2 22 msec e Counters 0 432 msec 0 283 msec 369526 sec 0307 e Server monitorin msec nil 1200 4 sec 1200 0sec 4165 sec 17000 Graphs Report Transactions Statistics e Response times e Throughput graphs e Simultaneous Users e Server monitoring e HTTP status XML Config file Network Throughput Name Highest Rate Total size rcv 521 40 Mbits sec 86 44 GB size sent 39 10 Mbits sec 6 54 GB Counters Statistics Name Highest Rate Total number finish users count 416 5 sec 446996 newphase 2 1 sec 612 users count 681 sec 1105176 Name Max connected 89288 users 658180 Figure 7 1 Report 62 Chapter 7 Statistics and Reports Tsung Documentation Release 1 6 0 7 6 Graphical overview Figure Graphical output shows an example of a graphical report 7 7 Tsung Plotter Tsung Plotter tsplot command is an optional tool recently added in the Tsung distribution it is written in Python useful to compare di
5. lt options gt lt option type ts_jabber name userid_max value 0 gt lt option type ts_jabber name random_from_fileid value userdb gt 6 6 Sessions 37 Tsung Documentation Release 1 6 0 lt option type ts_jabber name offline_from_fileid value userdb gt lt option type ts_jabber name fileid_delimiter value gt lt options gt The username resp passwd should be the first resp second entry in the each CSV line the delimiter is by default and can be overriden raw XML You can send raw XML data to the server using the raw type lt jabber type raw ack no_ack data amp lt stream amp gt foo amp lt stream gt gt lt jabber gt Beware you must encode XML characters like lt gt etc resource By default the XMPP resource is set to tsung Since version 1 5 0 you can override this in all auth x and register requests using the resource attribute 6 6 4 PostgreSQL For PostgreSQL 4 types of requests are available connect to a given database with a given username e authenticate with password or not e sql basic protocol e close In addition the following parts of the extended protocol is supported e copy copydone and copyfail e parse bind execute describe e sync flush This example shows most of the features of a PostgreSQL session session probability 100 name pgsql example type ts_pgsql gt lt transaction name connection
6. 6 7 Advanced Features 6 7 1 Dynamic substitutions Dynamic substitution are mark up placed in element of the scenario For HTTP this mark up can be placed in basic authentication www_authenticate tag userid and passwd attributes URL to change GET parameter and POST content Those mark up are of the form 33Module Function Substitutions are executed on a request by request basis only if the request tag has the attribute subst true When a substitution is requested the substitution mark up is replaced by the result of the call to the Erlang function Module Function Pid DynData where Pid is the Erlang process id of the current virtual user and DynData the list of all Dynamic variables Warn before version 1 1 0 the argument was just the Pid Here is an example of use of substitution in a Tsung scenario lt session name rec20040316 08 47 probability 100 type ts_http gt lt request subst true gt lt http url echo symbol symbol new method GET gt lt http gt lt request gt lt session gt For the http plugin and since version 1 5 1 you can use the special value subst al1 except body instead of true to skip the substitutions in the body part of the HTTP response Here is the Erlang code of the module used for dynamic substitution module symbol export new 1 new Pid DynData gt case random uniform 3 of 1 gt IBM 2 gt MSFT 3 gt RHAT end
7. e genindex e search 99 Tsung Documentation Release 1 6 0 100 Chapter 14 Indices and tables A apply_to_content 54 arrivalphase 23 arrivalrate 24 B batch 21 C callback 52 change_type 46 client 20 cpu 20 D delimiter 52 dtd 88 dumptraffic 19 duration 25 dyn_variable 50 E emfile 72 encoding 19 F faq 69 fileid 52 for 54 foreach 55 G global_ack_timeout 25 global_number 14 H hibernate 26 host 20 http_use_server_as_proxy 13 idle_timeout 25 INDEX if 55 interarrival 14 24 ip 21 iter 52 J jabber 31 json 59 jsonpath 51 L load 23 loglevel 20 M match 53 maxnumber 14 24 maxusers 21 munin 23 O options 25 override 25 P page 60 presence 14 proxy 16 R rate_limit 26 record_tag 17 redirect 73 repeat 55 RFC RFC 3253 6 RFC 3921 34 RFC 4918 6 REC 6455 7 S sample 61 101 Tsung Documentation Release 1 6 0 sample_counter 61 sasl plain 33 scan_intf 22 scheduler 21 seed 27 server 20 session 28 setdynvars 52 skip_headers 54 snmp 22 ssl_ciphers 25 ssl_reuse_sessions 25 start_time 24 T tag 56 tcp_rev_buffer 25 tcp_snd_buffer 25 thinktime 25 thinktimes 29 ts_http 13 ts_jabber 14 ts_user_server 48 tsung recorder 16 U udp_rcv_buffer 25 udp_snd_buffer 25 until 55 use_controller_vm 20 W weight 20 while 55 X
8. lt request gt lt thinktime value 2 gt lt thinktime gt 4 5 Jabber XMPP 15 Tsung Documentation Release 1 6 0 lt transaction name auth_digest gt lt request gt lt jabber type auth_get ack local gt lt jabber gt lt request gt lt request subst true gt lt jabber type auth_set_digest ack local gt lt jabber gt lt request gt lt transaction gt lt session gt sip digest authentication lt session probability 100 name jabber sipdigest type ts_jabber gt lt request gt lt jabber type connect ack local gt lt jabber gt lt request gt lt thinktime value 2 gt lt thinktime gt lt transaction name auth_sipdigest gt lt regexp captures nonce value returned by server gt lt request gt lt dyn_variable name nonce re amp 1lt Nonce encoding amp quot hexsquot amp gt amp 1t Noncesgt gt lt jabber type auth_get ack local gt lt jabber gt lt request gt lt request subst true gt lt jabber type auth_set_sip ack local gt lt jabber gt lt request gt lt transaction gt lt session gt 4 5 4 Privacy list testing There are two actions available to allow for rudimentary privacy lists load testing e privacy get_names gets the list of all names of privacy lists stored by the server for a given user e privacy set active sets a list with a predefined name as active The list name is determined from the JID e g if the user s J
9. xpath 50 102 Index
10. 1 var loops gt lt for from 1 to 100 incr 1 var counter gt lt transaction name publish gt lt specify payload size to have tsung generate a payload for you gt lt request subst true gt lt amgp type basic publish channel _loops exchange test_exchange routing_key test_queue persistent true payload_size 100 gt lt amqp gt lt request gt lt substitutions are supported on the payload Payload will override payload_size gt lt request subst true gt lt amgp type basic publish channel _loops exchange test_exchange routing_key test_queue persistent true payload Test Payload gt lt amqp gt 6 6 Sessions 41 Tsung Documentation Release 1 6 0 lt request gt lt transaction gt lt or gt c if publish with confirm add a waitForConfirms request as you need timeout 1s gt lt request gt lt amgp type waitForConfirms timeout 1 gt lt amgp gt lt request gt lt for gt lt for from 1 to 10 incr 1 var loops gt lt request subst true gt lt amqp type basic consume channel _loops queue test_queue ack true gt lt amgp gt lt request gt lt for gt lt wait to receive messages from the server timeout 180s gt lt request gt lt amgp type waitForMessages timeout 180 gt lt amqp gt lt request gt lt for from 1 to 10 incr 1 var loops gt lt request subst true gt l
11. unavailable presence final is optional Warning this is new in 1 2 0 in earlier version only 2 status were available online and offline a user was considered online as soon as it was connected 4 5 3 Authentication Below are configuration examples for the possible authentication methods Note the regular expressions used here are only examples they may need to be altered depending on how a particular server implementation composes messages see also Websocket options for password settings e plain authentication sends clear text passwords lt session probability 100 name jabber plain type ts_jabber gt lt request gt lt jabber type connect ack local gt lt jabber gt lt request gt lt thinktime value 2 gt lt thinktime gt lt transaction name auth_plain gt lt request gt lt jabber type auth_get ack local gt lt jabber gt lt request gt lt request gt lt jabber type auth_set_plain ack local gt lt jabber gt lt request gt lt transaction gt lt session gt e digest authentication as described in XMPP JEP 0078 Non SASL Authentication http www jabber org jeps jep 0078 html lt session probability 100 name Jabber digest type ts_jabber gt lt regexp captures stream ID returned by server gt lt request gt lt dyn_variable name sid re amp lt stream stream id amp quot amp quot xmlns stream gt lt jabber type connect ack local gt lt jabber gt
12. 0 the controller VM is not used in some case pgsql recorder can record a connect request in an already connected session Major enhancements and bugfixes 5 Sep 2011 regexp defined in match or dynvars can fail when chunk encoding is used Munin monitoring broken by cpu stats config request Tsung doesn t detect subdomains snmp monitoring does not work with erlang R14A maxnumber set in a phase is not always enforced auth sasl can t authenticate against ejabberd some characters can make url and headers rewriting fail in the recorder tsung generated message stanzas are not XMPP compliant file server crash if a dynamic substitution use it When many clients are configured with few static users none of them are launched tsung can stop too soon in some cases random number with start and end actually returns a number from start 1 to end Client IP scan is very slow on Linux also uses obsolete ifconfig tsung is very slow when a lot of dynamic variables are set generating more than 64k connections from a single machine Add content encoding support for dynvar extraction add option to read usernames from an external file for jabber use the new re modul verywhere instead of regexp gregexp Add state_rcv record as parameter to get_message function dynvar used in match may contain regexp special characters Bugfix TSUN 199 TSUN 206 Improvements TSUN 202 TSUN 203 TSUN 205 New
13. 1 4 1 2021 4 5 0 UCD SNMP MIB memTotalReal 0 INTEGER 1033436 SNMP doesn t work with Erlang R10B and Tsung older than 1 2 0 There is a small bug in the snmp_mgr module in old Erlang release R9C 0 This is fixed in Erlang R9C 1 and up but you can apply this patch to make it work on earlier version lib snmp 3 4 src snmp_mgr erl orig 2004 03 22 15 21 59 000000000 0100 lib snmp 3 4 src snmp_mgr erl 2004 03 22 15 23 46 000000000 0100 296 6 296 10 end is_options_ok recbuf Sz Opts when 0 lt Sz Sz lt 65535 gt is options ok Opts tis options ok receive type msg Opts gt is_options_ok Opts is_options_ok receive_type pdu Opts gt is_options_ok Opts is options ok InvOpt gt error invalid option InvOpt is options ok gt true 10 10 How can i simulate a fix number of users Use maxnumber to set the max number of concurrent users in a phase and if you want Tsung to behave like ab you can use a loop in a session to send requests as fast as possible you can also define a max duration in lt load gt lt load duration 5 unit minute gt lt arrivalphase phase 1 duration 10 unit minute gt lt users maxnumber 10 arrivalrate 100 unit second gt lt users gt lt arrivalphase gt lt load gt 10 8 How can I specify the number of concurrent users 75 Tsung Documentation Release 1 6 0 lt s
14. Features TSUN 191 TSUN 192 x TSUN 1L93 TSUN 197 1 4 0 gt 1 4 1 Bugfix TSUN 188 x TSUN 189 x TESUM 190 1 3 3 gt 1 4 0 Bugfix TSUN 129 TSUN 150 TSUN 163 TSUN 166 TSUN 171 TSUN 172 TSUN 178 TSUN 179 TSUN 180 TSUN 182 TSUN 183 TSUN 184 TSUN 187 Improvements TSUN 54 TSUN 96 TSUN 106 TSUN 123 x TSUN 125 TSUN 152 x TSUN 153 TSUN 185 New Features TSUN 162 TSUN 164 TSUN 165 TSUN 167 TSUN 168 TSUN 181 handle postgresql extended protocol add foreach tag loop when a dyn_variable is a list add a switch to allow light queries replies logging add a way to synchronize users for all plugins add do dump option to matching thinktimes value could be dynamically generated with dyn_variable add option to simulate slow connections 1 3 2 gt 1 3 3 Minor bugfixes 17 Aug 2010 Bugfix 81 Tsung Documentation Release 1 6 0 SUN 154 parent proxy doesn t work anymore in 1 3 x tested with 1 3 2 and 1 3 0 PSUN 155 url substitution is broken in some cases PSUN 156 Tsung not using sessions with low probabilities TSUN 157 ssl doesn t work with erlang R14A SUN 158 failure when a proxy is used and an URL substitution is set PSUN 159 HTTP cookies support is broken when a proxy is used PS
15. SSH or rsh needs to be configured to allow connection without password on You must use the same version of Erlang OTP on all nodes otherwise it may not work properly If you can t have erlang installed on remote servers you can use one of the other available agents New in version 1 5 1 erlang monitoring includes now an option to monitor a mysql db with mysqladmin Use it like this lt monitor host db type erlang gt lt monitor gt lt mysqladmin port 3306 username root password sesame gt lt monitor gt Availabe stats number of mysql threads and Questions queries 6 3 2 SNMP The type keyword snmp can replace the erlang keyword if SNMP monitoring is preferred They can be mixed Since version 1 2 2 you can customize the SNMP version community and port number It uses the Management Information Base MIB provided in net snmp see also SNMP monitoring doesn t work 22 Chapter 6 Understanding tsung xml configuration file Tsung Documentation Release 1 6 0 lt monitoring gt lt monitor host geronimo type snmp gt lt monitor host f14 2 type erlang gt lt monitor gt lt monitor host db type snmp gt lt snmp version v2 community mycommunity port 11161 gt lt monitor gt lt monitoring gt The default version is v1 default community public and default port 161 Since version 1 4 2 you can also customize the object identifiers OID retrieved from the SNMP server u
16. append IMPLIED dest CDATA IMPLIED lt ELEMENT shell EMPTY gt lt ATTLIST shell cmd CDATA REQUIRED args CDATA en lt ELEMENT job EMPTY gt lt ATTLIST job type oar torque oar req submit delete stat suspend resume wait_jobs REQUIRED script CDATA IMPLIED walltime CDATA IMPLIED duration CDATA IMPLIED jobid CDATA IMPLIED resources CDATA IMPLIED nodes CDATA IMPLIED queue CDATA IMPLIED options CDATA IMPLIED user CDATA IMPLIED name CDATA tsung notify_port CDATA IMPLIED notify script CDATA IMPLIED gt lt ELEMENT pgsql PCDATA gt lt ATTLIST pgsql password CDATA IMPLIED database CDATA IMPLIED username CDATA IMPLIED name_portal CDATA IMPLIED name_prepared CDATA IMPLIED query CDATA IMPLIED parameters CDATA IMPLIED max_rows CDATA on 94 Chapter 13 tsung 1 0 dtd Tsung Documentation Release 1 6 0 formats CDATA IMPLIED formats_results CDATA IMPLIED contents_from_file CDATA IMPLIED type connect authenticate sql close bind parse cancel call sync execute lt ELEMENT mysql PCDATA gt lt ATTLIST mysql password CDATA IMPLIED database CDATA IMPLIED username CDATA IMPLIED type connect authenticate sql clos
17. content_type application x www form urlencoded method POST gt lt http gt lt request gt Much simpler than the old method In case you have several arrival phases programmed and if you use file with order iter the position in the file will not be reset between different arrival phase You will not be returned to the first line when changing phase lt arrivalphase phase 1 duration 10 unit minute gt lt users maxnumber 10 arrivalrate 100 unit second gt lt arrivalphase gt lt arrivalphase phase 2 duration 10 unit minute gt 6 7 Advanced Features 49 Tsung Documentation Release 1 6 0 lt users maxnumber 20 arrivalrate 100 unit second gt lt users gt lt arrivalphase gt In this example phase 1 will read about 10 lines and phase 2 will read the next 20 lines 6 7 3 Dynamic variables In some cases you may want to use a value given by the server in a response later in the session and this value is dynamically generated by the server for each user For this you can use lt dyn_variable gt in the scenario Let s take an example with HTTP You can easily grab a value in a HTML form like lt form action go cgi method POST gt lt hidden name random_num value 42 gt lt form gt lt form gt with lt request gt lt dyn_ variable name random_num gt lt dyn variables lt http url testtsung html method GET version 1 0 gt lt http gt lt reques
18. endpage don t crash anymore on error during start or stop ta2 gt 1 0 beta3 Minor featur nhancements 24 Feb 2004 fix stupid bug in start script for recorder HTTP fix amp writes in the XML recorder for content attribute HTTP enhanced Cookies parsing domain and path implemented ssl_ciphers can be customized change log directory structure all log files in one directory per test add HTML reports requires the perl Template toolkit change stats names page_resptim gt page response_tim gt request tal gt 1 0 beta2 Minor featur nhancements 11 Feb 2004 reorganise the sources add tools to build a debian package fix documentations add minimalistic man page syntax change GETIMS date replace by GET if_modified_since gt 1 0 betal Major Feature Enhancements 3 Feb 2004 rewrite the configuration engine Now use an XML file add recording application use as a HTTP proxy to record session into XML format add support to OS monitoring cpu memory network Currently use an erlang agent on the remote nodes SNMP is on the TODO list mickael remond erlang fr org can now use several IPs per client host several arrival phases can be set with different arrival rates and duration can set test duration instead of number of users add user defined statistics using a transaction tag HTTP fix cookies and POST handling mickael remond erlang fr org HTTP re
19. function or generate random numbers strings Several types of dynamic variables are implemented sourcet ype attribute e Dynamic variables defined by calling an Erlang function lt setdynvars sourcetype erlang callback ts_user_server get_unique_id gt lt var name id1 gt e Dynamic variables defined by parsing an external file lt setdynvars sourcetype file fileid userdb delimiter order iter gt lt var name user gt lt var name user_password gt lt setdynvars gt delimiter can be any string and order can be iter or random e A dynamic variable can be a random number uniform distribution 52 Chapter 6 Understanding tsung xml configuration file Tsung Documentation Release 1 6 0 lt setdynvars sourcetype random_number start 3 end 32 gt lt var name rndint gt lt setdynvars gt e A dynamic variable can be a random string lt setdynvars sourcetype random_string length 13 gt lt var name rndstringl gt lt setdynvars gt e A dynamic variable can be a urandom string this is much faster than the random string but the string is not really random the same set of characters is always used e A dynamic variable can be generated by dynamic evaluation of erlang code lt setdynvars sourcetype eval code fun Pid DynVars gt ok Val ts_dynvars lookup md5data DynVars ts_digest md5hex Val end gt lt var name md5sum gt lt setdynvars gt In
20. gt lt transaction gt Presence e type can be either presence broadcast orpresence directed e show value must be either away chat dnd or xa e status value can be any text For more info see section 2 2 of RFC 3921 34 Chapter 6 Understanding tsung xml configuration file Tsung Documentation Release 1 6 0 If you omit the show or status attributes they default to chat and Available respectively Example of broadcast presence broadcast to members of your roster lt request gt lt jabber type presence broadcast lt request gt lt thinktime value 5 gt lt thinktime gt lt request gt lt jabber type presence broadcast to chat ack no_ack gt lt request gt lt thinktime value 5 gt lt thinktime gt lt request gt lt jabber type presence broadcast lt request gt lt thinktime value 5 gt lt thinktime gt lt request gt lt jabber type presence broadcast ack no_ack gt lt request gt lt thinktime value 5 gt lt thinktime gt show away status Be right back ack no_ack gt show chat status Available show dnd status Don t bother me ack no_ack gt show xa status I may never come back lt request gt lt jabber type presence broadcast ack no_ack gt lt request gt lt thinktime value 5 gt lt thinktime gt Example of directed presence sent to random online users lt request gt lt jabber type presenc l
21. gt lt request gt lt pgsql type connect database bench username bench gt lt request gt lt transaction gt lt request gt lt pgsql type authenticate password sesame gt lt request gt lt thinktime value 12 gt lt request gt lt pgsql type sql gt SELECT x from accounts lt pgsql gt lt request gt lt thinktime value 20 gt lt request gt lt pgsql type sql gt SELECT from users lt pgsql gt lt request gt 38 Chapter 6 Understanding tsung xml configuration file Tsung Documentation Release 1 6 0 lt request gt lt pgsql type sql gt lt CDATA SELECT n nspname as Schema c relname as Name CASE c relkind WHEN r THEN table WHEN v THEN view WHEN i THEN index WHEN S THEN sequence WHEN s THEN _toto_ END as Type u usename as Owner FROM pg_catalog pg_class c LEFT JOIN pg_catalog pg_user u ON u usesysid c relowner LEFT JOIN pg_catalog pg_namespace n ON n oid c relnamespac WHERE c relkind IN Crp ulpe p AND n nspname NOT IN pg_catalog pg_toast AND pg_catalog pg_table_is_visible c oid ORDER BY 1 2 gt lt pgsql gt lt request gt lt request gt lt pgsql type close gt lt pgsql gt lt request gt lt session gt Example with the extended protocol lt request gt lt pgsql type parse name _prepared P0_7 gt lt CDATA BEGIN gt lt pgsql gt lt
22. match TSUN 115 add pubsub support to the jabber plugin 1 2 2 gt 1 3 0 Major bugfixes and enhancements 03 Sep 2008 Bugfix TSUN 30 SNMP monitoring gives an error TSUN 57 using 1 with a relative path make distributed load fails with timeout error TSUN 60 https recorder broken if an HTML document includes absolute urls TSUN 67 Typo breaks recording of if modified since headers TSUN 68 some sites doesn t work with 443 added in the Host header with https TSUN 71 Tsung does not work with R12B httpd_util funs removed x TSUN 73 Wrong parsing HTTP multipart form data in http request POST form doesn t work x TSUN 75 can not define more pa arguments TSUN 84 dyn variables that don t match should be set to an empty string Improvements TSUN 40 problem to rewrite url for https with gzip encoded html x TSUN 48 tcp udp buffer size should be customizable in the XML config file x TSUN 59 if a User Agent header is set in lt header gt it should override the global one TSUN 62 add abilty to loop back to a previous request in a session TSUN 63 check for ssl and crypto application at compile time TSUN 65 nhance dynamic variables TSUN 66 add global mean and counter computation and reporting for samples TSUN 69 add option to read content of a POST request from an external file x TSUN 79 settin
23. non distributed load you can use a basic setup like lt clients gt lt client host localhost use_controller_vm true gt lt clients gt lt servers gt lt server host 192 168 1 1 port 80 type tcp gt lt server gt lt servers gt This will start the load on the same host and on the same Erlang virtual machine as the controller The server is the entry point into the cluster You can add several servers by default each server will have a weight of 1 and each session will choose a server randomly according to the weight You can set a weight for each server like this weight can be an integer or a float lt servers gt lt server host serverl port 80 type tcp weight 4 gt lt server gt lt server host server2 port 80 type tcp weight 1 gt lt server gt lt servers gt in version older than 1 5 0 the weight option was not implemented and a round robin algorithm was used to choose the server Type can be tcp ssl udp for IPv6 use tcp6 ss16 or udp6 only available in version 1 4 2 and newer or websocket only available in version 1 5 0 and newer There s also a specific type fo BOSH bosh for unencrypted BOSH and bosh_ss1 for encrypted connection 20 Chapter 6 Understanding tsung xml configuration file Tsung Documentation Release 1 6 0 6 2 2 Advanced setup The next example is more complex and use several features for advanced distributed testing lt clients gt lt clie
24. s type lt request gt lt jabber type chat ack no_ack size 16 destination offline gt lt request gt 46 Chapter 6 Understanding tsung xml configuration file Tsung Documentation Release 1 6 0 lt thinktime value 3 gt lt change_type new_type ts_http host foo bar port 80 server_type tcp store true gt lt request gt lt http url http foo bar gt lt request gt lt request gt lt http url favicon gt lt request gt lt change_type new_type ts_jabber host localhost port 5222 server_type tcp restore true gt lt request gt lt jabber type chat ack no_ack size 16 destination previous gt lt request gt store true can be used to save the current state of the session socket cookies for http restore true to reuse the previous state when you switch back to the old protocol and You can use bidi true to indicate that the new protocol is bidirectional or bidi false for a non bidirectional protocol only available in version 1 5 1 and newer A dynamic variable set in the first part of the session will be available after a lt change_type gt There is currently one caveat you have to use a full URL in the first http request after a lt change_type gt a relative URL will fail 6 6 11 Raw The ts_raw plugin allows you to send traffic to any kind of TCP UDP server without any knowledge of the underlying protocol You can set the data by attr
25. time of the login page of your website you just have to put all the requests of this page HTML embedded pictures within a transaction In the example above the transaction called index_request will gives you in the statistics reports the mean response 28 Chapter 6 Understanding tsung xml configuration file Tsung Documentation Release 1 6 0 time to get index en html header gif Be warn that If you have a thinktime inside the transaction the thinktime will be part of the response time 6 6 1 Thinktimes You can set static or random thinktimes to separate requests By default a random thinktime will be a exponential distribution with mean equals to value lt thinktime value 20 random true gt lt thinktime gt In this case the thinktime will be an exponential distribution with a mean equals to 20 seconds Since version 1 3 0 you can also use arange min max instead of a mean for random thinktimes the distribution will be uniform in the interval lt thinktime min 2 max 10 random true gt lt thinktime gt Since version 1 4 0 you can use a dynamic variable to set the thinktime value lt thinktime value _rndthink random true gt lt thinktime gt You can also synchronize all users using the wait_global value lt thinktime value wait_global gt which means wait for all N users to be connected and waiting for the global lock the value can be set using the option lt option name global_n
26. to ADD more than one new contact per session If you want to alter the rate that these roster functions are used during your test it is best to use the session probability factor to shape this The nice thing about this is that when you test run is complete your roster tables should look the same as before you started the test So if you set it up properly you can have pre loaded roster entries before the test and then use these methods to dynamically add modify and remove roster entries during the test as well Example roster modification setup lt session probability 100 name jabber rostermod type ts_jabber gt lt connect authenticate roster get Edu 3 lt transaction name rosteradd gt lt request gt lt jabber type iq roster add ack no_ack destination online gt lt jabber gt lt request gt lt request gt lt jabber type presence subscribe ack no_ack gt lt request gt lt transaction gt Jha SEB lt transaction name rosterrename gt lt request gt lt jabber type iq roster rename ack no_ack gt lt jabber gt lt request gt lt transaction gt lt gt lt transaction name rosterdelete gt lt request gt lt jabber type iq roster remove ack no_ack gt lt jabber gt lt request gt lt transaction gt lt remainder of session gt lt session gt See also Bidirectional Presence for automatic handling of subscribi
27. tuple instead of list SUN 85 xternal entity should be copied into the log directory of a run TSUN 87 add dynamic code evaluation in set_dynvars SUN 88 add mkactivity method support in webdav PSUN 91 reduce memory consumption by hibernating client process while in think state ISUN 97 disable smp erlang for client beam for performance reason 82 Chapter 12 Changelog Tsung Documentation Release 1 6 0 TSUN 98 try several times to connect to the server before aborting a session TSUN 99 make substitution work in lt match gt TSUN 100 improve scalability of ts_launcher TSUN 105 Add load average statistic to server monitoring TSUN 111 add option to manually add a cookie in http requests x TSUN 113 split tsung command into two separate tsung and tsung recorder commands TSUN 116 add ability to run several tsung running in parallel on the same hosts TSUN 120 Https recorder Remove Secure from Set Cookie header New Features x TSUN 25 add a way to start sessions in a specific order at specified times TSUN 89 include tsung plotter into the tsung distribution x TSUN 90 add support for monitoring server cpu mem using munin node TSUN 94 add log action for match TSUN 95 add a default dyn_variable with a unique tsung_userid x TSUN 107 add MUC support to the jabber doc plugin x TSUN 114 add option to apply function to data before looking for a
28. 0X responses redirect with dynamic URLs you can handle this situation using a dynamic variable lt request gt lt dyn variable name redirect re Location http x r gt lt http url index html method GET gt lt http gt lt request gt lt request subst true gt lt http url _redirect method GET gt lt http gt lt request gt You can even handle the case where the server use several redirections successively using a repeat loop this works only with version 1 3 0 and up lt request gt lt dyn variable name redirect re Location http x r gt lt http url test redirect html method GET gt lt http gt lt request gt lt repeat name redirect_loop max_repeat 5 gt lt request subst true gt lt dyn_ variable name redirect re Location http r gt lt http url _redirect method GET gt lt http gt lt request gt lt until var redirect eq gt lt repeat gt 10 6 What is the format of the stats file tsung log Sample tsung log 10 4 Tsung still crashes fails when start it 73 Tsung Documentation Release 1 6 0 stats dump at 1218093520 stats users 247 247 stats connected 184 247 stats users_count 184 247 stats page 187 98 324 579 441 5465 940 2 177 9 237 595 58 stats request 1869 0 371 0 422 5 20703125 0 115 0 431 7444062 581 stats connect 186 0 427 0 184 4 47216796875 0 174 0 894 88665254 59 stat
29. 312 RNG Seeding is too weak and causes collisions Handle cast new beam failed TSUN 316 TSUN 320 PR 91 PR 104 PR 107 PR 109 vements T PR 111 PR 79 PR 81 PR 93 atures TSUN 290 LDAP scenarios fail when compiled with R16A B due to asnlrt_ber_bin get_os_data freemem unix linux crashes on Linux 3 10 0 MOTT Last Will and Testament should not be included if will_topic is not set Fix problem with MOTT SUBACK packages Fix crash when use_controller_vm false and controller id is not empty Fix race condition in ts utils make dir 1 Allow all HTTP headers to be overridden by zxhttp header Add subst for amqp exchange routingKey and queue name added support for mqtt user and password Allow setting of dynamic vars for MOTT s username and password Add two config option Add a web dashboard embedded in tsung controller TSUN 293 TSUN 304 TSUN 306 PR 106 gt hul TSUN 250 TSUN 252 TSUN 253 Ma Enable node local dumptraffic log Add command line option to add additional erlang module load paths Add connection_timeout option XMPP message latency measurement jor enhancements and bugfixes 7 Apr 2014 BOSH Crash Too many requests when using max_restart Code blocks in html version of user manual is unreadable TSUN 256 TSUN 265 TSUN 270 TSUN 271 TSUN 272 TSUN 278 TSUN 279 Unexpected ack global behaviour on BO
30. 4 fix broken path when building debian package add rpm target in makefile implement status add match in graph and doc fix add_dynparams for jabber beta6 gt 1 0 beta7 Minor bugfixes 20 Jul 2004 HTTP really fix parsing of no content length with connection close better handling of configure prefix is working add different types of output backend currently only text works rrdtool is started but unfinished fix ssl_ciphers option is working again beta5 gt 1 0 beta6 Minor featur nhancements 5 May 2004 add a DTD for the configuration file add dynamic request substitution mickael remond erlang fr add dynamic variable parsing from response can be used later in the session for request substitution add response pattern to match log if not match HTTP fix partial header parsing mickael remond erlang fr org HTTP fix chunk parsing when the chunk size is split across two packets HTTP fix parsing of no content length with connection close case check for bad input config file lt client gt name merge client and client_rcv processes into a single process fix do not connect in init anymore this fix too long phases when connection time is high connect stat is now for both new connections and reconnections check phase duration in launcher various code cleanup beta4 gt 1 0 beta5 Major Featur nhancements 25 Mar 2004 add
31. D gt EMENT LIST name xpath re EMPTY gt lt E lt A dyn_variable dyn_variable CDATA REQUIRED CDATA IMPLIED CDATA IMPLIED PATCH DELETE H AD amqp matt gt repeat add_cookiex gt PROPFIND PROPPATCH 92 Chapter 13 tsung 1 0 dtd COPY MOVI Tsung Documentation Release 1 6 0 jsonpath CDATA IMPLIED pgsql_expr CDATA IMPLIED regexp CDATA IMPLIED header CDATA IMPLIED decode html_entities false false gt lt ELEMENT http_header EMPTY gt lt ATTLIST http_header name CDATA REQUIRED encoding CDATA IMPLIED value CDATA IMPLIED gt lt ELEMENT add_cookie EMPTY gt lt ATTLIST add_cookie key CDATA REQUIRED domain CDATA IMPLIED path CDATA IMPLIED value CDATA REQUIRED gt lt ELEMENT www_authenticate EMPTY gt lt ATTLIST www_authenticate passwd CDATA REQUIRED userid CDATA REQUIRED nonce CDATA IMPLIED opaque CDATA IMPLIED cnonce CDATA IMPLIED nc CDATA IMPLIED realm CDATA IMPLIED gop CDATA IMPLIED type basic digest basic gt lt ELEMENT oauth EMPTY gt lt ATTLIST oauth consumer_key CDATA REQUIRED consumer_secret CDATA REQUIRED acce
32. EPORTS 7 1 File format By default Tsung use its own format see FAQ What is the format of the stats file tsung log Since version 1 4 2 you can configure Tsung to use a JSON format however in this case the tools tsung_stats pl and tsung_plotter will not work with the JSON files To enable JSON output use lt tsung backend json gt Example output file with JSON stats timestamp 1317413841 samples timestamp 1317413851 samples name users value 0 max 0 name users_count value 0 total 0 name finish users count value 0 total O timestamp 1317413861 samples name users value 0 max 1 name load hostname requiem value 1 mean 0 0 stddev 0 max 0 0 min 0 0 global_mean 0 Global count 2 OF name freemem hostname requiem value 1 mean 2249 32421875 stddev 0 max 2249 32421875 min 2249 32421875 global_mean 0 global_count 0 name cpu hostname requiem value 1 mean 4 790419161676647 stddev 0 max 4 790419161676647 min 4 790419161676647 global_mean 0 global_count 0 name session value 1 mean 387 864990234375 stddev 0 max 387 864990234375 min 387 864990234375 global_mean O global_count 0 name users count value 1 total 1 name finish users count value 1 tot
33. HAPTER NINE ACKNOWLEDGMENTS The first version of this document was based on a talk given by Mickael R mond during an Object Web benchmarking workshop in April 2004 more info at http jmob objectweb org 1 mickael remond erlang fr org 69 Tsung Documentation Release 1 6 0 70 Chapter 9 Acknowledgments CHAPTER TEN FREQUENTLY ASKED QUESTIONS 10 1 Can t start distributed clients timeout error Most of the time when a crash happened at startup without any traffic generated the problem arise because the main Erlang controller node cannot create a slave Erlang virtual machine The message looks like Can t start newbeam on host XXXXX reason timeout Aborting The problem is that the Erlang slave module cannot start a remote slave node You can test this using this simple command on the controller node remotehost is the name of the client node gt erl rsh ssh sname foo setcookie mycookie Eshell V5 4 3 abort with G foo myhostname 1 gt slave start remotehost bar setcookie mycookie You should see this ok bar remotehost If you got error timeout it can be caused by several problems e ssh in not working you must have a key without passphrase or use an agent Tsung and Erlang are not installed on all clients nodes Erlang version or location install path is not the same on all clients nodes A firewall is dropping Erlang packets Erlang virtual ma
34. ID is john average com then the list name is john average com_list One should take care of properly seeding the server database in order to ensure that such a list exists 16 Chapter 4 Benchmark Approach CHAPTER FIVE USING THE PROXY RECORDER The recorder has three plugins for HTTP WebDAV and for PostgreSQL To start it run tsung recorder p lt PLUGIN gt start where PLUGIN can be http webdav or pgsql for PostgreSQL The default plugin is http The proxy is listening to port 8090 You can change the port with L portnumber To stop it use tsung recorder stop The recorded session is created as tsung tsung_recorderYYYMMDD HH MM xml if it doesn t work take alook at tsung log tsung log tsung_recorder hostname During the recording you can add custom tag in the XML file this can be useful to set transactions or comments tsung recorder record tag lt transaction name login gt Once a session has been created you can insert it in your main configuration file either by editing by hand the file or by using an ENTITY declaration like lt DOCTYPE tsung SYSTEM usr share tsung tsung 1 0 dtd lt ENTITY mysessionl SYSTEM home nniclausse tsung tsung_recorder20051217 13 11 xml gt gt lt sessions gt amp mysessionl lt sessions gt 5 1 PostgreSQL For PostgreSQL the proxy will connect to the server at IP 127 0 0 1 and port 5432 Use I serverIP to change the IP and P p
35. PLIED unit hour minute second REQUIRED maxnumber NMTOKEN IMPLIED gt lt ELEMENT user EMPTY gt lt ATTLIST user start_time NMTOKEN IMPLIED unit hour minute second millisecond second session CDATA REQUIRED gt lt ELEMENT options optionx gt lt ELEMENT option user_agent gt lt ATTLIST option 90 Chapter 13 tsung 1 0 dtd Tsung Documentation Release 1 6 0 name NMTOKE REQUIRED true true NMTOKEN override random id false false IMPLIED IMPL IMPL min NMTOKEN 1 IED max NMTOKEN 1 IED ts_http CDATA type value lt ELEMENT lt ATTLIST set_option set_option ts_jabber IMPLIED gt user agentx name NMTOKE REQUIRED id NMTOKE IMP IED min NMTOKE IMP IED max NM OKEN IMPLIED ts_http CDATA type value EM lt ELEMENT certificate lt ATTLIST certificate cacertfile CDATA keyfile CDATA keypass CDATA certfile CDATA HA AA EMENT sessions EMENT session repeat if lt ATTLIST session lt EL EF change type US PIE PET PLI PET PLI UU y MES O session gt request foreach CDATA CDATA true name bidi persistent probability REQUIRED IMPLIED false NM
36. RRNOS 4 4 44 bee ch A ec a a 11 15 error mysql_badpacket s ces snie 2 2 5 A A 2 04 a en 11 1HETOEPESG u er ea a ee ee ea a ee a Changelog tsung 1 0 dtd Indices and tables 59 59 60 61 61 61 63 63 63 67 69 79 89 99 Index 101 Tsung Documentation Release 1 6 0 Everything you need to know about Tsung About Tsung Tsung is a high performance benchmark framework for various protocols including HTTP XMPP LDAP etc e Website tsung erlang projects org e Source code github com processone tsung e Bugtracker lt https github com processone tsung issues gt CONTENTS 1 Tsung Documentation Release 1 6 0 2 CONTENTS CHAPTER ONE INTRODUCTION 1 1 What is Tsung Tsung formerly IDX Tsunami is a distributed load testing tool It is protocol independent and can currently be used to stress HTTP WebDAV SOAP PostgreSQL MySQL LDAP and Jabber XMPP servers It is distributed under the GNU General Public License version 2 1 2 What is Erlang and why is it important for Tsung Tsung s main strength is its ability to simulate a huge number of simultaneous user from a single machine When used on cluster you can generate a really impressive load on a server with a modest cluster easy to set up and to maintain You can also use Tsung on a cloud like EC2 Tsung is developed in Erlang and this is where the power of Tsung resides Erlang is a concurrency orient
37. Release 1 6 0 Z Liu N Niclausse and C Jalpa Villanueva Traffic Model and Performance Evaluation of Web Servers Performance Evaluation Volume 46 Issue 2 3 October 2001 e This model has already been tested in the INRIA WAGON research prototype Web trAffic GeneratOr and beNchmark WAGON was used in the http www vthd org project Very High Broadband IP WDM test plat form for new generation Internet applications 2000 2004 Tsung has been used for very high load tests e Jabber XMPP protocol 90 000 simultaneous Jabber users on a 4 node Tsung cluster 3xSun V240 1 Sun V440 10 000 simultaneous users Tsung was running on a 3 computers cluster CPU 800MHz e HTTP and HTTPS protocol 12 000 simultaneous users Tsung were running on a 4 computers cluster in 2003 The tested platform reached 3 000 requests per second 10 million simultaneous users running on a 75 computers cluster generating more than one million re quests per second Tsung has been used at e DGI Direction G n rale des imp ts French finance ministry e Cap Gemini Ernst amp Young e FP Institut Francais du P trole French Research Organization for Petroleum e LibertySurf e Sun TM for their Mooddlerooms platform on Niagara processors https blogs oracle com kevinr resource Moodle Sun RA pdf 4 Chapter 1 Introduction 2 1 2 2 CHAPTER TWO FEATURES Tsung main features High Performance Tsung can simulate a hug
38. SH Wrong header line in tsung dump Substitution not working in lt websocket gt path attribute SSL does not work with erlang gt R16 Support literal IPv6 addresses when defining servers Tsung 1 5 0 is notable to do https out of the box when it is compiled from tarballs Tsung 1 5 0 is not able to do substitution of hostname or port in a URL It only can do substitution of path 79 Tsung Documentation Release 1 6 0 A Xx TSUN TSUN TSUN PR PR PR PR 281 285 287 71 41 44 49 Improvements XA HA Xx New Hr HA F TSUN TSUN TSUN TSUN TSUN PR PR PR PR featu TSU TSU TSU TSU TSU PR PR 255 259 Fix debian build for Tsung 1 5 replaces DocBook with Sphinx In some rare conditions in a distributed setup Tsung fails to start the load test request max statistic lower than request mean oAuth bug fix PUT method Fix websocket path subst Add bidi attribute to change_type Fix websocket close issue we should wait a close response Fix unused vars in tq amgp Tsung in Fedora Use xmerl_sax_parser file 2 in case of xml parsing error 268 276 284 51 65 70 74 res 260 264 269 275 280 42 75 Add text frame support for websocket Do not use boot files to start tsung and tsung_controller applications Updated dygraph charting library to the latest
39. SNMP monitoring not yet customizable fix remote start log filename is now encoded to avoid bad parsing of log file by erl Patches from mickael remond erlang fr org Added idx tsunami creation in idx tsunami script if the directory does not already exist Extension of XML attribute entity normalisation HTTP fix Cookie support Cookie are not necessarily separated by HTTP fix long POST request in the recorder dorecord messag was missing enclosing curly brackets and the body length counter were mistakenly taking the header size in its total HTTP Content type support in the recorder needed to handle non HTML form encoded posts add autoconf support to detect Erlang installation path 86 Chapter 12 Changelog Tsung Documentation Release 1 6 0 be be be SOAP Support IDX Tsunami can now record and replay SOAP HTTP scenario The SOAPAction HTTP header is now recorded Preliminary Windows support A workaround has been introduced in the code to handle behaviour difference between Erlang Unxx and Erlang Windows on how the command line is handled When an assumtion is made on the string type of a parameter it should be check that this is actually a string and not an atom ta3 gt 1 0 beta4 Minor bugfixes 16 Mar 2004 fix lost cookie when transfer encoding chunked is used fix config parsing the last request of the last page of a sesssion was not marked as
40. ST version 1 1 contents bla blu gt lt http gt lt request gt lt request gt lt http url bla method POST version 1 1 contents bla blusamp name glop gt lt www_authenticate userid Aladdin passwd open sesame gt lt http gt lt request gt lt session gt lt session name backoffice probability 30 gt lt session gt lt sessions gt If you use an absolute URL the server used in the URL will override the one specified in the lt server gt section The following relative requests in the session will also use this new server value until anew absolute URL is set New in 1 2 2 You can add any HTTP header now as in lt request gt lt http url bla method POST contents bla blusamp name glop gt lt www_authenticate userid Aladdin passwd open sesame gt lt http_header name Cache Control value no cache gt lt http_header name Referer value http www w3 org gt lt http gt lt request gt New in 1 3 0 You can also read the content of aPOST or PUT request from an external file lt http url mypage method POST contents_from_file tmp myfile gt Since 1 3 1 you can also manually set a cookie though the cookie is not persistent you must add it in every lt requests gt lt http url gt lt add_cookie key foo value bar gt lt add_cookie key id value 123 gt lt http gt Authentication Until Tsung 1 5 0 only Basic authent
41. TOKEN IMPLII _jabber IMPLIED gt thinktime IMPLIED ts_pgsql ts_amqp certificate gt IMPLIED ts_pgsql transaction set_option interaction TI weight NMTOKEN IMPLII type lt EL EMENT session_setup lt ATTLIST session_setup ts_Jabber Ka PTY gt CDATA OKEN name REQUIRED IMP probability NM weight NM OKEN IMPLI interaction EM interaction action send r lt ELEMENT lt ATTLIST P TY gt eceive id CDATA EM lt ELEMENT change_type lt ATTLIST change_type new_type t PTY gt s_jabber host NMTOKEN REQUI RED port NMTOKEN REQUI RED ts_http ts_raw ts_pgsql IED REQUIRED REQUIRED gt ts_http ts_raw ts_pgsal server_type NMTOKEN REQUIR ED store true fal restore true fa bidi true false se lse false false false setdynvars gt ts_ldap for ts_ldap ts_webdav ts_webdav ts_mysql ts_fs ts_mysql 91 cy ts Tsung Documentation Release 1 6 0 lt ELEMENT matchx ldap request pgsal request true fals NMTOKEN dyn_variablex mysql fs shell lt ATTLIST subst tag all_
42. TSUN 15 listen port is now customizable with the command line TSUN 17 add option to setup postgresql server IP and port at runtime for the recorder TSUN 22 add support for PUT DELETE and HEAD methods for http 1 1 0 gt 1 2 0 Major featur nhancements 29 May 2006 change name idx tsunami is now called tsung add new plugin pgsql for postgresql load testing new it s now possible to set multiple servers selected at runtime by round robin add size_rcv stats fix beams communication problem introduced in new erlang releases import snmp_mgr src from R9C2 to enable SNMP with R10B rebuild boot scripts if erlang version is different from compile time many DTD improvements improved match add looplabort restart on no match behavior multiple match tags is now possible suggested by msmith truelink com freemem and packet stats for Solaris jasonwtucker gmail com fix several small problems with use_controller_vm option ip is no more mandatory default is 0 0 0 0 clients and monitoring can use hosts list defined in environment variables for use with batch schedulers openpbs torque LSF and OAR 84 Chapter 12 Changelog Tsung Documentation Release 1 6 0 Re Ja performance improvements in stats engine for very high load use session_cache corder add plugin architecture in recorder add pgsql plugin fix regression in recorder for WWW Authentication anders nygren gmail com close client socke
43. Tsung Documentation Release 1 6 0 Nicolas Niclausse July 20 2015 CONTENTS 1 Introduction 3 lil Whatas TSUng canre e eee hh ee PAR NN AN A ot PEAS e e 3 1 2 What is Erlang and why is it important for Tsung e 3 13 Tsumg backstound io 2 4 m an aan al ee GA are ee ae a a Y 3 2 Features 5 2A4 sune man teatres 2223 5 dor ae e Bs A ee ne 5 2 2 HTTP zelafed Teat res y sesos san a BA eke a ee 5 23 WEBDAV related features a ne seda GEE AX Re a wes 6 24 Jabber XMPP related features RG RRS RR a 6 2 3 PosteresOlL related features 10 bio vated ie A AA a de he 6 2 6 MySQL related features eso oo Bae 2 2 04 Rae eh Bun Babay 7 2 1 Websocket related features oo coc omowe rra sida KANG be ee ae eS 7 2 8 AMOP related features 12 00 sete mw NG BR KAG Man eee OR BG OR es ee A ie 7 29 MOTT related features sumisa be bee hehehe A ee a ea eee Pe aa 7 2 10 LDAP related features p oo moski ee ae A Bw nenne A eg ee 7 2 11 Raw plugin related features ccia c mate es ee de ee a Ree eee ee Pe el ea es 7 2 12 Complete reports Set e str drets rios Sede ee Bow BNG Dh dee e e as 8 2 13 Highlights s saoe eee a Rese ser ns da rd eee 8 3 Installation 9 3 1 Dependeneies s sa sraa Soe ae ee ne E a E 9 3 2 COMPNaton a2 a ad des de rn en BR a area KNANG 9 33 Configuration e e e ka Ad a ee de a ea A 10 34 AA 10 33 Feedback Dec se aa A A AA 10 4 Benchmark Approach 13 dil EIETPIWEBDAV oo ts d
44. UN 160 tsung can sometimes hang at the beginning using distributed setup ISUN 161 if statement not allowed in a transaction 1 3 1 gt 1 3 2 Major bugfixes and enhancements 14 Jun 2010 Bugfix ISUN 128 Apostrophes cause string to convert to deep list in setdynvars with Erlang functic TSUN 130 static users starting time is wrong SUN 131 tsung can stop too early when static users are used ISUN 132 http cookies accept domains equals to hostname with a leading x TSUN 133 proxy recorder with SSL fails on large client packets multiple TCP packets SUN 138 when an error occured for ex a timeout during a request and a client exits sta x TSUN 140 tsung does not honor the Proxy Connection keep Alive or Connection keep Alive hu TSUN 142 http recorder can fail with https rewriting and chunked encoding x ISUN 147 UDP amp bidi does not seem to work ISUN 148 dynvar not found when used in match TSUN 149 tsung doesn t work with Amazon Elastic load balancing SUN 151 tsung_stats pl produces invalid x gplot files Improvements ISUN 82 XMPP vhost support ISUN 127 add ability tu use floats for thinktimes PSUN 139 option to set random seed for launchers SUN 141 add dynamic variable support for postgres SUN 146 New tsplot yfactor configuration support breaks most common configurations New Features PSUN 135 add support for SASL ANONYMOUS and PLAIN authentication
45. al 1 name request value 5 mean 75 331787109375 stddev 46 689242405019954 max 168 708984375 min 51 744873046875 global_mean O global_count 0 name page value 1 mean 380 7548828125 stddev 0 0 max 380 7548828125 min 380 7548828125 global_mean 0 7 global counts 0 name connect value 1 mean 116 70703125 stddev 0 0 max 116 70703125 min 116 70703125 global_mean 0 59 Tsung Documentation Release 1 6 0 global count 0 name size_rcv value 703 total 703 name size sent value 1083 total 1083 name connected value 0 max 0 name http_304 value 5 total 5 7 2 Available stats e request Response time for each request e page Response time for each set of requests a page is a group of request not separated by a thinktime connect Duration of the connection establishment e reconnect Number of reconnection e size_rcv Size of responses in bytes e size sent Size of requests in bytes e session Duration of a user s session users Number of simultaneous users it s session has started but not yet finished connected number of users with an opened TCP UDP connection example for HTTP during a think time the TCP connection can be closed by the server and it won t be reopened until the thinktime has expired new in 1 2 2 e custom transactions The mean respon
46. atch batch torque maxusers 30000 gt If you need to scan IP aliases on nodes given by the batch scheduler use scan_intf like this lt client type batch batch torque scan intf eth0 maxusers 30000 gt 6 3 Monitoring Tsung is able to monitor remote servers using several backends that communicates with remote agent This is config ured in the lt monitoring gt section Available statistics are CPU activity load average and memory usage Note that you can get the nodes to monitor from a job scheduler like lt monitor batch true host torque type erlang gt lt monitor gt Several types of remote agents are supported erlang is the default 6 3 1 Erlang The remote agent is started by Tsung It use erlang communications to retrieve statistics of activity on the server For example here is a cluster monitoring definition based on Erlang agents for a cluster of 6 computers lt monitoring gt lt monitor host geronimo type erlang gt lt monitor gt lt monitor host bigfoot 1 type erlang gt lt monitor gt lt monitor host bigfoot 2 type erlang gt lt monitor gt lt monitor host f14 1 type erlang gt lt monitor gt lt monitor host f14 2 type erlang gt lt monitor gt lt monitor host db type erlang gt lt monitor gt lt monitoring gt Note monitored computers needs to be accessible through the network and erlang communications must be allowed no firewall is better
47. ber of simultaneous users for each given phase Launch benchmark with your first application parameters setup tsung start run man tsung for more options Wait for the end of the test or stop by hand with tsung stop reports can also be generated during the test see Statistics and Reports the statistics are updated every 10 seconds For a brief summary of the current activity use tsung status Analyze results change parameters and relaunch another benchmark 4 1 2 WebDAV It s the same approach as HTTP first you start to record one or more sessions with the recorder tsung recorder p webdav start 4 1 3 Benchmarking a proxy server By default the HTTP plugin is used to benchmark HTTP servers But you can also benchmark HTTP Proxy servers To do that you must add in the options section lt option type ts_http name http_use_server_as_proxy value true gt lt option gt 4 2 LDAP An LDAP plugin for the recorder is not yet implemented so you have to write the session by yourself see section Authentication for more information 13 Tsung Documentation Release 1 6 0 4 3 PostgreSQL It s the same approach as HTTP first you start to record one or more sessions with the recorder tsung recorder p pgsql start This will start a proxy listening to port 8090 and will proxy requests to 127 0 0 0 5432 To choose another port and or address tsung recorder L 5432 I 10 6 1 1 P 5433 p pgsql start T
48. bsocket 3 types of requests are available e connect to a given path message send message to server add a attribute ack to specify whether tsung should wait for a response e close Example with Websocket as a session type lt session probability 100 name websocket example type ts_websocket gt lt request subst true gt lt websocket type connect path path to ws gt lt websocket gt lt request gt lt request gt lt dyn_variable name uid jsonpath uid gt lt send data with text frame default binary gt lt websocket type message frame text gt user user password password lt websocket gt lt request gt lt request subst true gt lt match do log when nomatch gt ok lt match gt lt websocket type message gt uid _uid data data lt websocket gt lt request gt lt request gt lt websocket type message ack no_ack gt key value lt websocket gt lt request gt lt request gt lt websocket type close gt lt websocket gt lt request gt lt session gt You can do substitution on attribute path and message content match a response or define dynamic variables based on the response message 40 Chapter 6 Understanding tsung xml configuration file Tsung Documentation Release 1 6 0 If you use change_type to start a websocket don t forget to set bidi true like this lt change_type new_type ts_websoc
49. chines use several TCP ports dynamically generated to communicate if you are using EC2 you may have to change the Security Group that is applied on the VMs used for Tsung open port range 0 65535 SELinux You should disable SELinux on all clients Bad etc hosts This one is wrong real hostname should not refer to localhost loopback 127 0 0 1 localhost myhostname This one is good 127 0 0 1 localhost 192 168 3 2 myhostname sshd configuration For example for SuSE 9 2 sshd is compiled with restricted set of paths ie when you shell into the account you get the users shell when you execute a command via ssh you don t and this makes it impossible to start an Erlang node if Erlang is installed in usr local for example Run 71 Tsung Documentation Release 1 6 0 ssh myhostname erl If the Erlang shell doesn t start then check what paths sshd was compiled with in SuSE see etc ssh sshd_config and symlink from one of the approved paths to the Erlang executable thanks to Gordon Guthrie for reporting this e old beam processes Erlang virtual machines running on client nodes kill all beam processes before starting Tsung Note that you do not need to use the 127 0 0 1 address in the configuration file It will not work if you use it as the injection interface The shortname of your client machine should not refer to this address Warning Tsung launches a new Erlang virtual machine to do the actual inject
50. d gt Currently the maximum value for duration is a little bit less than 50 days unit can be second minute or hour 6 5 Setting options 6 5 1 Thinktimes SSL Buffers Default values can be set up globally thinktime between requests in the scenario SSL cipher algorithms TCP UDP buffer sizes the default value is 32KB These values overrides those set in session configuration tags 1f override is true lt option name thinktime value 3 random false override tru gt lt option name ssl_ciphers value EXP1024 RC4 SHA EDH RSA DES CBC3 SHA gt lt option name tcp_snd_buffer value 16384 gt lt option gt lt option name tcp_rcv_buffer value 16384 gt lt option gt lt option name udp_snd_buffer value 16384 gt lt option gt lt option name udp_rcv_buffer value 16384 gt lt option gt New in version 1 6 0 You can disable the SSL session cache it is enabled by default lt option name ssl_reuse_sessions value false gt You can also use the command line option L lt value gt to change the session liefetime in the cache 10mn by default value must be in seconds 6 5 Setting options 25 Tsung Documentation Release 1 6 0 6 5 2 Timeout for TCP connections New in version 1 6 0 You can specify a timeout in milliseconds for establishing a TCP connection The default is infinity lt option name connect_timeout value 5000 gt You can also change the timeout on a per sess
51. d variation for each type of data and writes these estimations every 10 seconds to the disk and then starts a new estimation for the next 10 sec These computations are done for two kinds of data e sample for things like response time e sample counter when the input is a cumulative one number of packet sent for ex There are also two other types of useful data no averaging is done for those counter a simple counter for HTTP status code for ex e sum for ex the cumulative HTTP response s size it gives an estimated bandwidth usage 7 4 Generating the report cd to the log directory of your test say tsung 109 20040325 16 33 and use the script tsung_stats pl usr lib tsung bin tsung_stats pl Note You can generate the statistics even when the test is running use help to view all available options Available options help this help text verbose print all messages debug print receive without send messages dygraph use dygraphs http danvk org dygraphs to render graphs noplot don t make graphics gnuplot lt command gt path to the gnuplot binary nohtml don t create HTML reports logy logarithmic scale for Y axis tdir lt template_dir gt Path to the HTML tsung templates noextra don t generate graphics from extra data os monitor etc rotate xtics rotate legend of x axes stats lt file gt stats file to analyse default tsung log
52. dap type bind user ldap_auth user_dn password _password gt lt ldap gt lt request gt The only thing that remains to do is to implement the ldap auth user dn function that extract the distinguished name from the search result module ldap_auth export user_dn 1 user_dn _Pid DynVars gt SearchResultEntry proplists get_value search_result DynVars _ DN _ SearchResultEntry DN We aren t covering errors here supposing that there is always one and only one user found that we extract from the search_result variable as defined in the previous search operation Each entry in the result set is a SearchRe sultEntry record The record definition can be found in lt TSUNG_DIR gt include ELDAPv3 hrl As we only need to access the distinguished name of the object we index into the result tuple directly But if you need to access other attributes you probably will want to include the appropriate hrl and use the record syntax instead One of the eight user password pairs in our users file was wrong so we expect 1 8 of the authentication attempts to fail Indeed after running the scenario we can confirm this in the Tsung report see figure LDAP Results The bind oper ation maintains two counters 1dap_bind_ok and ldap_bind_error that counts successful and unsuccessful bind attempts Other examples lt session probability 100 name ldap example type ts_ldap gt lt request gt
53. domly a domain each domain has the same probability Reading usernames and password from a CSV file Since version 1 4 0 you can now use a CSV file to store the usernames and password Configure the CSV file lt options gt lt option name file server id userdb value home foo tsung users csv gt lt options gt And then you have to defined two variables of type file and the first jabber request connect must include a xmpp_authenticate tag lt session probability 100 name Jabber example type ts_jabber gt lt setdynvars sourcetype file fileid userdb delimiter order iter gt lt var name username gt lt var name password gt lt setdynvars gt lt request subst true gt lt jabber type connect ack no_ack gt lt xmpp_authenticate username _username passwd _password gt lt jabber gt lt request gt lt thinktime value 2 gt lt thinktime gt lt transaction name authenticate gt lt request gt lt jabber type auth_get ack local gt lt jabber gt lt request gt lt request gt lt jabber type auth_set_plain ack local gt lt jabber gt lt request gt lt transaction gt lt session gt Moreover since 1 5 0 when using chat messages to random or offline users you should disable the default users not from CSV by setting userid_max to 0 and by setting the fileid for offline and random users also used for pubsub
54. e REQUIRED gt lt ELEMENT raw EMPTY gt lt ATTLIST raw ack global local no_ack REQUIRED datasize CDATA IMPLIED data CDATA IMPLIED gt lt ELEMENT ldap attrx modification gt lt ATTLIST ldap password CDATA IMPLIED user CDATA IMPLIED type bind unbind search start_tls add modify REQUIRED result var CDATA IMPLIED filter CDATA IMPLIED base CDATA IMPLIED scope singleLevel base0bject wholeSubtree IMPLIED cacertfile CDATA IMPLIED keyfile CDATA IMPLIED certfile CDATA IMPLIED dn CDATA IMPLIED gt lt ELEMENT websocket PCDATA gt lt ATTLIST websocket typ connect messag close REQUIRED ack no ack parse IMPLIED frame binary text IMPLIED path CDATA gt lt ELEMENT amqp PCDATA gt lt ATTLIST amqp type CDATA REQUIRED vhost CDATA channel CDATA 1 exchange CDATA routing_key CDATA payload CDATA payload_size CDATA 100 prefetch_size CDATA 0 prefetch_count CDATA 0 persistent CDATA false queue CDATA timeout CDATA 1 ack CDATA false gt lt ELEMENT matt PCDATA gt lt ATTLIST matt type CDATA REQUIRED 95 Tsung Documentation Release 1 6 0 clean_start CDATA fal
55. e transaction setdynvars foreach if repeat change_type for interaction gt lt ATTLIST foreach name NMTOKEN FREQUIRED in NMTOKEN FREQUIRED 96 Chapter 13 tsung 1 0 dtd Tsung Documentation Release 1 6 0 include CDATA exclude CDATA lt ELEMENT repeat lt ATTLIST repeat name NMTOK max_repeat lt ELEMENT if request while if until lt ATTLIST if var CDA REQUIR eq CDAT IMPLIED neq CDAT IMPLIED gt CDAT IMPLIED gte CDAT IMPLIED LE CDAT IMPLIED lte CDAT IMPLIED lt ELEMENT while lt ATTLIST while var CDA eq CDAT neq CDAT gt CDAT gte CDAT Lit CDAT lte CDAT lt ELEMENT until I lt ATTLIST until var CDA eq CDAT neq CDAT gt CDAT gte CDAT lit CDAT lte CDAT IMPL IMPL request while if until change_type R EN thinktime change_type transaction transaction oO QUI oO HHHHH HD PLI PLI PLI PLI PLI PLI II lr So w a a G nn w le QUI oO HHHH HH YD PLI PET PLI PLI PLI PLI UB JO O AeA wf few O setdynvars for repeat interaction gt setdynvars for repeat interaction gt 97 Tsung Documentation Release 1 6 0 98 Chapter 13 tsung 1 0 dtd CHAPTER FOURTEEN INDICES AND TABLES
56. e body of a HTTP response and compares it to a given value lt match do log when nomatch skip_headers http apply to content ts digest md5hex gt 01441debe3d7c lt http url method GET version 1 1 gt You can also use dynamic variables using the subst attribute lt match do log when nomatch subst true gt _myvar lt match gt lt http url method GET gt Since 1 5 0 it s now possible to add name attribute in match tag to name a record printed in match log as follow lt match do log when match name http_match_2000k gt 2000K lt match gt lt http url method GET version 1 1 gt 6 7 5 Loops If Foreach Since 1 3 0 it s now possible to add conditional unconditional loops in a session Since 1 4 0 it is possible to loop through a list of dynamic variables thanks to foreach lt for gt Repeat the enclosing actions a fixed number of times A dynamic variable is used as counter so the current iteration could be used in requests List of attributes rom Initial value 54 Chapter 6 Understanding tsung xml configuration file Tsung Documentation Release 1 6 0 to Last value incr Amount to increment in each iteration var Name of the variable to hold the counter lt for from 1 to 10 incr 1 var counter gt o o lt request gt lt http url page id _counter gt lt http gt lt request gt lt for gt lt repeat gt Repeat th
57. e enclosing action while or until some condition This is intended to be used together with lt dyn_variable gt declarations List of attributes name Name of the repeat max_repeat Max number of loops default value is 20 The last element of repeat must be either lt while gt or lt until gt example lt repeat name myloop max_repeat 40 gt lt request gt lt dyn_variable name result re Result gt lt http url random method GET version 1 1 gt lt http gt lt request gt lt until var result eq 5 gt lt repeat gt Since 1 3 1 it s also possible to add if statements based on dynamic variables lt if gt lt if var tsung_userid eq 3 gt lt request gt lt http url foo gt lt request gt lt request gt lt http url bar gt lt request gt lt if gt You can use eq or neq to check the variable Since 1 5 1 you can also use the comparison operators gt gte lt and lte to do respectively greater than greater than or equal to less thanand less than or equal to If the dynamic variable is a list output from XPath for example you can access to the n th element of a list like this lt if var myvar 1 eq 3 gt Here we compare the first element of the list to 3 lt foreach gt Repeat the enclosing actions for all the elements contained in the list specified The basic syntax is as follows 6 7 Advanced Features 55 Tsung Documentation Release 1 6 0 l
58. e number of simultaneous users per physical computer It can simulates thousands of users on a single CPU Note a simulated user is not always active it can be idle during a thinktime period Traditional injection tools can hardly go further than a few hundreds Hint if all you want to do is requesting a single URL in a loop use ab but if you want to build complex scenarios with extended reports Tsung is for you Distributed the load can be distributed on a cluster of client machines Multi Protocols using a plug in system HTTP both standard web traffic and SOAP WebDAV Jabber XMPP and PostgreSQL are currently supported LDAP and MySQL plugins were first included in the 1 3 0 release SSL support Several IP addresses can be used on a single machine using the underlying OS IP Aliasing OS monitoring CPU memory and network traffic using Erlang agents on remote servers or SNMP XML configuration system complex user s scenarios are written in XML Scenarios can be written with a simple browser using the Tsung recorder HTTP and PostgreSQL only Dynamic scenarios You can get dynamic data from the server under load without writing any code and re inject it in subsequent requests You can also loop restart or stop a session when a string or regexp matches the server response Mixed behaviours several sessions can be used to simulate different type of users during the same benchmark You can define the proportion of the various be
59. ed programming language Tsung is based on the Erlang OTP Open Transaction Platform and inherits several characteristics from Erlang Performance Erlang has been made to support hundred thousands of lightweight processes in a single virtual ma chine Scalability Erlang runtime environment is naturally distributed promoting the idea of process s location transparency Fault tolerance Erlang has been built to develop robust fault tolerant systems As such wrong answer sent from the server to Tsung does not make the whole running benchmark crash More information on Erlang on http www erlang org 1 3 Tsung background History e Tsung development was started by Nicolas Niclausse in 2001 as a distributed jabber load stress tool for internal use at http IDEALX com now OpenTrust It has evolved as an open source multi protocol load testing tool several months later The HTTP support was added in 2003 and this tool has been used for several industrial projects It is now hosted by Erlang projects and supported by http process one net The list of contributors is available in the source archive at https github com processone tsung blob master CONTRIBUTORS and at https github com processone tsung graphs contributors e It is an industrial strength implementation of a stochastic model for real users simulation User events distribu tion is based on a Poisson Process More information on this topic in Tsung Documentation
60. ers count size sent size rev er of users sec Kbits sec Figure 7 2 Graphical output 64 Chapter 7 Statistics and Reports Tsung Documentation Release 1 6 0 Connected Users 400 3 2 3 Connected users Qualif 350b PEEN nl Connected users Prod oo ga a a u aaa aaa aa pgo a a saa aaa aaa aa poo a a a a sa aaa aaa aa ee nd Maa Simultaneous connections a a a aa saa aaa aan 0 SANG 20 40 60 80 100 120 140 160 Minutes elapsed Figure 7 3 Graphical output of tsplot 7 8 RRD 65 Tsung Documentation Release 1 6 0 66 Chapter 7 Statistics and Reports CHAPTER EIGHT REFERENCES e Tsung home page http tsung erlang projects org e Tsung description French e Erlang web site http www erlang org e Erlang programmation Micka l R mond Editions Eyrolles 2003 e Making reliable system in presence of software errors Doctoral Thesis Joe Armstrong Stockholm 2003 e Tutorial on How to write a Tsung plugin written by t ty http www process one net en wiki Writing_a_Tsung_plugin 1 http www erlang projects org Members mremond events dossier de presentat block 10766817551485 file 2 http www editions eyrolles com php accueil Ouvrages ouvrage php3 ouv_ean13 9782212110791 3 http www sics se joe thesis armstrong_thesis_2003 pdf 67 Tsung Documentation Release 1 6 0 68 Chapter 8 References C
61. essions gt lt session probability 100 name ab gt lt for from 1 to 1000 var i gt lt request gt lt http url http myserver index html method GET gt lt http gt lt request gt lt for gt lt session gt lt sessions gt 76 Chapter 10 Frequently Asked Questions CHAPTER ELEVEN ERRORSLIST 11 1 error_closed Only for non persistent session XMPP the server unexpectedly closed the connection the session is aborted 11 2 error_inet_ lt ERRORNAME gt Network error see http www erlang org doc man inet html for the list of all errors 11 3 error_unknown_data Data received from the server during a thinktime not for unparsed protocol like XMPP The session is aborted 11 4 error_unknown_msg Unknown message received see the log files for more information The session is aborted 11 5 error_unknown Abnormal termination of a session see log file for more information 11 6 error_repeat_ lt REPEATNAME gt Error in a repeat loop undefined dynamic variable usually 11 7 error_send_ lt ERRORNAME gt Error while sending data to the server see http www erlang org doc man inet html for the list of all errors 77 Tsung Documentation Release 1 6 0 11 8 error_send Unexpected error while sending data to the server see the logfiles for more information 11 9 error_connect_ lt ERRORNAME gt Error while establishing a connection to the server See http www erlang org d
62. except_body undefined lt ELEMENT lt ATTLIST do when match PCDATA gt match continue loop abort restart log dump match nomatch match subst true false false loop_back NMTOKEN 0 name NMTOKEN max_loop NMTOK max_restart NMTOK sleep_loop NMTOK apply_to_content M skip_headers M gt ogr wow WRU OKEN OKEN FT P3 undefined no lt ELEMENT thinktime lt ATTLIST thinktime random true false false value CDATA IMPLIED min NMTOKEN IMPLIED NMTOKEN IMPLIED EMPTY gt max gt lt ELEMENT user_agent PCDATA x gt lt ATTLIST user_agent probability NMTOKEN REQUIRED gt lt ELEMENT transaction request setdynvars if foreach interaction gt transaction name NMTOKEN REQUIR lt ATTLIST D gt lt E lt A oauth www_authenticate EMENT http LIST http contents CDATA contents_from_file CDATA content_type CDATA if_modified_since CDATA 1 1 1 1 HHHH http job false soap jabber raw websocket continue thinktime for http_headerx method GE url CDATA version CL POST PUT REQUIRED Til Al lt ELEMENT lt ATTLIST soap EMPTY gt soap action CDATA REQUIRE
63. features e Bind e Add modify and search queries e Starttls 2 11 Raw plugin related features e TCP UDP SSL compatible Taw messages 2 6 MySQL related features 7 Tsung Documentation Release 1 6 0 e no ack local or global ack for messages 2 12 Complete reports set Measures and statistics produced by Tsung are extremely feature full They are all represented as a graphic Tsung produces statistics regarding e Performance response time connection time decomposition of the user scenario based on request grouping instruction called transactions requests per second e Errors Statistics on page return code to trace errors e Target server behaviour An Erlang agent can gather information from the target server s Tsung produces graphs for CPU and memory consumption and network traffic SNMP and munin is also supported to monitor remote servers par Note that Tsung takes care of the synchronization process by itself Gathered statistics are synchronized It is possible to generate graphs during the benchmark as statistics are gathered in real time 2 13 Highlights Tsung has several advantages over other injection tools e High performance and distributed benchmark You can use Tsung to simulate tens of thousands of virtual users e Ease of use The hard work is already done for all supported protocol No need to write complex scripts Dynamic scenarios only requires small trivial piece of code e M
64. fferent tests runned by Tsung tsplot is able to plot data from several tsung log files onto the same charts for further comparisons and analyzes You can easily customize the plots you want to generate by editing simple configuration files You can get more information in the manual page of the tool man tsplot Example of use tsplot First test firsttest tsung log Second test secondtest tsung log d outputdir Here s an example of the charts generated by tsplot figure Graphical output of tsplot 7 8 RRD A contributed perl script tsung rrd pl is able to create rrd files from the Tsung log files It s available in usr lib tsung bin tsung rrd pl 7 6 Graphical overview 63 Tsung Documentation Release 1 6 0 Response Time Transactions Requests and connection establishment mean 11 19 connect 9 8 7 Pa 6 5 4 3 2 1 a 166 200 300 400 500 666 706 866 9001000 a 166 200 300 400 500 600 706 200 9001000 unit sec unit sec Throughput Transactions Requests rate 4000 connect 3500 request H ia 3000 N 2500 5 m 2000 9 pi u 1566 hi 1900 566 A A o kaw O ARIA ARA APSF B 166 266 306 400500 666766 800 9001000 unit sec unit sec Network throughput New Users rate users count finish us
65. for XMPP TSUN 136 add new plugin distributed testing of filesystem nfs for ex using a generic mot ISUN 137 add a way to mix requests types inside a single session ISUN 143 global time limit for the load test PSUN 145 tsung should support json parsing for dynamic variable 1 3 0 gt 1 3 1 Major bugfixes and enhancements 9 Sep 2009 Bugfix TSUN 92 the computation of the minimum for sample_counter is wrong ISUN 93 maxnumber not respected if several clients are used SUN 102 dyn variable configuration fails if variable name is not a valid erlang atom TSUN 103 Network error handling in munin plugin PSUN 104 tsung plotter can t handle the os_mon statistics TSUN 108 Cannot handle complicated dyn_var name SUN 109 Tsung status displays always phase one even if you have more than one phase TSUN 110 Cookie header not present if the URL is dynamically generated by a previous redire SUN 117 Bug in HTTP empty header can be generated in some case SUN 118 HTTPS proxy recorder ts utils to https incorrectly handles Content Length for PO SUN 119 tsung can crash when reading empty values from a csv file PSUN 122 same http cookie key with different domains don t work Improvements ISUN 47 ts mon can be a bottleneck during very high load testing SUN 77 Structural requests or goto like action for match in HTTP SUN 81 Dynamic variables API TSUN 83 file_server using fixed
66. g Host header with http header doesn t work as expected New Features TSUN 56 ldap plugin TSUN 58 add a new statistics backend to dump all stats in a file TSUN 61 add a Webdav plugin TSUN 64 add md5 authentication in the pgsql plugin TSUN 72 Add support for defining dyn_variables using XPath x TSUN 78 mysql plugin TSUN 80 add random thinktime with in a given range min max Tasks TSUN 76 add explanation for errors name in the documentation 1 2 1 gt 1 2 2 Minor bugfixes and enhancements 23 Feb 2008 Bugfix TSUN 30 SNMP monitoring gives an error TSUN 31 dyn_variable usage TSUN 35 udp is not working TSUN 36 default regexp for dyn_variable doesn t work in all case TSUN 38 server monitoring crash if an ethernet interface s name is more than 6 chars long TSUN 39 https recording doesn t work with most browsers 83 Tsung Documentation Release 1 6 0 TSUN 43 session should not terminate if rosterjid is not defined TSUN 49 lt match gt doesn t work with jabber plugin TSUN 51 tsung does not work with R12B httpd_util funs removed TSUN 53 postgresql errors not reported in all cases TSUN 55 no error counter when userid max is reached Improvements x TSUN 14 no_ack messages and async
67. g xml configuration file Tsung Documentation Release 1 6 0 lt request gt lt http url method GET gt lt http gt lt request gt lt session gt lt sessions gt In this example we have two sessions one has a 0 probability and therefore will not be used in the first phase and the other 100 We define 3 users starting respectively 3mn and 5 seconds after the beginning of the test using the http example session one starting after 10 minutes and a last one starting after 11 minutes using the oo session this time New in version 1 5 1 If you want to start several sessions at once and if the name of these sessions starts with the same prefix you can use a wildcard Given the previous sessions this example will start two users one with foo session and one with foobar session at starttime 10s lt user session foox start_time 10 unit second gt 6 4 3 Duration of the load test By default tsung will end when all started users have finished their session So it can be much longer than the duration of arrivalphases If you want to stop Tsung after a given duration even if phases are not finished or if some sessions are still actives you can do this with the duration attribute in Load feature added in 1 3 2 lt load duration 1 unit hour gt lt arrivalphase phase 1 duration 10 unit minute gt lt users interarrival 2 unit second gt lt users gt lt arrivalphase gt lt loa
68. g xml configuration file Tsung Documentation Release 1 6 0 with Erlang R12B and newer version This give us some benefices e XPath is simple to write and to read and match very well with HTML XML pages e The parser works on binaries and doesn t create any string e The cost of parsing the HTML XML and build the tree is amortized between all the dyn variables defined for a given request To utilize XPath expression use a xpath attribute when defining the dyn_variable instead of re like lt dyn variable name fieldl_value xpath input name field1 fvalue gt lt dyn variable name title xpath html head title text gt There is a bug in the XPath engine result nodes from descendant or self aren t returned in document order This isn t a problem for the most common cases However queries like img 1 G src are not recommended as the order of the lt img gt elements returned from img is not the expected The order is respected for paths without descendant or self axis so this html body div 2 img 3 src is interpreted as expected and can be safely used It is possible to use X Path to get a list of elements from an html page allowing dynamic retrieval of objects You can either create embedded Erlang code to parse the list produced or use foreach that was introduced in release 1 4 0 For XMPP you can get all the contacts in a dynamic variable lt request subst true gt
69. gt lt request gt You also have to specify the number of users to be connected lt option type ts_jabber name global_number value 100 gt lt option gt To be sure that exactly global number users are started add the maxnumber attribute to users lt users maxnumber 100 interarrival 1 0 unit second gt lt users gt If you do not specify maxnumber the global ack will be reset every global number users 14 Chapter 4 Benchmark Approach Tsung Documentation Release 1 6 0 Bidirectional Presence New in 1 2 2 This version adds an new option for a session if you set the attribute bidi for bidirectional in the lt session gt tag lt session bidi true gt then incoming messages from the server will be analyzed Currently only roster subscription requests are handled if a user received a subscription request lt presence type subscribe gt it will respond with a lt presence type subscribed gt message Status Offline Connected and Online You can send messages to offline or online users A user is considered online when he has send a presence initial message before this message the state of the user is connected If you want to switch back to connected before going offline you can use a presence final message presence final does two things It removes the client from the list of Online users and moves them into the list of Connected users e It sends a broadcast presence update of type
70. have to start several virtual machine on the same host to bypass the maxusers limit It could be good if you want to test a large number of users to make some modifications to your system before launching Tsung e Put the domain name into etc hosts if you don t want the DNS overhead and you only want to test the target server e Increase the maximum number of open files and customize TCP settings in etc sysct1 conf For exam ple 72 Chapter 10 Frequently Asked Questions Tsung Documentation Release 1 6 0 net ipv4 tcp_tw_reuse 1 net ipv4 tcp_tw_recycle 1 net ipv4 ip_local_port_range 1024 65000 fs file max 65000 10 4 Tsung still crashes fails when start it First look at the log file t sung log XXX tsung_controller yourhostname to see if there is a prob lem If the file is not created and a crashed dump file is present maybe you are using a binary installation of Tsung not compatible with the version of Erlang you used If you see nothing wrong you can compile Tsung with full debugging recompile with make debug and don t forget to set the loglevel to debug in the XML file see tsung xml log levels To start the debugger or see what happen start Tsung with the debug argument instead of start You will have an Erlang shell on the tsung_controller node Use toolbar start to launch the graphical tools provided by Erlang 10 5 Can I dynamically follow redirect with HTTP If your HTTP server sends 3
71. haviours in the benchmark scenario Stochastic processes in order to generate a realistic traffic user thinktimes and the arrival rate can be random ized using a probability distribution currently exponential HTTP related features HTTP 1 0 and HTTP 1 1 support GET POST PUT DELETE HEAD OPTIONS and PATCH requests Cookies Automatic cookies management but you can also manually add more cookies GET If modified since type of request WWW authentication Basic and Digest OAuth 1 0 User Agent support Tsung Documentation Release 1 6 0 2 3 Any HTTP Headers can be added Proxy mode to record sessions using a Web browser SOAP support using the HTTP mode the SOAPAction HTTP header is handled HTTP server or proxy server load testing WEBDAV related features The WebDAV RFC 4918 plugin is a superset of the HTTP plugin It adds the following features some versionning extensions to WebDAV REC 3253 are also supported e Methods implemented DELETE CONNECT PROPFIND PROPPATCH COPY MOVE LOCK UNLOCK MKCOL REPORT OPTIONS MKACTIVITY CHECKOUT MERGE e Recording of DEPTH IF TIMEOUT OVERWRITE DESTINATION URL and LOCK TOKEN Headers 2 4 2 5 Jabber XMPP related features Authentication plain text digest and sip digest STARTTLS presence and register messages Chat messages to online or offline users MUC join room send message in room change nickname Roster set and get requests Global u
72. his will start a proxy listening to port 5432 and will proxy requests to 10 6 1 1 5433 4 4 MySQL A MySQL plugin for the recorder is not yet implemented so you have to write the session by yourself see section MySOL for more information 4 5 Jabber XMPP 4 5 1 Overview This paragraph explains how to write a session for Jabber XMPP There are two differences between HTTP and Jabber testing e There is no recorder for Jabber so you have to write your sessions by hand An example is provided in Jab ber XMPP e The Jabber plugin does not parse XML instead it uses packet acknowledgments 4 5 2 Acknowledgments of messages Since the Jabber plugin does not parse XML historically it was for performance reasons you must have a way to tell when a request is finished There are 3 possibilities using the ack attribute e ack local as soon as a packet is received from the server the request is considered as completed Hence 1f you use a local ack with a request that do not require a response from the server presence for ex 1t will wait forever or until a timeout is reached ack no_ack as soon as the request is send it is considered as completed do not wait for incoming data ack global synchronized users its main use is for waiting for all users to connect before sending mes sages To do that set a request with global ack it can be the first presence msg lt request gt lt jabber type presence ack global
73. hronous msg sent by the server are not available in the ret TSUN 27 handle bidirectional protocols x TSUN 28 Refactoring needed to ease the change of the userid password generation code TSUN 29 Multiple file_server support TSUN 32 make snmp server options tunable TSUN 34 add costum http headers TSUN 44 tsung should ignore whitespace keepalive from xmpp server x TSUN 45 add kernel poll support for better performance TSUN 46 add number of open connections in statistics TSUN 47 ts_mon can be a bottleneck during very high load testing TSUN 50 use the whole range of Id from 0 to userid_max before reusing already used Ids New Features x TSUN 26 Ability to loop on a given sequence of phase TSUN 52 Adding comment during script capture TSUN 41 add support for parent proxy for http only not https 1 2 0 gt 1 2 1 Minor bugfixes and enhancements 07 Oct 2006 Bugfix TSUN 5 get traffic from all interfaces instead of only eth0 in erlang os monitoring Linux TSUN 18 the pgsql recorder fails if the client doesn t try first an SSL connection TSUN 19 a character in some requests eg type sql for pgsql make the config_server crash TSUN 20 pgsql client fails while parsing data from server TSUN 21 substitution in URL is not working properly when a new server or port is set TSUN 23 set default http version 1 1 TSUN 24 destination previous doesn t work Jabber Improvement
74. ibute data or just set a data size by attribute datasize in this situation Tsung send datasize bits of zeros data and datasize can be a dynamic values The only way to control the response from the server is to use the ack attribute also used by the jabber plugin e ack local as soon as a packet is received from the server the request is considered as completed Hence if you use a local ack with a request that do not require a response from the server it will wait forever or until a timeout is reached ack no_ack as soon as the request is send it is considered as completed do not wait for incoming data ack global synchronized users its main use is for waiting for all users to connect before send ing messages To do that set a request with global ack the value can be set using the option lt option name global_number value XXX gt and by setting maxnumber N in lt arrivalphase gt lt session probability 100 name raw type ts_raw gt lt transaction name open gt lt request gt lt raw data HELLO ack local gt lt raw gt lt request gt lt transaction gt lt thinktime value 4 gt lt request gt lt raw datasize 2048 ack local gt lt raw gt lt request gt lt transaction name bye gt lt request gt lt raw data BYEBYE ack local gt lt raw gt lt request gt lt transaction gt lt session gt 6 6 Sessions 47 Tsung Documentation Release 1 6 0
75. ic is rate limited currently 6 7 7 Requests exclusion New in version 1 5 1 It is possible to exclude some request for a special run To do this you have to tag them and use the option x when launching the run For example to exclude the GET of foo png add a tag to the respective request lt request gt lt http url method GET gt lt http gt lt request gt lt request tag image gt lt http url foo png method GET gt lt http gt lt request gt 56 Chapter 6 Understanding tsung xml configuration file Tsung Documentation Release 1 6 0 Then launch the run with tsung f SCENARIO xml x image start Only the GET to will be performed Note that request tags also get logged on dumptraffic protocol see File structure 6 7 8 Client certificate New in version 1 5 1 It is possible to use a client certificate for ssl authentication You can use dynamic variables to set some parameters of the certificate and the key password is optional lt session name https with cert probability 70 type ts_http gt lt set_option name certificate gt lt certificate cacertfile etc ssl ca pem o keyfile _keyfile keypass _keypass certfile home nobody tsung client lt set_option gt 6 7 Advanced Features 57 Tsung Documentation Release 1 6 0 58 Chapter 6 Understanding tsung xml configuration file CHAPTER SEVEN STATISTICS AND R
76. ication was implemented You can now use Digest Authentication and OAuth 1 0 To use Digest authentication lt 1 First request return 401 We use dynvars to fetch nonce and realm gt lt request gt lt dyn variable name nonce header www authenticate nonc ufo lt dyn variable name realm header www authenticate realm gt lt http url digest method GET version 1 1 gt lt request gt 30 Chapter 6 Understanding tsung xml configuration file Tsung Documentation Release 1 6 0 lt I 2 This request will be authenticated Type digest is important We use the nonce and realm values returned from the previous If the webserver returns the nextnonce we set it to the nonce dynvar for use with the next request Else it stays set to the old value gt lt request subst true gt lt dyn_variable name nonce header authentication info nextnonce gt lt http url digest method GET version 1 1 gt lt www_authenticate userid user passwd passwd type digest realm _realm nonce _nonc lt http gt lt request gt To use OAuth authentication lt Getting a Request Token gt lt request gt lt dyn_variable name access_token re oauth_token amp amp gt lt dyn_variable name access_token_secret re oauth_token_secret amp amp 1x gt lt http url oauth example request_token php method POST versi
77. ion basis using set_option lt set_option name connect_timeout value 1000 gt You can also enable the TCP REUSEADDR option globally lt option name tcp_reuseaddr value true gt 6 5 3 Retry Attempts and Timeouts New in version 1 6 0 You can specify the amound of retry attempts made by tsung The default is 3 lt option name max_retries value 5 gt To disable retries entirely set the value to 0 In addition the option retry timeout in milliseconds defaults to 10 is used to implement a simple backoff algorithm retry retry_timeout lt set_option name retry_timeout value 1000 gt 6 5 4 Timeout for acknowledgments of messages This is used to set the idle timeout used for parse and local ack and global ack timeout used for global ack By default idle timeout will be 10min 600000 and global ack timeout will be infinity This value can be changed like this lt option name idle_timeout value 300000 gt lt option gt lt option name global_ack_timeout value 6000000 gt lt option gt 6 5 5 Hibernate New in version 1 3 1 The option hibernate is used to reduced memory consumption of simulated users during thinktimes By default hibernation will be activated for thinktimes higher than 10sec This value can be changed like this lt option name hibernate value 5 gt lt option gt To disable hibernation you must set the value to infinity 6 5 6 Ra
78. ion even when you have only one machine in the injection cluster unless use controller vmis set to true This is because it needs to by pass some limit with the number of open socket from a single process 1024 most of the time The idea is to have several system processes Erl beam that can handle only a small part of the network connection from the given computer When the maxusers limit simultaneous is reach a new Erlang beam is launched and the newest connection can be handled by the new beam New in 1 1 0 If you don t use the distributed feature of Tsung and have trouble to start a remote beam on a local machine you can set the use controller vm attribute to true lt client host mymachine use_controller_vm true gt 10 2 Tsung crashes when start it Does your Erlang system has SSL support enabled to test it gt erl Eshell V5 2 abort with G 1 gt ssl start you should see ok 10 3 Why do i have error_connect_emfile errors emfile error means too many open files This happens usually when you set a high value for maxusers in the lt client gt section the default value is 800 The errors means that you are running out of file descriptors you must check that maxusers is less than the maximum number of file descriptors per process in your system see ulimit n You can either raise the limit of your operating system see etc security limits conf for Linux or de crease maxusers Tsung will
79. iption date timestamp at the end of the request seconds since 1970 01 01 00 00 00 UTC pid erlang process id id tsung user id host server hostname url URL relative HTTP status HTTP reponse status 200 304 etc size reponse size in bytes duration request duration msec transaction name of the transaction if any this request was made in match if a match is defined in the request matchInomatch last lt match gt if several are defined error name of http error or empty tag tag name if the request was tagged empty otherwise Warning In the general case several Tsung clients used the resulting file will not be sorted so you may have to sort it before analyzing it 19 Tsung Documentation Release 1 6 0 For heavy load testing tens of thousands requests per second the protocol logging may overload the controller In this case you can use protocol_local instead In this case the log files will be written on each slave locally You will have to manually merged the logs at the end of the test The loglevel can also have a great impact on performance For high load warning is recommended Possible values are e emergency e critical error e warning e notice default e info debug For REALLY verbose logging recompile tsung with make debug and set loglevel to debug 6 2 Clients and server Scenarios start with clients Tsung cluster and server definitions 6 2 1 Basic setup For
80. ke into account the speed of the client machine For instance if one real client has a weight of 1 and the other client has a weight of 2 the second one will start twice the number of users as the first the proportions will be 1 3 and 2 3 In the earlier example where for the second client has 2 CPU and weight 3 the weight is equal to 1 5 for each CPU maxusers The maxusers parameter is used to bypass the limit of maximum number of sockets opened by a single process 1024 by default on many OS and the lack of scalability of the select system call When the number of users is higher than the limit a new erlang virtual machine will be started to handle new users The default value of maxusers is 800 Nowadays with kernel polling enable you can and should use a very large value for maxusers 30000 for example without performance penalty but don t forget to raise the limit of the OS with ulimit n see also Why do i have error_connect_emfile errors Note If you are using a tsung master with slaves the master distributes sessions to slaves If a session contains multiples requests a slave will execute each of these requests in order 6 2 3 Running Tsung with a job scheduler Tsung is able to get its client node list from a batch job scheduler It currently handle PBS torque LSF and OAR To do this set the type attribute to bat ch e g 6 2 Clients and server 21 Tsung Documentation Release 1 6 0 lt client type b
81. ket host 127 0 0 1 port 8080 server_type tcp restore true st 6 6 7 AMQP For AMQP it supports publish and consume messages on multiple channel Available request types connection open to a given vhost connection close channel open with specified and valid channel id channel close with specified and valid channel id confirm select on specified and already opened channel basic gos on specified and already opened channel only supports attribute prefetch_count basic publish with channel id exchange name routing_key and the payload basic consume with channel id queue name waitForConfirms with timeout for confirmations from the server waitForMessages with timeout for messages delivered to the client Example with AMQP as a session type lt session probability 100 name amgp example type ts amgp bidi true gt lt request gt lt amqp type connection open vhost gt lt amqp gt lt request gt lt open channel channel id is from 1 to 10 gt lt for from 1 to 10 incr 1 var loops gt lt request gt lt amqp type channel open gt lt amqp gt lt request gt lt for gt lt ignore this request if you don t need publisher confirm gt lt for from 1 to 10 incr 1 var loops gt lt request subst true gt lt amgp type confirm select channel _loops gt lt amqp gt lt request gt lt for gt lt for from 1 to 10 incr
82. ket options When you use Websocket as a server type you can set the following options for Websocket lt option name websocket_path value chat gt lt send websocket data with text frame default binary gt lt option name websocket_frame value text gt Use websocket_ path for setting the path of the websocket request use websocket_ frame for setting the frame type option type binary and text and binary as default of the sending websocket data 6 5 11 XMPP Jabber options Default values for specific protocols can be defined Here is an example of option values for Jabber XMPP lt option type ts_jabber name global_number value 5 gt lt option type ts_jabber name userid_max value 100 gt lt option type ts_jabber name domain value jabber org gt lt option type ts_jabber name username value myuser gt lt option type ts_jabber name passwd value mypasswd gt lt option type ts_jabber name muc_service value conference localhost gt 6 5 Setting options 27 Tsung Documentation Release 1 6 0 Using these values users will be myuserXXX where XXX is an integer in the interval userid max and passwd mypasswdXXX Tf not set in the configuration file the values will be set to e global number 100 e userid max 10000 e domain erlang projects org e username tsunguser e passwd sesame Other options are available if you prefer to use a CSV file f
83. knowledgments Frequently Asked Questions 10 1 Can tstart distributed clients timeout Error 524 64 za Sue we SS NG UNANG ee 10 2 Tsung erashesiwhen start it ecne 2 49 Va ged ha e Be eee E re vers 10 3 Why doa have error_conneet emfile errors o po 2 24 54 ma Son warmer 10 4 Tsung still crashes fails when I start it oaoa 10 5 Can I dynamically follow redirect with HTTP o o 10 6 What is the format of the stats file tsung log lt o ess s o o e 10 7 How can I compute percentile quartiles median for transactions or requests response time 10 8 How can I specify the number of concurrent users ee 10 9 SNMP monitoring doesn t work oscar ar anne nn er Steed Errors list IM ertor closed AA 11 2 error met lt ERRORNAMIES gt cuca x 5 a a Kine ae Be 11 3 erfor unknown data 2 Se eee ES RE ARE RE ER EEE 11 4 seror nknown MSE a an stacks a er SEES ae ERE RES Ri a da TLS adas III 11 6 error repeat lt REPEATNAMES 2 2 4 22 amp a ela A aa 11 7 errer_s nd_ lt BRRORNAMES gt 4 xy 6 amp 5 402884 6400 em a bE DL DR A es 11 8 error send cee a eR A Bae a ae aa Daran nen Boece S 11 9 error c mnect lt ERRORNAMES os wagkang eo aaa ae a ew eee Pe ee es 11 10 error no online 4 2 2 aaa area eS BABA VA a aa 11 12 error nomee userid 2 4 2225 2a nr BANNER RA A Dh RE A A MI error Nextisession e u un rare Ge ee ee AR Reames 11 14 error mysql lt E
84. l gt lt jabber gt lt request gt lt transaction gt lt request gt lt jabber type presence initial ack no_ack gt lt request gt lt thinktime value 30 gt lt thinktime gt lt transaction name online gt lt request gt lt jabber type chat ack no_ack size 16 destination online gt lt request gt lt transaction gt lt thinktime value 30 gt lt thinktime gt lt transaction name offline gt lt request gt lt jabber type chat ack no_ack size 56 destination offline gt lt request gt lt transaction gt lt thinktime value 30 gt lt thinktime gt lt transaction name close gt lt request gt lt jabber type close ack local gt lt jabber gt lt request gt lt transaction gt lt session gt lt sessions gt Message stamping It is possible to stamp chat message by setting stamped attribute of lt jabber gt element inside request to true The stamp will include current timestamp and ID of the sender node If the recipient will recognise the node ID it will compare the timestamp inside message with the current one The difference will be reported as xmpp_msg_latency metric in milliseconds The aim of node ID comparison is to avoid slight inconsistencies of timestamps on different Tsung nodes Only a fraction of requests will hit the same node they originated from but with request rate high enough this fraction should be sufficient stamped is allowed only wi
85. lt dyn_ variable name contactJids xpath iq type result query xmlns jabber iq roster item string length wr type 0 lt jabber type iq roster get ack local gt lt request gt JSONPath Another way to analyze the server response has been introduced in the release 1 3 2 when the server is sending JSON data It is only for the HTTP plugin This feature uses the mochiweb library and only works with Erlang R13B and newer version Tsung implements a very limited subset of JSONPath as defined here http goessner net articles JsonPath To utilize jsonpath expression use a jsonpath attribute when defining the lt dyn_variable gt gt instead of re like lt dyn_variable name array3_value jsonpath field array 3 value gt You can also use expressions Key Val e g lt dyn_variable name myvar jsonpath field array name bar value gt PostgreSQL New in version 1 3 2 Since the PostgreSQL protocol is binary regexp are not useful to parse the output of the server Instead a specific parsing can be done to extract content from the server s response to do this use the pgsql_expr attribute Use data_row L C to extract the column C of the line L of the data output You can also use the literal name of the column ie the field name of the table This example extract 3 dynamic variables from the server s response 6 7 Advanced Features 51 Tsung Documentation Release 1 6 0 First
86. lt ldap type bind user uid foo password bar gt lt request gt lt request gt lt ldap type search base dc pablo desktop filter cn user2 6 6 Sessions 45 Tsung Documentation Release 1 6 0 Name Highest Rate Total numbel finish_users count 87 sec 197 Idap_bind_error 10 9 sec 991 Idap_bind_ok 76 1 sec 6982 LI Pa 7 a m Figure 6 2 LDAP Results scope wholeSubtree gt lt ldap gt lt request gt lt Add Adds a new entry to the directoryx gt lt request subst true gt lt ldap type add dn _new_user_dn gt lt attr type objectClass gt lt value gt organizationalPerson lt value gt lt value gt inetOrgPerson lt value gt lt value gt person lt value gt lt attr gt lt attr type cn gt lt value gt _new_user_cn lt value gt lt attr gt lt attr type sn gt lt value gt fffs lt value gt lt attr gt lt ldap gt lt request gt lt Modify Modifies an existing entry type add delete modify gt lt request subst false gt lt ldap type modify dn cn u119843 dc pablo desktop gt lt modification type replace gt lt attr type sn gt lt value gt SomeSN lt value gt lt attr gt lt attr type mail gt lt value gt some mail com lt value gt lt attr gt lt modification gt lt 1dap gt lt request gt lt session gt 6 6 10 Mixing session type Since version 1 3 2 a new tag change_type can be used in a session to change it
87. minutes of the test a new user will be created every 2 seconds then during the next 10 minutes a new user will be created every second and for the last 10 minutes 10 users will be generated every second The test will finish when all users have ended their session You can also use arrivalrate instead of interarrival For example if you want 10 new users per second use lt arrivalphase phase 1 duration 10 unit minute gt lt users arrivalrate 10 unit second gt lt users gt lt arrivalphase gt You can limit the number of users started for each phase by using the maxnumber attribute just like this lt arrivalphase phase 1 duration 10 unit minute gt lt users maxnumber 100 arrivalrate 10 unit second gt lt users gt lt arrivalphase gt lt arrivalphase phase 2 duration 10 unit minute gt lt users maxnumber 200 arrivalrate 10 unit second gt lt users gt lt arrivalphase gt In this case only 100 users will be created in the first phases and 200 more during the second phase The complete sequence can be executed several times using the loop attribute in the load tag Loop 2 means the sequence will be looped twice so the complete load will be executed 3 times feature available since version 1 2 2 The load generated in terms of HTTP requests seconds will also depend on the mean number of requests within a session if you have a mean value of 100 requests per session and 10 new
88. nformation name description username organisation gt lt ELEMENT name PCDATA gt lt ELEMENT description PCDATA gt lt ELEMENT username PCDATA gt lt ELEMENT organisation PCDATA gt lt ATTLIST tsung dumptraffic true false light protocol protocol_local false backend text json rrdtool fullstats text loglevel emergency critical error warning notice info debug notice version TOKEN IMPLIED gt lt ELEMENT servers server gt lt ELEMENT server EMPTY gt lt ATTLIST server host NMTOKEN REQUIRED port NMTOKEN REQUIRED weight NMTOKEN 1 type ssl tcp udp erlang ssl6 tcp6 udp6 bosh bosh_ssl websocket REQUIR lt ELEMENT clients client gt lt ELEMENT client ip gt lt ATTLIST client cpu OKEN 1 type machine batch machine host OKEN IMPLIED batch torque pbs lsf oar IMPLIED scan_intf NMTOKEN IMPLIED maxusers OKEN 800 use_controller_vm true false false weight OKEN 1 gt lt ELEMENT ip EMPTY gt lt ATTLIST ip value NMTOKEN REQUIRED scan true false false lt ELEMENT monitoring monitor gt 89 ED gt Tsung Documentation Release 1 6 0
89. ng requests 6 6 Sessions 33 Tsung Documentation Release 1 6 0 SASL Plain SASL Plain authentication example lt session probability 100 name sasl type ts_jabber gt lt request gt lt jabber type connect ack local gt lt jabber gt lt request gt lt thinktime value 10 gt lt thinktime gt lt transaction name authenticate gt lt request gt lt jabber type auth_sasl ack local gt lt jabber gt lt request gt lt request gt lt jabber type connect ack local gt lt jabber gt lt request gt lt request gt lt jabber type auth_sasl_bind ack local gt lt jabber gt lt request gt lt request gt lt jabber type auth_sasl_session ack local gt lt jabber gt lt request gt lt transaction gt SASL Anonymous SASL Anonymous authentication example lt session probability 100 name sasl type ts_jabber gt lt request gt lt jabber type connect ack local gt lt jabber gt lt request gt lt thinktime value 10 gt lt thinktime gt lt transaction name authenticate gt lt request gt lt jabber type auth_sasl_anonymous ack local gt lt jabber gt lt request gt lt request gt lt jabber type connect ack local gt lt jabber gt lt request gt lt request gt lt jabber type auth_sasl_bind ack local gt lt jabber gt lt request gt lt request gt lt jabber type auth_sasl_session ack local gt lt jabber gt lt request
90. nt host louxor weight 1 maxusers 800 gt lt ip value 10 9 195 12 gt lt ip gt lt ip value 10 9 195 13 gt lt ip gt lt client gt lt client host memphis weight 3 maxusers 600 cpu 2 gt lt clients gt lt servers gt lt server host 10 9 195 1 port 8080 type tcp gt lt server gt lt servers gt Several virtual IP can be used to simulate more machines This is very useful when a load balancer use the client s IP to distribute the traffic among a cluster of servers New in 1 1 1 IP is no longer mandatory If not specified the default IP will be used New in 1 4 0 You can use lt ip scan true value eth0 gt to scan for all the IP aliases on a given interface et h0 in this example In this example a second machine is used in the Tsung cluster with a higher weight and 2 cpus Two Erlang virtual machines will be used to take advantage of the number of CPU Note Even if an Erlang VM is now able to handle several CPUs erlang SMP benchmarks shows that it s more efficient to use one VM per CPU with SMP disabled for tsung clients Only the controller node is using SMP erlang Therefore cpu should be equal to the number of cores of your nodes If you prefer to use erlang SMP add the s option when starting tsung and don t set cpu in the config file By default the load is distributed uniformly on all CPU one CPU per client by default The weight parameter integer can be used to ta
91. oc man inet html for the list of all errors 11 10 error_no_online XMPP No online user available usually for a chat message destinated to a online user 11 11 error_no_offline XMPP No offline user available usually for a chat message destinated to a offline user 11 12 error no free userid For XMPP all users Id are already used userid max is too low 11 13 error next session A clients fails to gets its session parameter from the config server the controller may be overloaded 11 14 error mysql zERRNO5 Error reported by the mysql server see http dev mysql com doc refman 5 0 en error messages server html 11 15 error mysql badpacket Bad packet received for mysql server while parsing data 11 16 error_pgsql Error reported by the postgresql server 78 Chapter 11 Errors list CHAPTER TWELVE CHANGELOG 1 5 1 gt 1 6 0 Major enhancements and bugfixes 20 Jul 2015 Bugfi ACA FF F F F F F F F CACA A F F F F x TSUN 225 TSUN 292 SSL Session Caching Issues TSUN 294 TSUN 295 TSUN 296 Indecipherabl rror with no arrivalphase elements Logging of unmatched dyn vars puts lot of pressure on controller tsung status crashes test run TSUN 297 TSUN 305 TSUN 308 Reported response size in dumpfile seems to be way too low Float values in thinktimes substitution Can t connect with TLS to ejabberd XMPP TSUN 309 Handle ssl_closed in ts_client TSUN
92. oken https recording x to johann messner jku at for bug reporting fix forgot to add when an URL is absolute and had a query part fix regression in the recorder introduced in 1 0 2 must use CAPS for method wrong content length in recorder causing POST requests to silently fail allow multiple dyn variable in DID fix Host header when port is 80 gt 1 0 2 Minor bugfixes 6 Jun 2005 fix the recorder is working now with R10B replace call to httpd_parse request_header in recorder by an internal func the func was removed in R10B update configure scripts should build on RHEL3 x86_64 remote beam startup is now tunable r ssh rsh internal changes in ts_os_mon suggested by R Lenglet 1 0 1 Major bugfixes 18 Nov 2004 85 Tsung Documentation Release 1 6 0 0 0 0 fix broken free mem on non linux arch Matthew Schulkind add script to convert apache log file combined to idx tsunami XML improved configure add with erlang option and xmerl PATH detection idx tsunami now compiles both with R9C and R10B small fixes to the DTD Thx to Jonathan Bresler for testing and bug reporting fix broken global local and no ack requests and size computation fix broken ids in Jabber messages fix broken online offline in user_server default thinktime can now be overriden many improvements fixes in analyse_msg pl beta7 gt 1 0 Minor bugfixes 13 Aug 200
93. on 1 1 contents empty gt lt oauth consumer_key key consumer_secret secret method HMAC SHA1 gt lt http gt lt request gt lt Getting an Access Token gt lt request subst true gt lt dyn_variable name access_token re oauth_token amp amp 1x gt lt dyn_variable name access_token_secret re oauth_token_secret amp amp gt lt http url oauth example access_token php method POST version 1 1 contents empty gt lt oauth consumer_key key consumer_secret secret method HMAC SHA1 access_token _acce lt http gt lt request gt lt Making Authenticated Calls gt lt request subst true gt lt http url oauth example echo_api php method GET version 1 1 gt lt oauth consumer_key key consumer_secret secret access_token _access_token access tu lt http gt lt request gt 6 6 3 Jabber XMPP Here is an example of a session definition for the Jabber XMPP protocol lt sessions gt lt session probability 70 name jabber example type ts_jabber gt lt request gt lt jabber type connect ack local gt lt request gt lt thinktime value 2 gt lt thinktime gt lt transaction name authenticate gt lt request gt lt jabber type auth_get ack local gt lt jabber gt lt request gt 6 6 Sessions 31 Tsung Documentation Release 1 6 0 lt request gt lt jabber type auth_set_plain ack loca
94. one extract the 3rd column of the fourth row then the mt ime field from the second row and then it extract some data ofthe row_description lt request gt lt dyn_variable name myvar pgsql_expr data_row 4 3 gt lt dyn variable name mtime pgsql_expr data_row 2 mtime gt lt dyn_ variable name row pgsql_expr row_description 1 3 1 gt lt pgsql type sql gt SELECT from pgbench_history LIMIT 20 lt pgsql gt lt request gt A row description looks like this INFO REPORT 14 Apr 2010 11 03 22 ts_pgsql 7 lt 0 102 0 gt PGSQL Pair row_description tid text 1 23 4 1 16395 bid text 2 23 4 1 16395 aid text 3 23 4 1 16395 delta text 4 23 4 1 16395 mtime text 5 1114 8 1 16395 filler text 6 1042 1 26 16395 So in the example the row variable equals aid Decoding variables It s possible to decode variable that contains html entities encoded this is done with decode attribute set to html_entities lt request gt lt dyn_variable name mytitlevar re slt titlesgt amp lt title amp gt decode html_entities gt lt http url testtsung html method GET version 1 0 gt lt http gt lt request gt set_dynvars Since version 1 3 0 more powerful dynamic variables are implemented You can set dynamic variables not only while parsing server data but you can build them using external files or generate them with a
95. or username password see Reading usernames and pass word from a CSV file You can also set the muc_service here see previous example 6 5 12 HTTP options For HTTP you can set the UserAgent values available since Tsung 1 1 0 using a probability for each value the sum of all probabilities must be equal to 100 lt option type ts_http name user_agent gt lt user_agent probability 80 gt Mozilla 5 0 X11 U Linux i686 en US rv 1 7 8 Gecko 20050513 Galeon 1 3 21 lt user_agent gt lt user_agent probability 20 gt Mozilla 5 0 Windows U Windows NT 5 2 fr FR rv 1 7 8 Gecko 20050511 Firefox 1 0 4 lt user_agent gt lt option gt 6 5 13 AMQP options You can set the AMQP heartbeat timeout for example to set it to 30s default is 600s add lt option type ts_amqp name heartbeat value 30 gt 6 6 Sessions Sessions define the content of the scenario itself They describe the requests to execute Each session has a given probability This is used to decide which session a new user will execute The sum of all session s probabilities must be 100 Since Tsung 1 5 0 you can use weights instead of probabilities In the following example there will be twice as many sessions of type sl than s2 lt session name s1 weight 2 type ts_http gt lt session name s2 weight 1 type ts_http gt A transaction is just a way to have customized statistics Say if you want to know the response
96. ortnumber to change the port 5 2 HTTP and WEBDAV For HTTPS recording use http instead of https in your browser New in 1 2 2 For HTTP you can configure the recorder to use a parent proxy but this will not work for https Add the u option to enable parent proxy and use I serverIP to set the IP and P portnumber to set the port of the parent 17 Tsung Documentation Release 1 6 0 18 Chapter 5 Using the proxy recorder CHAPTER SIX UNDERSTANDING TSUNG XML CONFIGURATION FILE 6 1 File structure The default encoding is utf 8 You can use a different encoding like in lt xml version 1 0 encoding ISO 8859 1 gt Scenarios are enclosed into tsung tags lt xml version 1 0 gt lt DOCTYPE tsung SYSTEM usr share tsung tsung 1 0 dtd gt lt tsung loglevel info gt lt tsung gt If you add the attribute dumptraffic true all the traffic will be logged to a file Warning this will considerably slow down Tsung so use with care It is useful for debugging purpose You can use the attribute dumptraffic light to dump only the first 44 bytes Since version 1 4 0 you have also a specific logging per protocol using dumptraffic protocol It s currently only implemented for HTTP this will log all requests in a CSV file with the following data date pid id http method host URL HTTP status size duration transaction match error tag Where field descr
97. p a bee id dd DL NG 13 42 EDAP un 2 3 Sd a ee Be de le eh oe ee Ee ee do E e Ae eed Bi oe 13 43 PostereSQl lt rer sraa LANA Gn eA ERA REEMA ewe Ch EE Ea SE eS E 14 dd M3SOB 2h a Gs Soke AP a ace Se eee ks GAS Rae REESE OARS ae 14 4 5 Jabber XMPP o ai se 0a ad loa cei bea ee wt bbe Ree bee KA 14 5 Using the proxy recorder 17 Sal Postgres Ola un g are Sw Hie Bee OG Bale hee A HS 17 2 HTTP and WEBDAV mmk nt ii le ap o da 17 6 Understanding tsung xml configuration file 19 6 1 Pilesttuctlfe lt sea reae la EEE ee wa Sew a II 19 6 2 Clients and server os aos aan ee a a ae 20 8 9 10 11 12 13 14 AA cian ra he a aa a Bea 64 Definmg the load progression amp a 64 5 00H a a e ee 6 9 Setting Options s s 142005 a SO A Dp SH Ge Bp py aa 6 6 SESSIONS u sun a A RAN Or Advanced Features 4 ANA BA te eee Ged 6 de eS eee oe eons weds ooh Statistics and Reports TA Hileform t o os ok kaa ete eee eh bed ee Rhee Be ib 71 2 Avallable stats 3 40 4 2 42 Meee ha eee A eee eee we eee eee bee nl 1 3 DEIN in ens BE RE Daeg Be LAG SEE Se RS ae SEES Be ee EES Ss TA Generating the report ie u sa Bb bea A Mae ee ee eae LI lt Tsung SUMMArY i a u 2 2 4 2 20 a eA A ee oe a Se ee ay NG 1 0 Graphical Overview e y auch oe KANG coe Mare AK Non Some ae Se a eee ee NA Jab sune Plotter eri ves te Ei write A aids Si Mie Ente ee anticline e Bice ue a 1 8 RRD en edo ee eR ROE A bee wre A A E References Ac
98. print the current log directory created for the test and wait until the test is over By default an embedded web server will be started on the controller node and will listen on the 8091 port this can be disabled with the n option 3 5 Feedback Use the Tsung mailing list if you have suggestions or questions about Tsung You can also use the bug tracker available at https github com processone tsung issues 10 Chapter 3 Installation Tsung Documentation Release 1 6 0 You can also try the tsung IRC channel on Freenode 3 5 Feedback 11 Tsung Documentation Release 1 6 0 12 Chapter 3 Installation 4 1 CHAPTER FOUR BENCHMARK APPROACH HTTP WebDAV 4 1 1 Benchmarking a Web server 1 Record one or more sessions start the recorder with tsung recorder start and then configure your browser to use Tsung proxy recorder the listen port is 8090 A session file will be created For HTTPS recording use http instead of https in your browser Edit organize scenario by adding recorded sessions in the configuration file Write small code for dynamic parts if needed and place dynamic mark up in the scenario Test and adjust scenario to have a nice progression of the load This is highly dependent of the application and of the size of the target server s Calculate the normal duration of the scenario and use the interarrival time between users and the duration of the phase to estimate the num
99. releas AMOP add multiple channel add waitForConfirms and waitForMessages Add bosh_path config option Add text frame support for Websocket and update doc Add option to change popularities of sessions for each phase ew comparison operators Logging of request tags to dumpfile Add MOTT support Tsung to support pkcs 12 certificates or at least cacerts clientcerts and keys Adding all_except_body option to ts_http request subst Adding mysqladmin monitoring options to erlang monitors Adding mean rate calculation to tsung_stats reports Adding title option to set header of report Support SSL TLS client certificate file attributes for jabber starttls 1 4 2 gt 1 5 0 Major enhancements and bugfixes 24 May 2013 Bugfix TS ACA CACA ACA F F F F X F F 2 3 un in the jabber plugin substitutions for raw request doesn t work in some cases If tag doesn t work with Tsung 1 4 2 Incorrect ERTS version being set on build normal ack timeout shouldn t used for global ack If statement breaks on empty string Race condition in tsung recorder Site fails to load via proxy recorder Large configuration files trigger error compatibility with erlang R15B Can t connect with TLS ejabberd Tsung for bosh protocol doesn t send a empty request to keep the user session ali Error encoding json string with escape_uri Content Length parsing broken Invalid link Other in the graph h
100. request gt lt request gt lt pgsql type sync gt lt request gt lt request gt lt pgsql type parse name_prepared P0_8 gt lt CDATA UPDATE pgbench accounts SET abalance abalance 1 WHERE aid 2 gt lt pgsql gt lt request gt lt request gt lt pgsql type sync gt lt request gt lt request gt lt pgsql type parse name_prepared P0_9 gt lt CDATA SELECT abalance FROM pgbench_accounts WHERE aid 1 gt lt pgsql gt lt request gt lt request gt lt pgsql type sync gt lt request gt lt request gt lt pgsql type parse name_prepared P0_10 gt lt CDATA UPDATE pgbench tellers SET tbalance tbalance 1 WHERE tid 2 gt lt pgsql gt lt request gt lt request gt lt pgsql type sync gt lt request gt lt request gt lt pgsql type parse name_prepared P0_11 gt lt CDATA UPDATE pgbench_branches SET bbalance bbalance 1 WHERE bid 2 gt lt pgsql gt lt request gt lt request gt lt pgsql type sync gt lt request gt lt request gt lt pgsql type parse name prepared P0_12 gt lt CDATA INSERT INTO pgbench_history tid bid aid delta mtime VALUES 1 2 3 4 CURRENT_TIMESTAMP gt lt pgsql gt lt request gt lt request gt lt pgsql type sync gt lt request gt lt request gt lt pgsql type parse name _prepared P0_13 gt lt CDATA END gt lt pgsql gt lt request gt lt request gt lt pgsql t
101. s tr_login 187 100 848 579 742 5470 223 2 231 56 970 91567888 58 stats size_rcv 2715777 3568647 stats 200 1869 2450 stats size_sent 264167 347870 stats dump at 1218093530 stats users 356 356 stats users_count 109 356 stats connected 32 215 stats page 110 3 346 0 408 5465 940 2 177 77 234 724492 245 stats request 1100 0 305 0 284 5 207 0 115 0 385 26785716 2450 stats connect 110 0 320 0 065 4 472 0 174 0 540 39158164 245 stats tr_login 110 3 419 0 414 5470 223 2 231 90 461 548628831 245 stats size_rcv 1602039 5170686 stats 200 1100 3550 stats size_sent 150660 498530 the format is for request page session and transactions tr_XXX stats name 10sec_count 10sec_mean 10sec_stddev max min mean count or for HTTP returns codes size_sent and size_rcv stats name count during the last 10sec totalcount since the beginning 10 7 How can compute percentile quartiles median for transactions or requests response time It s not directly possible But since version 1 3 0 you can use a new experimental statistic backend set backend fullstats in the lt tsung gt section of your configuration file also see File structure This will print every statistics data in a raw format in a file named tsung fullstats log Warning this may impact the performance of the controller node a lot of data has to be written to disk The data looks like sum connected 1 sum connected 1 sample reque
102. se keepalive CDATA 10 will_topic CDATA will_gos CDATA 0 will_msg CDATA will_retain CDATA false topic CDATA gos CDATA 0 retained CDATA false timeout CDATA 1 username CDATA password CDATA gt lt ELEMENT modification attrx gt lt ATTLIST modification type CDATA REQUIRED gt lt ELEMENT attr value gt lt ATTLIST attr type CDATA REQUIRED gt lt ELEMENT value PCDATA gt lt ELEMENT setdynvars varx gt lt ATTLIST setdynvars sourcetype random_string urandom_string random_number file erlang eval jsonpath value server REQUIRED callback CDATA IMPLIED code CDATA IMPLIED fileid CDATA IMPLIED order iter random IMPLIED delimiter CDATA IMP ED length CDATA IMPLIED start CDATA IMPLIED end CDATA IMPLIED from CDATA IMPLIED jsonpath CDATA IMPLIED value CDATA IMPLIED gt lt ELEMENT var PCDATA gt lt ATTLIST var name CDATA REQUIRED gt lt ELEMENT for request thinktime transaction setdynvars for if repeat change_type foreach interaction gt lt ATTLIST for var CDATA REQUIRED from CDATA REQUIRED Lo CDATA REQUIRED incr NMTOKEN MS lt ELEMENT foreach request thinktim
103. se time for requests page etc is computed every 10 sec and reset That s why you have the highest mean and lowest mean values in the Stats report Since version 1 3 0 the mean for the whole test is also computed 7 2 1 HTTP specific stats e counter for each response status 200 404 etc 7 2 2 Jabber specific stats request_noack Counter of no_ack requests Since response time is meaningless with no_ack requests we keep a separate stats for this new in 1 2 2 async_unknown_data_rcv Only if bidi is true for a session counter the number of messages received from the server without doing anything new in 1 2 2 async_data_sent Only if bidi is true for a session Count the number of messages sent to the server in response of a message received from the server new in 1 2 2 7 2 3 OS monitoring stats e load lt host gt System load average during the last minute e cpu host CPU percentage Maximum is 100 ex on dual core system 100 means both cores are 100 used e freemem lt host gt Free Memory 60 Chapter 7 Statistics and Reports Tsung Documentation Release 1 6 0 7 3 Design A bit of explanation on the design and internals of the statistics engine Tsung was designed to handle thousands of requests sec for very long period of times several hours so it do not write all data to the disk for performance reasons Instead it computes on the fly an estimation of the mean and standar
104. sers synchronization can be set on specific actions BOSH amp XMPP over Websocket raw XML messages PubSub Multiple vhost instances supported privacy lists get all privacy list names set list as active PostgreSQL related features Basic and MD5 Authentication Simple Protocol Extended Protocol new in version 1 4 0 Proxy mode to record sessions Chapter 2 Features Tsung Documentation Release 1 6 0 2 6 MySQL related features This plugin is experimental It works only with MySQL version 4 1 and higher e Secured Authentication method only MySQL gt 4 1 e Basic Queries 2 Websocket related features This plugin is experimental It only supports RFC 6455 currently For used as a server type it works like other transport protocol like tcp and udp any application specific protocol data can be send on it You can find examples used as session type in examples websocket xml e Both as a server type and session type 2 8 AMQP related features This plugin is experimental It only supports AMQP 0 9 1 currently You can find examples in examples amqp xml e Basic publish and consume e Publisher confirm and consumer ack QoS 2 9 MQTT related features This plugin is experimental It supports MQTT V3 1 You can find examples in examples mgtt xml e Connect to mqtt broker with options e Publish matt messages to the broker e Subscribe unsubscribe topics e Support QoS 0 and QoS 1 2 10 LDAP related
105. sing one or several oid element lt monitor host 127 0 0 1 type snmp gt lt snmp version v2 gt lt oid value 1 3 6 1 4 1 42 2 145 3 163 1L51 2 11 0 name heapused type sample eval fun X gt X 100 end gt lt snmp gt lt monitor gt type can be sample counter or sum and optionally you can define a function with erlang syntax to be applied to the value eval attribute 6 3 3 Munin New in version 1 3 1 Tsung is able to retrieve data from a munin node agent see http munin monitoring org wiki munin node The type keyword must be set to munin for example lt monitoring gt lt monitor host geronimo type munin gt lt monitor host f14 2 type erlang gt lt monitor gt lt monitoring gt 6 4 Defining the load progression 6 4 1 Randomly generated users The load progression is set up by defining several arrival phases lt load gt lt arrivalphase phase 1 duration 10 unit minute gt lt users interarrival 2 unit second gt lt users gt lt arrivalphase gt lt arrivalphase phase 2 duration 10 unit minute gt lt users interarrival 1 unit second gt lt users gt lt arrivalphase gt lt arrivalphase phase 3 duration 10 unit minute gt lt users interarrival 0 1 unit second gt lt users gt lt arrivalphase gt lt load gt 6 4 Defining the load progression 23 Tsung Documentation Release 1 6 0 With this setup during the first 10
106. source and binary distribution of Tsung It is released under the GPL License mochiweb libs for XPath parsing optionally used for dynamic variables in the HTTP plugin sources available at https github com mochi mochiweb The module is included in the source and binary distribution of Tsung It is released under the MIT License gnuplot and perl5 optional for graphical output with tsung_stats pl script The Template Toolkit is used for HTML reports see http template toolkit org python and matplotlib optional for graphical output with tsung plotter for distributed tests you need SSH access to remote machines without password use aRSA DSA key without passphrase or ssh agent Alternatively rsh is also supported bash Compilation To compile Tsung just download the latest version from http tsung erlang projects org dist and run configure make make install Tsung Documentation Release 1 6 0 If you want to download the latest development version use git git clone https github com processone tsung git see also https github com processone tsung You can also build packages with make deb on Debian and Ubuntu and make rpm on Fedora RHEL and other rpm based distribution 3 3 Configuration The default configuration file is tsung tsung xml there are several sample files in usr share doc tsung examples Log files are saved in tsung log A new subdirectory is created for each tes
107. ss_token CDATA IMPLIED access token secret CDATA IMPLIED method HMAC SHA1 PLAINTEXT RSA SHA1 HMAC SHA1 gt Da lt ELEMENT jabber xmpp_authenticate gt lt ATTLIST jabber ack global local no_ack parse bidi_ack REQUIRED destination online offline random unique previous random id NMTOKEN IMPLIED size NMTOKEN O data CDATA IMPLIED type NMTOKEN REQUIRED stamped true false false show away chat dnd xa chat status CDATA Available nick CDATA IMPLIED room CDATA IMPLIED group CDATA IMPLIED node CDATA IMPLIED send_version true false false regexp CDATA IMPLIED resource CDATA tsung node_type CDATA IMPLIED 93 Tsung Documentation Release 1 6 0 version CDATA IMPLIED cacertfile CDATA IMPLIED keyfile CDATA IMPLIED keypass CDATA IMPLIED certfile CDATA IMPLIED subid CDATA IMPLIED gt lt ELEMENT xmpp_authenticate EMPTY gt lt ATTLIST xmpp_authenticate passwd CDATA REQUIRED username CDATA REQUIRED gt lt ELEMENT fs EMPTY gt lt ATTLIST fs cmd read write open delete stat copy read_chunk write_chunk close make_dir del_dir make_symli path CDATA IMPLIED size CDATA 1024 position CDATA IMPLIED mode read write
108. st 214 635 sum size_rcv 268 sample page 831 189 count 200 sum size_sent 182 sample connect 184 787 sample request 220 974 sum size_rcv 785 count 200 sum size_sent 164 sample connect 185 482 sum connected 1 74 Chapter 10 Frequently Asked Questions Tsung Documentation Release 1 6 0 count 200 sum size_sent 161 sample connect 180 812 sum size_rcv 524288 sum size rcv 524288 Since version 1 5 0 a script tsung_percentile pl is provided to compute the percentiles from this file 10 8 How can I specify the number of concurrent users You can t But it s on purpose the load generated by Tsung is dependent on the arrival time between new clients Indeed once a client has finished his session in Tsung it stops So the number of concurrent users is a function of the arrival rate and the mean session duration For example if your web site has 1 000 visits hour the arrival rate is 1000 3600 0 2778 visits second If you want to simulate the same load set the inter arrival time is to 1 0 27778 3 6 sec e g lt users interarrival 3 6 unit second gt in the arrivalphase node in the XML config file 10 9 SNMP monitoring doesn t work It use SNMP v1 and the public community It has been tested with http net snmp sourceforge net You can try with snmpwalk to see if your snmpd config is ok gt snmpwalk v 1 c public IP OF YOUR SERVER 1 3 6
109. t request gt lt thinktime value 5 gt lt thinktime gt sdirected lt request gt lt jabber type presenc lt request gt lt thinktime value 5 gt lt thinktime gt directed lt request gt lt jabber type presence directed lt request gt lt thinktime value 5 gt lt thinktime gt lt request gt lt jabber type presence directed ack no_ack gt lt request gt lt thinktime value 5 gt lt thinktime gt lt request gt lt jabber type presence directed show away status Be right back ack no_ack gt status Available to chat ack no_ack gt show chat show dnd status Don t bother me ack no_ack gt show xa status I may never come back ack no_ack gt lt request gt lt thinktime value 5 gt lt thinktime gt 6 6 Sessions 35 Tsung Documentation Release 1 6 0 MUC Tsung supports three MUC operations e Join a room attribute type muc join Send a message to a room attribute t ype muc chat e Change nickname attribute type muc nick e Exit a room attribute t ype muc exit Here s an example lt First choose an random room and random nickname gt lt setdynvars sourcetype random_number start 1 end 100 gt lt var name room gt lt setdynvars gt lt setdynvars sourcetype random_string length 10 gt lt var name nick1 gt lt setdynvars gt lt reques
110. t amgp type channel close channel _loops gt lt amgqp gt lt request gt lt for gt lt request gt lt amgp type connection close gt lt amqp gt lt request gt lt session gt 6 6 8 MQTT It supports publish messages subscribe and unsubscribe topics Available request types e connect with options like clean_start will topic etc e disconnect e publish with topic name qos level and retain flag e subscribe with topic name and qos level e unsubscribe with topic name e waitForMessages with timeout for messages published from server to the client Example with MQTT as a session type lt session name mqtt example probability 100 type ts_mqtt gt lt request gt lt mgtt type connect clean_start true keepalive 10 will_topic will_topic will_gos 0 1 lt request gt lt for from 1 to 10 incr 1 var loops gt lt request subst true gt lt mgtt type publish topic test_topic qos 1 retained true gt test_message lt mgtt gt lt request gt 42 Chapter 6 Understanding tsung xml configuration file Tsung Documentation Release 1 6 0 lt or gt lt request subst true gt lt mqtt type subscribe topic test_topic qos 1 gt lt mqtt gt lt request gt lt request gt lt wait for 60s gt lt mqtt type waitForMessages timeout 60 gt lt mqtt gt lt request gt lt request subst true gt lt mqtt type unsubscribe topic
111. t foreach name element in list gt lt request subst true gt lt http url _element method GET version 1 1 gt lt request gt lt foreach gt It is possible to limit the list of elements you re looping through thanks to the use of the include or exclude attributes inside the foreach statement As an example if you want to include only elements with a local path you can write lt foreach name element in list include x gt If you want to exclude all the elements from a specific URI you would write lt foreach name element in list exclude http tld com S gt You can combine this with a XPath query For instance the following scenario will retrieve all the images specified on a web page lt request subst true gt lt dyn variable name img_list xpath img src gt lt http url mypage html method GET version 1 1 gt lt request gt lt foreach name img in img_list gt lt request subst true gt lt http url 3 _img method GET version 1 1 gt lt request gt lt foreach gt 6 7 6 Rate limiting Since version 1 4 0 rate limiting can be enabled either globally see Setting options or for each session separately For example to limit the rate to 64KB sec for a given session lt session name http example probability 70 type ts_http gt lt set_option name rate_limit value 64 gt lt session gt Only the incoming traff
112. t gt Now random_num will be set to 42 during the users session Its value will be replace in all mark up of the form _random_num 5 if and only if the request tag has the attribute subst true like lt request subst true gt lt http url go cgi version 1 0 contents username nic amp amp random_num _random_num amp amp op login content_type application x www form urlencoded method POST gt lt http gt lt request gt Regexp If the dynamic value is not a form variable you can set a regexp by hand for example to get the title of a HTML page the regexp engine uses the re module a Perl like regular expressions module for Erlang lt request gt lt dyn_variable name mytitlevar re amp lt titlesgt amp lt title amp gt gt lt http url testtsung html method GET version 1 0 gt lt http gt lt request gt Previously before 1 4 0 Tsung uses the old regexp module from Erlang This is now deprecated The syntax was lt request gt lt dyn_variable name mytitlevar regexp Glt title amp gt amp lt titlesgt gt lt http url testtsung html method GET version 1 0 gt lt http gt lt request gt XPath A new way to analyze the server response has been introduced in the release 1 3 0 It is available only for the HTTP and XMPP plugin since it is based on XML HTML parsing This feature uses the mochiweb library and only works 50 Chapter 6 Understanding tsun
113. t subst true gt lt jabber type muc join ack local room room _room nick _nick1 gt lt request gt lt use a for loop to send several messages to the room gt lt for from 1 to 6 var i gt lt thinktime value 30 gt lt request subst true gt lt jabber type muc chat ack no_ack size 16 room room _room gt lt request gt lt for gt lt change nickname gt lt thinktime value 2 gt lt setdynvars sourcetype random_string length 10 gt lt var name nick2 gt lt setdynvars gt lt request subst true gt lt jabber type muc nick room room _room nick _nick2 ack no_ack gt lt request gt MUC support is available since version 1 3 1 PubSub Experimental support for PubSub is available in version 1 3 1 You can read the following entry https support process one net browse TSUN 115 VHost VHost support is available since version 1 3 2 Tsung is able to bench multiple vhost instances by choosing a vhost XMPP name from a list at connection time in the scenario 36 Chapter 6 Understanding tsung xml configuration file Tsung Documentation Release 1 6 0 The vhost list is read from a file lt options gt Asaan name file server value domains csv id vhostfileld gt lt option gt lt option type ts_jabber name vhost_file value vhostfileld gt lt option gt elephas When each client starts a session 1t chooses ran
114. t using the current date and time as name e g tsung log 20040217 0940 3 4 Running Two commands are installed in the directory SPREFIX bin tsung and tsung recorder A man page is available for both commands tsung h Usage tsung lt options gt start stop debug status Options f lt file gt set configuration file default is tsung tsung xml use for standard input lt logdir gt set log directory where YYYYMMDD HHMM dirs are created default is tsung log i lt id gt set controller id default is empty r lt command gt set remote connector default is ssh s enable erlang smp on client nodes p lt max gt set maximum erlang processes per vm default is 250000 X lt dir gt add additional erlang load paths multiple X arguments allowed m lt file gt write monitoring output on this file default is tsung log use for standard output F use long names FODN for erlang nodes L lt lifetime gt SSL session lifetime 600sec by default w lt delay gt warmup delay default is 1 sec n disable web GUI started by default on port 8091 k keep web GUI and controller alive after the test has finished y print version information and exit 6 use IPv6 for Tsung internal communications x lt tags gt list of requests tag to be excluded from the run separated by comma h display this help and exit A typical way of using tsung is to run tsung f myconfigfile xml start The command will
115. t when connection closed is ask by the server this should enable https recording with IE bber fix presence roster request add presence directed presence broadcast 4 presence final requests for jabber jasonwtucker gmail com Ht 1 042 Th ile sO nee roster enhancements jasonwtucker gmail com sip digest authentication jasonwtucker gmail com fix online must use presence initial to switch to online status add pubsub support mickael remond process one net Ep fix single user agent cas minor fixes for HTTP parsing gt 1 1 0 Major featur nhancements 5 Sep 2005 new feature HTTP proxy load testing in now possible set http_use_server_as_proxy to true add dynamic substitution support for jabber add raw type of msg for Jabber use the new data attribute add the dynamic variable list to dynamic substitutions UserAgent is now customizable for HTTP testing Add an option to run all components controller and launcher within a single erlang beam use_controller_vm Should ease idx tsunami use for light load tests fix bash script for solaris jasonwtucker gmail com fix several idx tsunami status can be run simultaneously reported by Adam Spotton internal Host header is now set during configuration phase fix last phase duration fix recorder must log absolute url if only the scheme has changed gt 1 0 3 Minor bugfixes 8 Jul 2005 add ts_file_server module fix br
116. te_limit New in version 1 4 0 26 Chapter 6 Understanding tsung xml configuration file Tsung Documentation Release 1 6 0 rate_limit This will limit the bandwidth of each client using a token bucket algorithm The value is in KBytes per second You can also specify a maximum burst value eg max 2048 By default the burst size is the same as the rate 1024KB in the following example Currently only incoming traffic is rate limited lt option name rate_limit value 1024 gt lt option gt 6 5 7 Ports_range If you need to open more than 30000 simultaneous connections on a client machine you will be limited by the number of TCP client ports even if you use several IPs this is true at least on Linux To bypass this limit Tsung must not delegate the selection of client ports and together with using several IP for each client you have to defined a range for available clients ports for ex lt option name ports_range min 1025 max 65535 gt 6 5 8 Setting the seed for random numbers If you want to use a fixed seed for the random generator you can use the seed option like this by default tsung will use the current time to set the seed therefore random numbers should be different for every test lt option name seed value 42 gt 6 5 9 Path for BOSH You can use the following config option for setting the path to BOSH request lt option name bosh_path value http bind gt 6 5 10 Websoc
117. test_topic gt lt mqtt gt lt request gt lt request gt lt mqtt type disconnect gt lt mqtt gt lt request gt lt session gt 6 6 9 LDAP Authentication The recommended mechanism used to authenticate users against a LDAP repository requires two steps to follow Given an username and password we e Search the user in the repository tree using the username so users can reside in different subtrees of the orga nization e Try to bind as the user with the distinguished name found in the first step and the user s password If the bind is successful the user is authenticated this is the scheme used among others by the LDAP authentication module for Apache http httpd apache org docs 2 0 mod mod auth ldap html LDAP Setup For this example we are going to use a simple repository with the following hierarchy The repository has users in two organizational units 1 users with four members 2 users2 with tree members For simplicity we set the password of each user to be the same as its common name cn Tsung Setup We will use a CSV file as input containing the user password pairs for our test So we start by writing it in this case we name the file users csv userl userl user2 user2 user3 user3 user4 user4 jane jane mary mary paul pablo paul paul 6 6 Sessions 43 Tsung Documentation Release 1 6 0 Idap_simple xml process one k Browser Choose plugin Ww Xx Entries Dis
118. th size attribute data will cause stamped to be ignored There is a minimal length of the stamp roughly 30 bytes When size is greater than stamp length random padding will be added to the stamp If the stamp length is higher than size then only stamp will be used as messagecontent effectively exceeding specified length StartTLS To secure a stream with STARTTLS use lt jabber type starttls ack bidi_ack gt Client certificate is implemented since 1 5 1 for example you can use dynamic variables like this lt jabber type starttls ack bidi_ack cacertfile _cacert certfile _certfile 3 keyfile _keyfile2 gt 32 Chapter 6 Understanding tsung xml configuration file Tsung Documentation Release 1 6 0 Roster What you can do with rosters using Tsung You can 1 Add a new contact to their roster The new contact is added to the Tsung Group group and their name matches their JID 2 Senda subscribe presence notification to the new contact s JID This results in a pending subscription 3 Rename a roster contact This changes the previously added contact s name from the default JID to Tsung Testuser 4 Delete the previously added contact Note that when you add a new contact the contact JID is stored and used for the operations that follow It is rec ommended that for each session which is configured to perform these operations only do so once In other words you would NOT want
119. this case we use tsung function ts_dynvars lookup to retrieve the dynamic variable named md5data This dyn_variable md5data can be set in any of the ways described in the Dynamic variables section Dynamic variables e A dynamic variable can be generated by applying a JSONPath specification see JSONPath to an existing dynamic variable lt setdynvars sourcetype jsonpath from notification jsonpath result state 0K node gt lt var name deployed gt lt setdynvars gt e You can create dynamic variables to get the hostname and port of the current server lt setdynvars sourcetype server gt lt var name host gt lt var name port gt lt setdynvars gt You can define a dynamic variable as constant value to use it in a plugin since version 1 5 0 lt setdynvars sourcetype value value foobar gt lt var name constant gt lt setdynvars gt A setdynvars can be defined anywhere in a session 6 7 4 Checking the server s response With the tag match in a lt request gt tag you can check the server s response against a given string and do some actions depending on the result In any case if it matches this will increment the mat ch counter if it does not match the nomat ch counter will be incremented For example let s say you want to test a login page If the login is ok the server will respond with Welcome in the HTML body otherwise not To check that lt request gt lt match do contin
120. tinguis pablo desktop dc pablo desktop en admin ObjectClass UN USE organizatio Een person ives inetOrgPers CEE oo ou users Kk cn jane zu cn mary a cn paul userPasswor Figure 6 1 LDAP hierarchy 44 Chapter 6 Understanding tsung xml configuration file Tsung Documentation Release 1 6 0 The pair paul pablo should fail to authenticate we will note that in the Tsung report Then in our Tsung scenario we let Tsung know about this file lt options gt lt option name file_server id users value users csv gt lt options gt lt We use two dynamic variables to hold the username and password gt lt setdynvars sourcetype file fileid users delimiter order iter gt lt var name username gt lt var name password gt lt setdynvars gt To start the authentication process we instruct Tsung to perform a search to find the distinguished name of the user we are trying to authenticate lt ldap type search base dc pablo desktop filter cn _username result_var search_result scope wholeSubtree gt lt ldap gt As we need to access the search result we specify it using the result_var attribute This attribute tells Tsung in which dynamic variable we want to store the result ifthe result_var attribute isn t set Tsung doesn t store the search result in any place Finally we try to bind as that user lt request subst true gt lt l
121. tml UN 208 UN 209 UN 212 UN 215 UN 217 UN 218 UN 219 UN 220 UN 229 UN 230 UN 232 UN 234 UN 238 UN 241 UN 245 nts UN 174 UN 222 UN 228 UN 236 UN 242 UN 246 New Features ssage when dtd is not found not trivial add an option to set resource in XMPP Support unsubscribe operation for Jabber pubsub module allow substitutions on cookies Add probability support for servers add timestamp and request duration in dump protocol for http http PATCH support 80 Chapter 12 Changelog Tsung Documentation Release 1 6 0 TSUN 214 TSUN 227 Ability to pass attributes for node creation for XMPP pubsub protocol TSUN 231 TSUN 239 TSUN 240 add new dynamic variable to get server hostname and port add option to use weights instead of probabilities for sessions add BOSH support add websocket support TSUN 244 TSUN 248 HH A F HH Percentile computation add AMOP support 1 4 1 gt 1 4 2 Minor enhancements and bugfixes 4 Jan 2012 computation of NUsers is wrong build failure with erlang R15B IPv6 support snmp oids should be customizable in the config file handle dyn_variables as array in test conditions if until while allow outputting log to stdout structured log output JSON accept configuration from stdin Have bug and error message on stderr and not stdout Minor bugfixes 13 Sep 2011 munin plugin is not working in 1 4
122. ue when match gt Welcome lt match gt 6 7 Advanced Features 53 Tsung Documentation Release 1 6 0 lt http url login php version 1 0 method POST contents username nic amp amp user_password sesame content_type application x www form urlencoded gt lt request gt You can use a regexp instead of a simple string The list of available actions to do is e continue do nothing continue only update match or nomatch counters e log log the request id userid sessionid name in a file in match log e abort abort the session e restart restart the session The maximum number of restarts is 3 by default e loop repeat the request after 5 seconds The maximum number of loops is 20 by default e dump dump the content of the response in a file The filename is match lt userid gt lt sessionid gt lt requestid gt lt dumpid gt dump You can mixed several match tag in a single request lt request gt lt match do loop sleep_loop 5 max_loop 10 when match gt Retry lt match gt lt match do abort when match gt Error lt match gt lt http url index php method GET gt lt request gt You can also do the action on nomatch instead of match If you want to skip the HTTP headers and match only on the body you can use skip_headers http Also you can apply a function to the content before matching for example the following example use both features to compute the md5sum on th
123. ulti protocol support Tsung is for example one of the only tool to benchmark SOAP applications e Monitoring of the target server s to analyze the behaviour and find bottlenecks For example it has been used to analyze cluster symmetry is the load properly balanced and to determine the best combination of machines on the three cluster tiers Web engine EJB engine and database 8 Chapter 2 Features CHAPTER THREE INSTALLATION This package has been tested on Linux FreeBSD and Solaris A port is available on Mac OS X It should work on Erlang supported platforms Linux Solaris BSD Win32 and Mac OS X On Mac OS X you can install Tsung via Homebrew http brew sh brew install tsung 3 1 3 2 Dependencies Erlang OTP R14B and up download Erlang is now part of Fedora and Debian Ubuntu repositories pgsql module made by Christian Sunesson for the PostgreSQL plugin sources available at http jungerl sourceforge net The module is included in the source and binary distribution of Tsung It is released under the EPL License mysql module made by Magnus Ahltorp amp Fredrik Thulin for the mysql plugin sources available at http www stacken kth se projekt yxa The modified module is included in the source and binary distribution of Tsung It is released under the three clause BSD License eldap module for the LDAP plugin sources available at http jungerl sourceforge net The module is in cluded in the
124. umber value XXX gt and by setting maxnumber N in lt arrivalphase gt Since version 1 6 0 you can wait for a bidi ack If your protocol is bidirectionnal e g xmpp websocket you can wait until the server sends some data and the code that handle this data exits the think state lt thinktime value wait_bidi gt lt thinktime gt 6 6 2 HTTP This example shows several features of the HTTP protocol support in Tsung GET and POST request basic authenti cation transaction for statistics definition conditional request IF MODIFIED SINCE lt sessions gt lt session name http example probability 70 type ts_http gt lt request gt lt http url method GET version 1 1 gt lt http gt lt request gt lt request gt lt http url images logo gif method GET version 1 1 if_modified_since Fri 14 Nov 2003 02 43 31 GMT gt lt http gt lt request gt lt thinktime value 20 random true gt lt thinktime gt lt transaction name index_request gt lt request gt lt http url index en html method GET version 1 1 gt lt http gt lt request gt lt request gt lt http url images header gif method GET version 1 1 gt 6 6 Sessions 29 Tsung Documentation Release 1 6 0 lt http gt lt request gt lt transaction gt lt thinktime value 60 random true gt lt thinktime gt lt request gt lt http url method PO
125. users per seconds the theoretical average throughput will be 1000 requests sec New in version 1 5 1 You can also override the probability settings of sessions within a specific phase using session_setup lt arrivalphase phase 3 duration 1 unit minute gt lt session_setup name http_test_1 probability 80 gt lt session_setup name fake probability 20 gt lt users interarrival 1 unit second gt lt arrivalphase gt 6 4 2 Statically generated users If you want to start a given session see Sessions at a given time during the test it is possible since version 1 3 1 lt load gt lt arrivalphase phase 1 duration 10 unit minute gt lt users interarrival 2 unit second gt lt users gt lt arrivalphase gt lt user session http example start_time 185 unit second gt lt user gt lt user session http example start_time 10 unit minute gt lt user gt lt user session foo start_time 11 unit minute gt lt user gt lt load gt lt sessions gt lt session name http example probability 0 type ts_http gt lt request gt lt http url method GET gt lt http gt lt request gt lt session gt lt session name foobar probability 0 type ts_http gt lt request gt lt http url bar method GET gt lt http gt lt request gt lt session gt lt session name foo probability 100 type ts_http gt 24 Chapter 6 Understanding tsun
126. write the parser faster and cleaner fix bad timeout computation when close occur for persistent client bugfixes and other enhancements fix memory leak with ssl half closed connections gt 0 2 1 Minor bugfixes and small enhancements 9 Dec 2003 optimize session memory consumption use an ets table to store session setup HTTP fix crash when content length is not set in headers HTTP fix POST method HTTP preliminary chunked encoding support in HTTP 1 1 HTTP Absolute URL are handled server and port can be overridden no more hosts erlang required add stats on simultaneous users gt 0 2 0 Major Feature Enhancements Aug 2003 87 Tsung Documentation Release 1 6 0 add realtime stats add new parse type of protocol add reconnection support persistent client add basic HTTP and HTTPS support split the application in two parts and the clients tsunami switch to RIC 0 1 0 gt 0 1 1 Bugfix realease Aug 2002 fix config file fix few typos in docs fix init script few optimizations in user_server erl switch to R8B 0 1 0 Initial release May 2001 a single controller tsunami_controller 88 Chapter 12 Changelog CHAPTER THIRTEEN TSUNG 1 0 DTD lt xml version 1 0 encoding utf 8 25 lt ELEMENT tsung information clients servers monitoring load options sessions gt lt ELEMENT i
127. ype sync gt lt request gt lt request gt lt pgsql type bind name prepared P0 7 formats none formats_results text gt lt request gt lt request gt lt pgsql type describe name_portal gt lt request gt lt request gt lt pgsql type execute gt lt request gt lt request gt lt pgsql type sync gt lt request gt lt request gt lt pgsql type bind name_portal name prepared P0 8 formats none formats results text parameters 2924 37801 gt lt request gt 6 6 5 MySQL For MySQL 4 types of requests are available same as PostgreSQL e connect to a given database with a given username e authenticate with password or not e sql 6 6 Sessions 39 Tsung Documentation Release 1 6 0 e close This example shows most of the features of aMySQL session lt session probability 100 name mysql example type ts_mysql gt lt request gt lt mysql type connect gt lt request gt lt request gt lt mysql type authenticate database test username test password test gt lt request gt lt request gt lt mysql type sql gt SHOW TABLES lt mysql gt lt request gt lt request gt lt mysql type sql gt SELECT FROM mytable lt mysql gt lt request gt lt request gt lt mysql type close gt lt request gt lt session gt 6 6 6 Websocket For We

Download Pdf Manuals

image

Related Search

Related Contents

Denon AH-C560R User's Manual  Allegro - BMI  Manual de Instruções - instrutemp.provisorio.ws  Toàn cầu  RANGE7 用測定スタンドセット RA    Jensen CM715K User's Manual  EX1R Setup, Use & Care Guide  Istruzioni d`uso VEGAMET 391  Comece aqui - Epson America, Inc.  

Copyright © All rights reserved.
Failed to retrieve file