.ig \"-*- Siege -*- Copyright (C) 2000-2010 by Jeffrey Fulmer, et al. Siege is distributed under the terms of the GNU GPL. .. .de TQ .br .ns .TP \\$1 .. .\" Like TP, but if specified indent is more than half .\" the current line-length - indent, use the default indent. .de Tp .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP .el .TP "\\$1" .. .TH SIEGE 1 "October-06-2014" "Siege v3.0.8" .SH NAME .B siege \- An HTTP/HTTPS stress tester .SH INTRODUCTION Siege is a multi-threaded http load testing and benchmarking utility. It was designed to let web developers measure the performance of their code under duress. It allows one to hit a web server with a configurable number of concurrent simulated users. Those users place the webserver "under siege." \fR\fR Performance measures include elapsed time, total data transferred, server response time, its transaction rate, its throughput, its concurrency and the number of times it returned OK. These measures are quantified and reported at the end of each run. Their meaning and significance is discussed below. \fR\fR Siege has essentially three modes of operation: regression (when invoked by bombardment), internet simulation and brute force. .SH INVOCATION The format for invoking siege is: siege [options] \fR siege [options] [url]\fR siege \-g [url]\fR Siege supports the following command line options:\fR\fR .TP \fB\-V\fR, \fB\-\-version\fR VERSION, prints the version number .TP \fB\-h\fR, \fB\-\-help\fR HELP, prints the help section which includes a summary of all the command line options. .TP \fB\-C\fR, \fB\-\-config\fR CONFIGURATION, prints the current configuration in the $HOME/.siegerc file. Edit that file to set flag values for EVERY siege run, a feature which eases runtime invocation. You set an alternative resource file with the SIEGERC environment variable: export SIEGERC=/home/jeff/haha .TP \fB\-v\fR, \fB\-\-verbose\fR VERBOSE, prints the HTTP return status and the GET request to the screen. Useful when reading a series of URLs from a configuration file. This flag allows you to witness the progress of the test. .TP \fB\-q\fR, \fB\-\-quiet\fR QUIET turns off verbose and suppresses most output. This option was added primarily for scripting with \-g/\-\-get. If you run a full siege in quiet mode, you'll still get the opening introduction and the final stats. .TP \fB\-g\fR, \fB\-\-get\fR GET HTTP headers and display the transaction. Siege exits 1 if the transaction doesn't contain at least one HTTP 200 response, otherwise it exits 0. You can limit the transaction to just the headers by setting gmethod=HEAD in $HOME/.siegerc .TP \fB\-c NUM\fR, \fB\-\-concurrent=NUM\fR CONCURRENT, allows you to set the concurrent number of simulated users to num. The number of simulated users is limited to the resources on the computer running siege. .TP \fB\-i\fR, \fB\-\-internet\fR INTERNET, generates user simulation by randomly hitting the URLs read from the urls.txt file. This option is viable only with the urls.txt file. .TP \fB\-d NUM\fR, \fB\-\-delay=NUM\fR DELAY, each siege simulated users sleeps for a random interval in seconds between 0 and NUM. .TP \fB\-b\fR, \fB\-\-benchmark\fR BENCHMARK, runs the test with NO DELAY for throughput benchmarking. By default each simulated user is invoked with at least a one second delay. This option removes that delay. It is not recommended that you use this option while load testing. .TP \fB\-r NUM\fR, \fB\-\-reps=NUM\fR, \fB\-\-reps=once\fR REPS, allows you to run the siege for NUM repetitions. If \-\-reps=once, then siege will run through the urls.txt file and hit each URL in the file exactly once. The list will be divided among each simulated user. So if you run \-\-reps=once \-c10 on a file which contains 30 URLs, then each user will run three times. NOTE: \-t/\-\-time takes precedent over \-r/\-\-reps. If you want to use this option, make sure time = x is commented out in your $HOME/.siegerc file. .TP \fB\-t NUMm\fR, \fB\-\-time=NUMm\fR TIME, allows you to run the test for a selected period of time. The format is "NUMm", where NUM is a time unit and the "m" modifier is either S, M, or H for seconds, minutes and hours. To run siege for an hour, you could select any one of the following combinations: \-t3600S, \-t60M, \-t1H. The modifier is not case sensitive, but it does require no space between the number and itself. .TP \fB\-l [FILE]\fR, \fB\-\-log[=FILE]\fR LOG transaction stats to FILE. The argument is optional. If FILE is not specified, then siege logs the transaction to /var/log/siege.log. If siege is installed in /usr/local, then the default siege.log is /usr/local/var/siege.log. This option logs the final statistics reported when siege successfully completes its test. You can edit $HOME/.siegerc to change the location of the siege.log file. .TP \fB\-m MESSAGE\fR, \fB\-\-mark=MESSAGE\fR MARK, mark the log file with a separator. This option will allow you to separate your log file entries with header information. This is especially useful when testing two different servers. It is not necessary to use both the \-m option and the \-l option. \-m assumes \-l so it marks and logs the transaction. If the MESSAGE has spaces in it, make sure that you put it in quotes. .TP \fB\-H HEADER\fR, \fB\-\-header=HEADER\fR HEADER, this option allows you to add additional header information. .TP \fB\-R SIEGERC\fR, \fB\-\-rc=SIEGERC\fR RC, sets the siegerc file for the run. This option overrides the environment variable SIEGERC and the default resource file, $HOME/.siegerc .TP \fB\-f FILE\fR, \fB\-\-file=FILE\fR FILE, the default URL file is /etc/siege/urls.txt. To select a different URL file, use this option, i.e., siege \-f myurls.txt .TP \fB\-A "User Agent"\fR, \fB\-\-user\-agent="User Agent"\fR AGENT, use this option to set the User-Agent in the request. .SH URL FORMAT Siege understands the following URL formats: \fR .br (brackets indicate the directive is optional)\fR .br \fR .br [protocol://] host.domain.xxx [:port] [/path/file] \fR .br \fR .br host.domain.xxx/file POST field=value&field2=value2 \fR .br \fR .br Or you can POST the contents of a file using the line input operator, the "<" character: \fR .br \fR .br host/file POST = 400 plus the sum of all failed socket transactions which includes socket timeouts. .TP .B Longest transaction The greatest amount of time that any single transaction took, out of all transactions. .TP .B Shortest transaction The smallest amount of time that any single transaction took, out of all transactions. .SH AUTHOR Jeffrey Fulmer, et al. .SH BUGS Report bugs to jeff@joedog.org. Give a detailed description of the problem and report the version of siege that you are using. .SH COPYRIGHT Copyright \(co 2000 2001 2004 Jeffrey Fulmer, et al. .LP This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. .LP .SH AVAILABILITY The most recent released version of siege is available by anonymous FTP from ftp.joedog.org in the directory pub/siege. .LP .SH SEE ALSO siege.config(1) urls_txt(5) layingsiege(7)