Siege is a Linux utility that is used to test the capabilities and performance of a web server under stress. It does so by creating virtual clients who make a connection request to that server to figure out how many requests that server is capable of handling simultaneously.
Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related Server Monitoring queries on Linux Systems.
In this context, we shall look into how you can install Siege on a Linux Mint 20 system and use it to test the desired web server.
Siege can be installed and used on a Linux Mint 20 system very easily with the help of the following steps.
1. Run the system "update" Command
To begin, we can run the "update" command on our system for making it ready for the Siege installation:
$ sudo apt update –y
2. Run the Siege "installation" Command
Now, we will run the "install" command to install Siege on our system:
$ sudo apt install siege –y
Siege is a lightweight tool that will get installed quickly on our system.
3. Check the version of Siege installed on the system
To check the installed version of this tool with the command provided below:
$ siege --version
4. Test Siege on the Desired Web Server
In this phase, you can run the Siege test on the desired web server. For doing that, you can either provide the IP address of that web server or its domain name:
$ sudo siege google.com
Here, we are running the Siege test on Google.com. To stop this test, you will have to press Ctrl+ C after which you will be able to view a complete report of the Siege test.
5. Run the Siege Test on the Desired Web Server for a Specified Amount of Time and with a Specified Number of Concurrent Users
After running the simple Siege test, we can even choose the time for which we want to run it and also the number of concurrent users for running this test. This can be done in the following manner:
$ sudo siege –t45s –c35 google.com
Here, we are trying to run the Siege test on Google.com for 45 seconds with 35 concurrent users. After 45 seconds, the Siege test will terminate automatically displaying a detailed report.
Siege can be removed with the help of a single command from Linux Mint 20 in the following manner:
$ sudo apt-get purge --autoremove siege
This article covers how to quickly install the Siege tool on your Linux system and use it to test any specific web server. Siege is an open-source multi-threaded regression test and benchmark utility with a primary focus on load testing and benchmarking. It can stress test a single URL with a user-defined number of simulated users or read many URLs into memory and stress them simultaneously. The program reports the total number of hits recorded, bytes transferred, response time, concurrency, and return status.
To Install Siege Benchmarking Tool on Ubuntu / Debian,
1. Check and update your Ubuntu 20.04 operating system:
$ sudo apt update && sudo apt upgrade -y
2. Install Siege execute the following command:
$ sudo apt install siege -y
3. Confirm the siege version to make sure it's installed and to compare it to the current version from Siege's official website:
$ siege --version