{"id":32,"date":"2015-08-13T22:34:00","date_gmt":"2015-08-13T22:34:00","guid":{"rendered":"https:\/\/www.tech-and-dev.com\/blog\/2015\/08\/13\/bash-script-to-benchmark-a-linux-server\/"},"modified":"2021-02-22T01:04:14","modified_gmt":"2021-02-22T01:04:14","slug":"bash-script-to-benchmark-linux-server","status":"publish","type":"post","link":"https:\/\/www.tech-and-dev.com\/blog\/2015\/08\/bash-script-to-benchmark-linux-server.html","title":{"rendered":"Bash Script to Benchmark A Linux Server"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left;\">\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/linux-penguin.png\"><img decoding=\"async\" title=\"Linux\" src=\"https:\/\/www.tech-and-dev.com\/blog\/wp-content\/uploads\/2021\/02\/linux-penguin.png\" alt=\"Linux Penguin Logo\" border=\"0\" \/><\/a><\/div>\n<p>&nbsp;<\/p>\n<div style=\"text-align: justify;\">Whether you&#8217;re using Linux on a VPS, dedicated server, laptop or desktop pc, this script will benchmark the hardware. It is written in BASH and will benchmark the CPU, memory, hard disk speed and internet connection speed.<\/div>\n<div style=\"text-align: justify;\">1- CPU: The CPU Model, frequency, number of cores and cache size will be tested<\/div>\n<div style=\"text-align: justify;\">2- Memory: The total amount of memory (RAM) and swap will be displayed<\/div>\n<div style=\"text-align: justify;\">3- System: The server uptime will be displayed<\/div>\n<div style=\"text-align: justify;\">4- Hard Disk speed: The Input\/Output speed of the harddisk will be tested, and the total available disk space will be displayed.<\/div>\n<div style=\"text-align: justify;\">5- The server&#8217;s internet connection will be tested by downloading files across the globe, starting from USA to Europe to Asia.<\/div>\n<div style=\"text-align: justify;\"><\/div>\n<div style=\"text-align: justify;\">Note: A total of 1GB of data will be downloaded during execution<\/div>\n<p><a name=\"more\"><\/a>The script can be found on Github:<br \/>\n<a href=\"https:\/\/github.com\/etiennerached\/Server-Benchmark-Script\">https:\/\/github.com\/etiennerached\/Server-Benchmark-Script<\/a><\/p>\n<p>To run the script, simply execute the following 2 commands:<\/p>\n<pre>wget https:\/\/raw.githubusercontent.com\/etiennerached\/Server-Benchmark-Script\/master\/serverbenchmark.sh\r\nbash serverbenchmark.sh<\/pre>\n<p>An output example is as follows:<\/p>\n<pre>========== CPU Info ==========\r\nCPU model :  Intel(R) Xeon(R) CPU E5-2630L v2 @ 2.40GHz\r\nNumber of cores :  1\r\nCPU cache size :  15360 KB\r\nCPU frequency :  2399.998 MHz\r\n======= END of CPU Info =======<\/pre>\n<p>========== Memory Info ==========<br \/>\nTotal RAM : 490 MB<br \/>\nTotal swap : 511 MB<br \/>\n======= END of Memory Info =======<\/p>\n<p>========== System Info ==========<br \/>\nSystem uptime : 31 days, 3:42,<br \/>\n======= END of System Info =======<\/p>\n<p>========== Hard Disk Info ==========<br \/>\nNow Testing I\/O Speed. This might take a while&#8230;<br \/>\nI\/O speed : 40.8MB\/s<br \/>\nHard Disk Space:<br \/>\n\/dev\/vda1 43%<br \/>\nnone 0%<br \/>\nudev 1%<br \/>\ntmpfs 1%<br \/>\nnone 0%<br \/>\nnone 0%<br \/>\nnone 0%<br \/>\n======= END of Hard Disk Info =======<\/p>\n<p>========== Download Speed Info ==========<br \/>\nDownload speed from CDN CacheFly: 80.2MB\/s<br \/>\nDownload speed from Linode, East, USA: 83.3MB\/s<br \/>\nDownload speed from Linode, Central, USA: 3.10MB\/s<br \/>\nDownload speed from Linode, West, USA: 83.3MB\/s<br \/>\nDownload speed from Hetzner, Germany: 11.1MB\/s<br \/>\nDownload speed from OVH, France: 8.99MB\/s<br \/>\nDownload speed from Linode, UK, London: 11.5MB\/s<br \/>\nDownload speed from Leaseweb, Haarlem, NL: 42.0MB\/s<br \/>\nDownload speed from Linode, Tokyo, JP: 7.45MB\/s<br \/>\nDownload speed from Softlayer, Singapore: 7.15MB\/s<br \/>\n======= END of Download Speed Info =======<\/p>\n<p><b>Questions or comments? Post them below!<\/b><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Whether you&#8217;re using Linux on a VPS, dedicated server, laptop or desktop pc, this script will benchmark the hardware. It is written in BASH and will benchmark the CPU, memory, hard disk speed and internet connection speed. 1- CPU: The CPU Model, frequency, number of cores and cache size will be tested 2- Memory: [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[43,6,31],"tags":[],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-bash","category-linux","category-server"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":1,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/32\/revisions"}],"predecessor-version":[{"id":322,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/posts\/32\/revisions\/322"}],"wp:attachment":[{"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/categories?post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tech-and-dev.com\/blog\/wp-json\/wp\/v2\/tags?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}