Skip to content

Commit

Permalink
Change the color & fix 7509
Browse files Browse the repository at this point in the history
  • Loading branch information
oooldking committed Jun 29, 2018
1 parent 47b0c47 commit a82b659
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
20 changes: 12 additions & 8 deletions superbench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ print_speedtest() {
printf "%-18s%-18s%-20s%-12s\n" " Node Name" "Upload Speed" "Download Speed" "Latency" | tee -a $log
speed_test '' 'Speedtest.net'
speed_test '3633' 'Shanghai CT'
speed_test '7509' 'Kunming CT'
speed_test '4741' 'Beijing CT'
speed_test '7509' 'Hangzhou CT'
speed_test '4624' 'Chengdu CT'
speed_test '5083' 'Shanghai CU'
speed_test '4863' "Xi'an CU"
Expand All @@ -250,7 +251,7 @@ print_speedtest_fast() {
printf "%-18s%-18s%-20s%-12s\n" " Node Name" "Upload Speed" "Download Speed" "Latency" | tee -a $log
speed_test '' 'Speedtest.net'
speed_fast_com
speed_test '7509' 'Kunming CT'
speed_test '7509' 'Hangzhou CT'
speed_test '5083' 'Shanghai CU'
speed_test '4575' 'Chengdu CM'

Expand Down Expand Up @@ -326,10 +327,13 @@ ip_info(){
org=$(echo $result | jq '.org' | sed 's/\"//g')
countryCode=$(echo $result | jq '.countryCode' | sed 's/\"//g')
region=$(echo $result | jq '.regionName' | sed 's/\"//g')
if [ !city ]; then
city=${region}
fi

echo -e " ASN & ISP : ${SKYBLUE}$asn, $isp${PLAIN}" | tee -a $log
echo -e " Organization : ${GREEN}$org${PLAIN}" | tee -a $log
echo -e " Location : ${SKYBLUE}$city, ${GREEN}$country / $countryCode${PLAIN}" | tee -a $log
echo -e " Organization : ${YELLOW}$org${PLAIN}" | tee -a $log
echo -e " Location : ${SKYBLUE}$city, ${YELLOW}$country / $countryCode${PLAIN}" | tee -a $log
echo -e " Region : ${SKYBLUE}$region${PLAIN}" | tee -a $log
}

Expand Down Expand Up @@ -491,12 +495,12 @@ print_io() {

print_system_info() {
echo -e " CPU Model : ${SKYBLUE}$cname${PLAIN}" | tee -a $log
echo -e " CPU Cores : ${GREEN}$cores Cores ${SKYBLUE}@ $freq MHz $arch${PLAIN}" | tee -a $log
echo -e " CPU Cores : ${YELLOW}$cores Cores ${SKYBLUE}@ $freq MHz $arch${PLAIN}" | tee -a $log
echo -e " CPU Cache : ${SKYBLUE}$corescache ${PLAIN}" | tee -a $log
echo -e " OS : ${SKYBLUE}$opsy ($lbit Bit) ${GREEN}$virtual${PLAIN}" | tee -a $log
echo -e " OS : ${SKYBLUE}$opsy ($lbit Bit) ${YELLOW}$virtual${PLAIN}" | tee -a $log
echo -e " Kernel : ${SKYBLUE}$kern${PLAIN}" | tee -a $log
echo -e " Total Space : ${GREEN}$disk_total_size GB ${SKYBLUE}($disk_used_size GB Used)${PLAIN}" | tee -a $log
echo -e " Total RAM : ${GREEN}$tram MB ${SKYBLUE}($uram MB Used $bram MB Buff)${PLAIN}" | tee -a $log
echo -e " Total Space : ${YELLOW}$disk_total_size GB ${SKYBLUE}($disk_used_size GB Used)${PLAIN}" | tee -a $log
echo -e " Total RAM : ${YELLOW}$tram MB ${SKYBLUE}($uram MB Used $bram MB Buff)${PLAIN}" | tee -a $log
echo -e " Total SWAP : ${SKYBLUE}$swap MB ($uswap MB Used)${PLAIN}" | tee -a $log
echo -e " Uptime : ${SKYBLUE}$up${PLAIN}" | tee -a $log
echo -e " Load average : ${SKYBLUE}$load${PLAIN}" | tee -a $log
Expand Down
20 changes: 12 additions & 8 deletions superbench_git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ print_speedtest() {
printf "%-18s%-18s%-20s%-12s\n" " Node Name" "Upload Speed" "Download Speed" "Latency" | tee -a $log
speed_test '' 'Speedtest.net'
speed_test '3633' 'Shanghai CT'
speed_test '7509' 'Kunming CT'
speed_test '4741' 'Beijing CT'
speed_test '7509' 'Hangzhou CT'
speed_test '4624' 'Chengdu CT'
speed_test '5083' 'Shanghai CU'
speed_test '4863' "Xi'an CU"
Expand All @@ -197,7 +198,7 @@ print_speedtest_fast() {
printf "%-18s%-18s%-20s%-12s\n" " Node Name" "Upload Speed" "Download Speed" "Latency" | tee -a $log
speed_test '' 'Speedtest.net'
speed_fast_com
speed_test '7509' 'Kunming CT'
speed_test '7509' 'Hangzhou CT'
speed_test '5083' 'Shanghai CU'
speed_test '4575' 'Chengdu CM'

Expand Down Expand Up @@ -271,10 +272,13 @@ ip_info4(){
org=$(python ip_info.py org)
countryCode=$(python ipip.py country_code)
region=$(python ipip.py province)
if [ !city ]; then
city=${region}
fi

echo -e " ASN & ISP : ${SKYBLUE}$asn, $isp${PLAIN}" | tee -a $log
echo -e " Organization : ${GREEN}$org${PLAIN}" | tee -a $log
echo -e " Location : ${SKYBLUE}$city, ${GREEN}$country / $countryCode${PLAIN}" | tee -a $log
echo -e " Organization : ${YELLOW}$org${PLAIN}" | tee -a $log
echo -e " Location : ${SKYBLUE}$city, ${YELLOW}$country / $countryCode${PLAIN}" | tee -a $log
echo -e " Region : ${SKYBLUE}$region${PLAIN}" | tee -a $log

rm -rf ip_info.py
Expand Down Expand Up @@ -384,12 +388,12 @@ print_io() {

print_system_info() {
echo -e " CPU Model : ${SKYBLUE}$cname${PLAIN}" | tee -a $log
echo -e " CPU Cores : ${GREEN}$cores Cores ${SKYBLUE}@ $freq MHz $arch${PLAIN}" | tee -a $log
echo -e " CPU Cores : ${YELLOW}$cores Cores ${SKYBLUE}@ $freq MHz $arch${PLAIN}" | tee -a $log
echo -e " CPU Cache : ${SKYBLUE}$corescache ${PLAIN}" | tee -a $log
echo -e " OS : ${SKYBLUE}$opsy ($lbit Bit) ${GREEN}$virtual${PLAIN}" | tee -a $log
echo -e " OS : ${SKYBLUE}$opsy ($lbit Bit) ${YELLOW}$virtual${PLAIN}" | tee -a $log
echo -e " Kernel : ${SKYBLUE}$kern${PLAIN}" | tee -a $log
echo -e " Total Space : ${GREEN}$disk_total_size GB ${SKYBLUE}($disk_used_size GB Used)${PLAIN}" | tee -a $log
echo -e " Total RAM : ${GREEN}$tram MB ${SKYBLUE}($uram MB Used $bram MB Buff)${PLAIN}" | tee -a $log
echo -e " Total Space : ${YELLOW}$disk_total_size GB ${SKYBLUE}($disk_used_size GB Used)${PLAIN}" | tee -a $log
echo -e " Total RAM : ${YELLOW}$tram MB ${SKYBLUE}($uram MB Used $bram MB Buff)${PLAIN}" | tee -a $log
echo -e " Total SWAP : ${SKYBLUE}$swap MB ($uswap MB Used)${PLAIN}" | tee -a $log
echo -e " Uptime : ${SKYBLUE}$up${PLAIN}" | tee -a $log
echo -e " Load average : ${SKYBLUE}$load${PLAIN}" | tee -a $log
Expand Down

0 comments on commit a82b659

Please sign in to comment.