Injecter command line : ----------------------- ./inject17 [ -r ] [ -l ] [ -t timeout ] [ -n maxconn ] [ -o maxobj ] [ -s start ] [ -i iter ] [ -d duration ] [ -w waittime ] -f scenario-file -u nbusers This will load the scenario file , and execute it for simultaneous clients. - -r states that think times should be randomized by +/-10% to get a more realistic load and avoid resonance effects - -l adds a few columns to the output, including the number of clients at a given instant - is the maximum idle time for a session (connect, read or write), and is expressed in milliseconds. If the timeout expires, the fetch is aborted, the number of timeouts is increases, and the client is discarded. Default=no timeout (not recommended). - is the maximum number of simultaneous connexions. New users are delayed until the current number of connexions drops below this number. Don't forget to increase ulimit if you play with this. Default=1000. - is the max number of simultaneous objects a client can fetch. This is to simulate how web browsers fetch their objects. Default is unlimited, but the recommended value is 4. - allows the load to start softly. This is the number of milliseconds between each increment of the client count, until the number of clients is reached. Eg: if you specify 25 here, with 200 clients, then full load will be reached within 5s (25ms * 200). - is the maximum number of complete iteration that each client will perform. This means that the total number of scenarii executed will be this number times the . Default is unlimited. - is the maximum number of seconds the injection will run. After this amount of seconds, no new client will be created, and the injecter will stop after the end of the last client. - is the number of seconds separating two statistics lines (as in vmstat). Default is 1 second. Now the output : ---------------- The first column (hits) is the total number of hits completed. The second one (^hits) is the number of hits completed since last line. The third column (hits/s) is the average number of hits/s since the start of the test. The fourth column (^h/s) is the hit rate (hit/s) since the last displayed line (i.e: the time to display counts). When it is 0, it means that nothing happens. The fifth column (bytes) is the total number of received bytes, including headers. The sixth column (kB/s) is the average bandwidth used since the start of the test. The seventh column (last) is the average bandwidth used since the last displayed line (time to display counts here too). The eigth column (errs) is the number of errors since the start of the test (4xx, 5xx, connection refused). The tenth column (tout) is the number of timeouts since the start of the test. It includes read, write, connect. A timeout can also occur because not enough simultaneous connections are allowed locally, since the timeout counts from when the object request is created, waiting for a connection slot to be started. The eleventh field (htime) is the average hit time in milliseconds. It is computed with a sliding window covering about the last 50 results. The last field (ptime) is the average time to fetch a complete page (all objects). It only has a meaning if all pages are approximately the same weight, and is dependant on latency and concurrency (-o). If it does not automatically stop (using -d or -i), you stop it with Ctrl-C, and it will report global statistics (number of hits, response time, errors). It will also recall the command line, which is very useful to remember how the test was performed. Format of the scenario file --------------------------- # if a default host is specified here, it will be used as the TCP # target for each object referencing '.' in the host field. host 10.0.0.2:80 # up to 10 header lines can be entered here. # useful to inject through a proxy # get it with echo -n $user:$passwd | mmencode # header Proxy-Authorization: Basic dXNlcjpwYXNzd2Q= # header Proxy-Connection: Close # can be used to specify cookies, although server cookies are learned and # resent automatically. # new # { get | post } { : | '.' } { object1_URI } [ object1_args ] # { get | post } { : | '.' } { object2_URI } [ object2_args ] # ... # # Inserts a new page in the scenario. It will be named , # although this identifier is never used and can be referenced several times. # - is the number of milliseconds the injecter should pause after # all objects from this page have been fetched and before starting to fetch # the next page. # - is the URI sent after the GET or POST method for an object # part of the page. In case where a proxy is used, the URI should start # with 'http://:' # - is a '&'-delimited string of HTTP arguments passed to the # request either as a GET or POST method. The argument string can contain # up to 2 '%s' occurrences which will be replaced by the client identifier # (an integer starting at 1, stable during a client session, and different # for each client). new page0 1000 get . / get . /img/logo.gif get . /img/menu.jpg get . /frame2.html new page1 5000 post . /login.php userid=%s&name=%s etc...