@echo off color e1 title 監測伺服器所有連線 setlocal :go FOR /F "tokens=1-4 delims=/ " %%a IN ("%date%") DO (SET _MyDate=%%a/%%b/%%c) FOR /F "tokens=1-4 delims=:." %%a IN ("%time%") DO (SET _MyTime=%%a:%%b:%%c) @echo %_MyDate% %_MyTime% @echo ---------------------------- @echo off @echo 目前TCP埠總連線數 netstat -an | find "TCP" /c @echo 目前UCP埠總連線數 netstat -an | find "UCP" /c @echo 目前WAIT埠有效連線數 netstat -an | find "WAIT" /c @echo 目前80埠http連線數 netstat -an | find "80" /c timeout /t 8 /nobreak cls goto go