Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for netstatlive.bat

(view source code of netstatlive.bat as plain text)

  1. @echo off
  2. :: By Shannon Zielinski
  3. setlocal
  4. :START
  5. for /F "tokens=2" %%a in ('"netstat -e | find /I "byte""') do set down1=%%a
  6. for /F "tokens=3" %%a in ('"netstat -e | find /I "byte""') do set up1=%%a
  7. ping -w 850 -n 1 10.1.1.1 > nul
  8. for /F "tokens=2" %%a in ('"netstat -e | find /I "byte""') do set /A down2=(%%a-%down1%)/1390
  9. for /F "tokens=3" %%a in ('"netstat -e | find /I "byte""') do set /A up2=(%%a-%up1%)/1024
  10. cls
  11. echo Down %down2% KB
  12. echo Up   %up2% KB
  13. title %down2% down %up2% up
  14. GOTO START
  15.  

page last modified: 2024-04-16; loaded in 0.0175 seconds