Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ping -n 15 192.206.238.4 | find /i "Reply" > nul > %cd%acttracing.log
- nul findstr /c:"time=680" acttracing.log && (
- echo "High Latency" was found.
- ) || (
- echo "High Latency" was NOT found.
- )
- If %ERRORLEVEL% equ 0 goto :sound
- nul findstr /c:"time=685" acttracing.log && (
- echo "High Latency" was found.
- ) || (
- echo "High Latency" was NOT found.
- )
- If %ERRORLEVEL% equ 0 goto :sound
- nul findstr /c:"time=690" acttracing.log && (
- echo "High Latency" was found.
- ) || (
- echo "High Latency" was NOT found.
- )
- If %ERRORLEVEL% equ 0 goto :sound
- nul findstr /c:"time=695" acttracing.log && (
- echo "High Latency" was found.
- ) || (
- echo "High Latency" was NOT found.
- )
- If %ERRORLEVEL% equ 0 goto :sound
- nul findstr /c:"time=700" acttracing.log && (
- echo "High Latency" was found.
- ) || (
- echo "High Latency" was NOT found.
- )
- If %ERRORLEVEL% equ 0 goto :sound
- set ip=google.com
- for /f "skip=2 delims=" %%a in ('ping %ip% -n 1') do (
- set "var=%%a"
- goto next
- )
- :next
- for /f "tokens=1-6" %%a in ("%var%") do set var=%%e
- set time=%var:~5,-2%
- if %time% GTR 300 (
- if %time% LSS 700 (
- echo high latency
- ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement