{"id":8474,"date":"2021-07-20T12:28:31","date_gmt":"2021-07-20T12:28:31","guid":{"rendered":"https:\/\/linuxways.net\/?p=8474"},"modified":"2021-07-20T12:28:31","modified_gmt":"2021-07-20T12:28:31","slug":"how-to-install-siege-benchmarking-tool-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-siege-benchmarking-tool-on-ubuntu-20-04\/","title":{"rendered":"How to Install Siege Benchmarking Tool on Ubuntu 20.04"},"content":{"rendered":"<p>Siege is an open-source benchmarking and load testing tool. Siege can be a valuable tool for analyzing your website&#8217;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.<\/p>\n<p>Today\u2019s post is about how to install the Siege benchmarking tool on Ubuntu OS. We will cover:<\/p>\n<ul>\n<li>Installation of Siege via APT<\/li>\n<li>Installation of Siege via tar.gz archive<\/li>\n<\/ul>\n<p><strong>Note<\/strong>: The procedures shown here have been tested on <strong>Ubuntu 20.04 LTS<\/strong>.<\/p>\n<h2>Method # 1 Installation via APT<\/h2>\n<p>In the following procedure, we will install the Siege Benchmarking tool from the default Ubuntu repository using APT.<\/p>\n<p>1. To install Siege on Ubuntu, first update the repository index as follows:<\/p>\n<pre>$ sudo apt update<\/pre>\n<p>Enter sudo password.<\/p>\n<p>2. Now install Siege using the command below:<\/p>\n<pre>$ sudo apt install siege<\/pre>\n<p>If you are prompted with a <strong>y\/n<\/strong> during installation, type <strong>y<\/strong> and hit <strong>Enter<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"737\" height=\"425\" class=\"wp-image-8475\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-509.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-509.png 737w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-509-300x173.png 300w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><\/p>\n<p>3. After Siege is installed, you can verify it as follows:<\/p>\n<pre>$ siege --version<\/pre>\n<p>The output below verifies that Siege version <strong>4.0.4<\/strong> has been installed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"582\" height=\"95\" class=\"wp-image-8476\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-510.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-510.png 582w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-510-300x49.png 300w\" sizes=\"auto, (max-width: 582px) 100vw, 582px\" \/><\/p>\n<h2>Method #2 Installation via tar.gz<\/h2>\n<p>In the following procedure, we will install the Siege Benchmarking tool using the tar.gz package.<\/p>\n<p>1. First install the build-essential package using the command below:<\/p>\n<pre>$ sudo apt install build-essential<\/pre>\n<p>Enter sudo password. If you are prompted with a <strong>y\/n<\/strong> during installation, type <strong>y<\/strong> and hit <strong>Enter<\/strong>.<\/p>\n<p>2. Download the latest version of Siege tar.gz from this <a href=\"http:\/\/download.joedog.org\/siege\/\">link<\/a>. You can also use the command below to download Siege Latest version <strong>4.1.0<\/strong> (as of July 2021):<\/p>\n<pre>$ wget http:\/\/download.joedog.org\/siege\/siege-latest.tar.gz<\/pre>\n<p>This command will save the Siege tar.gz package to your Home directory.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"872\" height=\"209\" class=\"wp-image-8477\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-511.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-511.png 872w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-511-300x72.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-511-768x184.png 768w\" sizes=\"auto, (max-width: 872px) 100vw, 872px\" \/><\/p>\n<p>3. Move the downloaded package to the <strong>\/opt<\/strong> directory using the command below:<\/p>\n<pre>$ sudo mv siege-latest.tar.gz \/opt\/<\/pre>\n<p>4. Now move inside the <strong>\/opt<\/strong> directory:<\/p>\n<pre>$ cd \/opt\/<\/pre>\n<p>And extract the Siege archive file:<\/p>\n<pre>$ sudo tar -zxf siege-latest.tar.gz<\/pre>\n<p>It will be extracted to a directory named siege-version-number (e.g. siege-4.1.0).<\/p>\n<p>5. Move inside the Siege extracted directory:<\/p>\n<pre>$ cd siege-4.1.0\/<\/pre>\n<p>You can use the <em>ls<\/em> command to view the contents of this directory.<\/p>\n<p>6. Now run the below command to run the configure script in the Siege directory:<\/p>\n<pre>$ sudo .\/configure<\/pre>\n<p>This command will check for all the dependencies that are required to build and install the package.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"717\" height=\"380\" class=\"wp-image-8478\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-512.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-512.png 717w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-512-300x159.png 300w\" sizes=\"auto, (max-width: 717px) 100vw, 717px\" \/><\/p>\n<p>7. Now build the package as follows:<\/p>\n<pre>$ sudo make<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"540\" height=\"178\" class=\"wp-image-8479\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-513.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-513.png 540w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-513-300x99.png 300w\" sizes=\"auto, (max-width: 540px) 100vw, 540px\" \/><\/p>\n<p>8. Then install the package using the command below:<\/p>\n<pre>$ sudo make install<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"537\" height=\"218\" class=\"wp-image-8480\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-514.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-514.png 537w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-514-300x122.png 300w\" sizes=\"auto, (max-width: 537px) 100vw, 537px\" \/><\/p>\n<p>Now Siege is installed. You can verify it as follows:<\/p>\n<pre>$ siege --version<\/pre>\n<p>The output below verifies that Siege version <strong>4.1.0<\/strong> has been installed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"508\" height=\"66\" class=\"wp-image-8481\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-515.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-515.png 508w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-515-300x39.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-515-501x66.png 501w\" sizes=\"auto, (max-width: 508px) 100vw, 508px\" \/><\/p>\n<h2>Load Testing Using Siege<\/h2>\n<p>To load test any website using Siege benchmarking tool, use the following syntax:<\/p>\n<pre>$ siege options &lt;URL&gt;<\/pre>\n<p>You will see results of the test like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"609\" height=\"404\" class=\"wp-image-8482\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-516.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-516.png 609w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-516-300x199.png 300w\" sizes=\"auto, (max-width: 609px) 100vw, 609px\" \/><\/p>\n<p>Let\u2019s have a quick understanding of results:<\/p>\n<ul>\n<li><strong>Transactions<\/strong> refers to total number of server hits<\/li>\n<li><strong>Availability<\/strong> is the percentage of connections successfully responded by the server<\/li>\n<li><strong>Elapsed<\/strong> <strong>time<\/strong> refers to how long the test ran.<\/li>\n<li><strong>Data transferred<\/strong> is the total amount of data Siege used for site testing<\/li>\n<li><strong>Response time<\/strong> is the time took by server for responding the requests<\/li>\n<li><strong>Transaction rate<\/strong> refers to the average number of transactions per second a server can manage<\/li>\n<li><strong>Throughput<\/strong> refers to the number of requests server can serve per second<\/li>\n<li><strong>Concurrency<\/strong> is the number of open parallel connections<\/li>\n<li><strong>Successful &amp; Failed transactions<\/strong> are the number of times the server responded with status code less and greater than 400 respectively.<\/li>\n<li><strong>Longest transaction &amp; Shortest transaction<\/strong> are the times that the longest and shortest transaction took to complete out of all transactions respectively<\/li>\n<\/ul>\n<p>Siege has various command-line options which you can view using the command below:<\/p>\n<pre>$ siege --help<\/pre>\n<h2>Uninstall Siege<\/h2>\n<p>If you need to remove Siege from your system, you can do so using the methods below:<\/p>\n<p>To remove Siege that was installed using the <strong>apt<\/strong> tool, use the command below:<\/p>\n<pre>$ sudo apt remove siege<\/pre>\n<p>To remove Siege that was installed using the <strong>tar.gz<\/strong> package, use the commands below:<\/p>\n<p>Navigate to Siege directory:<\/p>\n<pre>$ cd siege-4.1.0\/<\/pre>\n<p>Then uninstall it:<\/p>\n<pre>$ sudo make uninstall<\/pre>\n<p>In this post, we covered how to install Siege benchmarking tool on Ubuntu OS using two methods: using the APT and the tar.gz package. We also went through how to uninstall Siege in case you need to remove it.<\/p>","protected":false},"excerpt":{"rendered":"<p>Siege is an open-source benchmarking and load testing tool. Siege can be a valuable tool for analyzing your website&#8217;s performance and detecting bottlenecks. Its results include a variety&hellip;<\/p>","protected":false},"author":1,"featured_media":8621,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[431,100],"class_list":["post-8474","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-siege-benchmarking-tool","tag-ubuntu-20-04"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/8474","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=8474"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/8474\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/8621"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=8474"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=8474"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=8474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}