From 41b0ef8a4550e643b2cc4c64e180f239f58da31f Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Sun, 12 Nov 2023 21:51:52 +0500 Subject: [PATCH] added cf, google and valo ping --- bot.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/bot.sh b/bot.sh index 4fba204..3f52a2d 100755 --- a/bot.sh +++ b/bot.sh @@ -13,6 +13,16 @@ speedtest_fast=data/speedtest_fast_$date.json weather_file=data/weather_$date.json edited_image=data/edited_image_$date.png + +################################################################################# +latency(){ + echo $(ping -c 1 $1) | \ + grep 'time=' | \ + awk -F'time=' '{print $2}' | \ + awk '{print $1}' +} +################################################################################# + ################################################################################# echo Grabbing Camara Image # Capture a frame from RTSP stream @@ -83,6 +93,14 @@ fast_total=$(echo $fast_downloaded+$fast_uploaded | bc) echo Speedtests complete ################################################################################# +################################################################################# + +valorant_ping=$(latency dynamodb.ap-southeast-1.amazonaws.com) +cfdns_ping=$(latency 1.1.1.1) +googledns_ping=$(latency 8.8.8.8) + +################################################################################# + ################################################################################# echo Checking weather # Make the API request @@ -110,6 +128,10 @@ total_wasted=$(echo $ookla_total+$libre_total+$fast_total | bc) caption=" $current_weather +🔫 Valorant SEA ping: $valorant_ping ms +🌐 1.1.1.1 ping: $cfdns_ping ms +🌐 8.8.8.8 ping: $googledns_ping ms + *Speedtest by Ookla*: 🌐 *Server*: $ookla_server, $ookla_city, $ookla_country 🏓 *Latency*: $ookla_ping ms