10.1 C
Amsterdam

How To Install Siege Benchmarking Tool On Ubuntu 20.04

Today we are going to learn that how to install Siege Benchmarking tool on Ubuntu 20.04. Siege is an open source product used for the multi thread load testing & benchmarking in Linux. It allows you to perform stress test for single URL or multi URL’s in order to stress them at a time. Siege have also the functionality to test the web servers with n no. of users for t no. of times. So, it provides you the better experience by operating in 3 modes as Regression, Internet Simulation & the brute force. So, here we’ll see the steps to install Siege Benchmarking on Ubuntu 20.04.

Step 1: Update Your System

First of all update your system to have the latest updates installed.

sudo apt update -y

Step 2: Install Siege Benchmarking Tool On Ubuntu 20.04

Once the update finished, move towards the installation process of Siege benchmarking tool on Ubunut 20.04. As Siege is already available in Ubuntu repositories. So, you’ve to simply run the following command in your terminal to install it on your system.

sudo apt install siege -y

Once it is installed on your system, verify the siege version by typing.

siege --version

You’ll see the similar output:

sabi@Ubuntu20:~$ siege --version
New configuration template added to /home/sabi/.siege
Run siege -C to view the current settings in that file
SIEGE 4.0.4
Copyright (C) 2017 by Jeffrey Fulmer, et al.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.

Step 3: Configure Siege on Ubuntu 20.04

Now, it’s time to configure Siege on Ubuntu 20.04. You can find the siege configuration file under /etc/siege/ directory. Now, type the below command to edit the siege configuration file.

sudo nano /etc/siege/siegerc

And then uncomment the below line in order to set the log file for siege.

logfile = $(HOME)/var/log/siege.log

After performing the above action, save & exit the file.

Step 4: Testing a single website with Siege

In order to test the load of a single website, run the following command

siege test.osradar.com

You’ll see the similar output as shown below:

Transactions: 57832 hits
Availability: 99.95 %
Elapsed time: 401.49 secs
Data transferred: 706.55 MB
Response time: 0.17 secs
Transaction rate: 144.04 trans/sec
Throughput: 1.76 MB/sec
Concurrency: 24.35
Successful transactions: 57852
Failed transactions: 31
Longest transaction: 100.01
Shortest transaction: 0.00

Step 5: Testing Multiple Websites with Siege

In order to test multiple websites with the help of siege, you’ve to first add the URL’s of all wesites in the /etc/siege/urls.txt file. Run the following command to edit the file.

sudo nano /etc/siege/urls.txt

And then type the desired websites URL’s or IP”s you want to test for load. Make sure to type only one URL in a line as you can seen below:

http://example1.com
www.example.com
192.168.0.2

After updating the file save it & exit. Once done, run the siege command to test all the URL’s by specifying the URL file.

siege -f /etc/siege/urls.txt

After hitting the above command, siege will perform the test for all URL’s provided in the file one by one.

See the below options of siege command along with explaination of each.

-t : Specify the time limit for which siege runs.
-c : To mention the no. of concurrent users.
-d : It is used to specify the delay time for concurrent users.
-C : To specify your own config file.
-i : In order to test different random URL's.
-T : Specify the type of content .
-h : To see the manual for help..
-l : For generating log files.

So, this is how you can install & use siege benchmarking tool on Ubuntu 20.04

- Advertisement -

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Donate to Osradar

Latest article

x