Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


[Script] Serverreview Bash Script v2
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

[Script] Serverreview Bash Script v2

It's an upgrade of Serverreview Bash Script. As for server information it will now show you server hostname, IP, free swap and used storage. More important information will be added later. And it's now parameter based, means you don't need to waste your bandwidth if you just like to see server information only or test I/O. So lets's see how to do. First download the file using code below:

wget serverreview.cf/script/bench

Once downloaded you can use the code below to use it properly. Here is list of parameters below:

System Information

sh bench -info

I/O Test

sh bench -io

CDN Download (200MB)

sh bench -cdn

North America Download (800MB)

sh bench -northamerica

Europe Download (900MB)

sh bench -europe

Asia Download (400MB)

sh bench -asia

System Info + CDN Download + I/O Test

sh bench -b

All In One Command

sh bench -a

Help

sh bench -help

About

sh bench -about

Serverreview Bash Script

Credits

Thanks to @camarg for the the original script.
Thanks to @dmmcintyre3 for the modified version.
Thanks @Hidden_Refuge for update bench-sh-2.

Comments

  • FlamesRunnerFlamesRunner Member
    edited September 2015

    That's all I wanted. For credits. Good luck.

    To find the a system's disk space usage, use "df -h".

  • @FlamesRunner said:
    To find the a system's disk space usage, use "df -h".

    Thanks :) I've used "df -h | grep ^/dev" in this script for accurate disk information around all linux OS.

  • iotest () {
        echo ""; echo " ##IO Test" | sed $'s/ ##IO Test/\e[93m&\e[0m/'
        io=$( ( dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync && rm -f test ) 2>&1 | awk -F, '{io=$NF} END { print io}' ); echo " I/O Speed : $io"
        io=$( ( dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync oflag=direct && rm -f test ) 2>&1 | awk -F, '{io=$NF} END { print io}' ); echo " I/O Direct : $io"
        echo ""
    }
    
  • What do you want to say? @jh

  • @jh That's called a "function" in shell scripting.

    Thanked by 1ToggledNS
  • nice script :)

    Thanked by 1sayem314
  • @sayem314 said:
    Thanks :) I've used "df -h | grep ^/dev" in this script for accurate disk information around all linux OS.

    $ df -h | grep ^/dev | awk 'NR==1 {print $2}'
    20G

    Doesn't look very accurate, considering this is a 2x2TB disk server :)

    Your command is simply getting partitions that start with /dev and showing the totals of the first line displayed. In my case, the 20GB partition. You might want to at least sum them up.

    Another approach might be the one used in @PetaByet's script, which you can see here:

    https://github.com/qrwteyrutiyoup/serverbench/blob/master/ptb.sh#L230

    In that case, it's summing up all the partitions displayed by the df command.

    Thanked by 1Rolter
  • @qrwteyrutiyoup I'll look into that for next update. Thank you :)

  • @qrwteyrutiyoup Releasing the update today, hope partition bug is solved.

  • i see that you're using ubuntu 15.04, what provider do you currently use?

  • The screenshot has been taken from one of my VPS on Interserver. @2298

  • ZeastZeast Member
    edited September 2015

    Edit:

    root@la1:~# sh bench -a
    
    e[93m ##System Informatione[0m
    
     Hostname:   la1
     Public IP:  
     CPU Model:  Intel(R) Xeon(R) CPU E3-1270 v3 @ 3.50GHz
     CPU Cores:  4 core @  3500.000 MHz
     CPU Cache:  8192 KB
     Total RAM:  4096 MB (Free 3957 MB)
     Total SWAP: 0 MB (Free 0 MB)
     Drive Space: 250G (1% used)
     Running for: 1days - 5hrs 53min 26sec
    
    
    e[93m ##CDN Speedteste[0m
     CacheFly:  62.3MB/s
     Internode: 5.81MB/s
    
    
    e[93m ##North America Speedteste[0m
     SoftLayer, Dallas, USA: 64.8MB/s
     ReliableSite, Piscataway, USA: 10.1MB/s
     OVH, Beauharnois, Canada: 8.15MB/s
     Softlayer, Washington, USA: 31.6MB/s
     SoftLayer, San Jose, USA: 77.7MB/s
     Vultr, Dallas, USA: 37.4MB/s
     Vultr, New Jersey, USA: 23.3MB/s
     Vultr, Seattle, USA: 51.5MB/s
    
    
    e[93m ##Europe Speedteste[0m
     RedStation, Gosport, UK: 4.52MB/s
     EDIS, Stockholm, Sweden: 2.24MB/s
     OVH, Roubaix, France: 4.83MB/s
     Prometeus, Milan, Italy: 11.6MB/s
     LeaseWeb, Frankfurt, Germany: 4.14MB/s
     Interactive3D, Amsterdam, NL: 5.14MB/s
     Vultr, London, UK: 6.62MB/s
     Vultr, Amsterdam, NL: 11.1MB/s
    
    
    e[93m ##Asia Speedteste[0m
     SoftLayer, Singapore, Singapore 12.6MB/s
     Linode, Singapore, Singapore 4.32MB/s
     Linode, Tokyo, Japan: 9.11MB/s
     Vultr, Tokyo, Japan: 14.0MB/s
    
    
    e[93m ##IO Teste[0m
     I/O Speed :  160 MB/s
     I/O Direct :  151 MB/s
    
  • @Zeast said: Check your ip.php

    I was moving my site. So there will be problem with ip detection. remove bench 'rm -f bench' then redownload it, I updated ip address location. You could remove ip from your comment.

  • teknolaizteknolaiz Member
    edited September 2015

    @Zeast said:
    Check your ip.php

    I don't get why he is using a custom file anyway if he can do:

    IPv4:

    wget -qO- ipv4.icanhazip.com or curl -4 icanhazip.com

    IPv6:

    wget -qO- ipv6.icanhazip.com or curl -6 icanhazip.com
  • @Hidden_Refuge Guess I got lots of bandwith :D Yeah I've used ipecho.net on new update just give me some time, I'm moving my site.

  • AnthonySmithAnthonySmith Member, Patron Provider

    Would be nice to see one of these types of script that actually tests the IO rather than doing a sequential write test.

  • Okay, updated :) But I can't edit post here anymore so take a look at new parameters http://serverreview.cf/script/serverreview-bash-script-v2/

  • not working link

  • @dedicados said:
    not working link

    Probably Freenom messed up the domain

  • the domain not resolving from me.

  • Sorry for not replying. This project is now on Github

Sign In or Register to comment.