Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. @echo off
  2. title Ping
  3. setlocal enabledelayedexpansion
  4. color a
  5.  
  6. set total=0
  7. set count=0
  8. :check
  9. if !count! GTR 5 (
  10. set /a "count=1"
  11. set /a "total=%prom%"
  12. )
  13.  
  14. for /F "tokens=7 delims==: " %%G in ('ping -n 1 189.236.63.180 ^| findstr /C:"Respuesta"') do (
  15. set /a count+=1
  16. set milis=%%G
  17. set milis=!milis:ms=!
  18. set /a total=!total! + !milis!
  19. )
  20.  
  21. set /a prom=%total% / %count%
  22.  
  23. mode con:cols=16 lines=4
  24. cls
  25. if %prom% GTR 70 (color a)
  26. if %prom% GTR 110 (color e)
  27. if %prom% GTR 320 (color c)
  28. echo.
  29. echo.
  30. echo Server LOL LAN
  31. echo ping: %prom%ms
  32. title Ping: %prom%
  33. goto check
  34. pause
  35. endlocal
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement