From 19fcf84d46fbe37b3dc87e5b0715f156e523677c Mon Sep 17 00:00:00 2001 From: Teddysun Date: Thu, 3 Dec 2015 01:28:21 +0800 Subject: [PATCH] Remove hostname & IP --- bench.sh | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/bench.sh b/bench.sh index 811e350..c4da5d7 100644 --- a/bench.sh +++ b/bench.sh @@ -17,7 +17,6 @@ arch=$( uname -m ) lbit=$( getconf LONG_BIT ) host=$( hostname ) kern=$( uname -r ) -ipv4=$( wget -qO- ipv4.icanhazip.com ) ipv6=$( wget -qO- ipv6.icanhazip.com ) next() { @@ -94,9 +93,6 @@ echo "System uptime : $up" echo "OS : $opsy" echo "Arch : $arch ($lbit Bit)" echo "Kernel : $kern" -echo "Hostname : $host" -echo "IPv4 : $ipv4" -[[ "$ipv6" != "" ]] && echo "IPv6 : $ipv6" next if [ -e '/usr/bin/wget' ]; then @@ -111,12 +107,12 @@ else exit 1 fi -io1=$((dd if=/dev/zero of=test_$$ bs=64k count=16k conv=fdatasync && /bin/rm -f test_$$) 2>&1 | awk 'END{print}') -io2=$((dd if=/dev/zero of=test_$$ bs=64k count=16k conv=fdatasync && /bin/rm -f test_$$) 2>&1 | awk 'END{print}') -io3=$((dd if=/dev/zero of=test_$$ bs=64k count=16k conv=fdatasync && /bin/rm -f test_$$) 2>&1 | awk 'END{print}') -ioraw1=$( echo $io1 | awk 'NR==1 {print $8}' ) -ioraw2=$( echo $io2 | awk 'NR==1 {print $8}' ) -ioraw3=$( echo $io3 | awk 'NR==1 {print $8}' ) +io1=$((dd if=/dev/zero of=test_$$ bs=64k count=16k conv=fdatasync && rm -f test_$$ ) 2>&1 | awk -F, '{io=$NF} END { print io}' | sed 's/^[ \t]*//;s/[ \t]*$//') +io2=$((dd if=/dev/zero of=test_$$ bs=64k count=16k conv=fdatasync && rm -f test_$$ ) 2>&1 | awk -F, '{io=$NF} END { print io}' | sed 's/^[ \t]*//;s/[ \t]*$//') +io3=$((dd if=/dev/zero of=test_$$ bs=64k count=16k conv=fdatasync && rm -f test_$$ ) 2>&1 | awk -F, '{io=$NF} END { print io}' | sed 's/^[ \t]*//;s/[ \t]*$//') +ioraw1=$( echo $io1 | awk 'NR==1 {print $1}' ) +ioraw2=$( echo $io2 | awk 'NR==1 {print $1}' ) +ioraw3=$( echo $io3 | awk 'NR==1 {print $1}' ) ioall=$( awk 'BEGIN{print '$ioraw1' + '$ioraw2' + '$ioraw3'}' ) ioavg=$( awk 'BEGIN{print '$ioall'/3}' ) echo "I/O speed(1st run) : $io1"