Siege is an open-source benchmarking and load testing tool. Siege can be a valuable tool for analyzing your website's performance and detecting bottlenecks. Its results include a variety of measures that gives you valuable information into the general health of your website. Siege can be used to evaluate website response, transaction rate, throughput, etc. It can stress test a single website or multiple websites simultaneously.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Website Server Monitoring queries.
In this context, we shall look into how to install the Siege benchmarking tool on Ubuntu 20.04 LTS.
Siege benchmarking tool can be easily installed via the following ways:
Here, we will install the Siege Benchmarking tool from the default Ubuntu repository using APT. To do this, follow the steps outlined below.
i. To install Siege on Ubuntu, first update the repository index as follows:
$ sudo apt update
Enter sudo password.
ii. Now install Siege using the command below:
$ sudo apt install siege
If you are prompted with a y/n during installation, type y and hit Enter.
iii. After Siege is installed, you can verify it as follows:
$ siege --version
The output will display the exact version of Siege Installed on the system.
Here, we will install the Siege Benchmarking tool using the tar.gz package. So follow the steps outlined below.
i. First install the build-essential package using the command below:
$ sudo apt install build-essential
Enter sudo password. If you are prompted with a y/n during installation, type y and hit Enter.
ii. Download the latest version of Siege tar.gz from this link. You can also use the command below to download Siege Latest version 4.1.0 (as of July 2021):
$ wget http://download.joedog.org/siege/siege-latest.tar.gz
This command will save the Siege tar.gz package to your Home directory.
iii. Move the downloaded package to the /opt directory using the command below:
$ sudo mv siege-latest.tar.gz /opt/
iv. Now move inside the /opt directory:
$ cd /opt/
And extract the Siege archive file:
$ sudo tar -zxf siege-latest.tar.gz
It will be extracted to a directory named siege-version-number (e.g. siege-4.1.0).
v. Move inside the Siege extracted directory:
$ cd siege-4.1.0/
You can use the ls command to view the contents of this directory.
vi. Now run the below command to run the configure script in the Siege directory:
$ sudo ./configure
This command will check for all the dependencies that are required to build and install the package.
vii. Now build the package with the command as follows:
$ sudo make
viii. Then install the package using the command below:
$ sudo make install
Now Siege is installed. You can verify it by running the following command:
$ siege --version
To load test any website using Siege benchmarking tool, use the following syntax:
$ siege options <URL>
Furthermore, Siege has various command-line options which you can view using the command below:
$ siege --help
If you need to remove Siege from your system, you can do so using the methods below:
1. To remove Siege that was installed using the apt tool, use the command below:
$ sudo apt remove siege
2. To remove Siege that was installed using the tar.gz package, use the commands below:
Navigate to Siege directory:
$ cd siege-4.1.0/
Then uninstall it:
$ sudo make uninstall
This article covers how to install Siege benchmarking tool on Ubuntu Linux System using two methods: using the APT and the tar.gz package. Siege allows you to test a web server with n number of users t number of times. Siege offers three modes of operation: Regression, internet simulation, and brute force.
Once the Siege is installed, you can verify the installed version of Siege using the following command:
$ siege --version