Ai_GirlFriend/查看端口占用.bat
2026-03-02 18:57:11 +08:00

35 lines
784 B
Batchfile
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001 >nul
echo ========================================
echo 查看常用端口占用情况
echo ========================================
echo.
echo [端口 30100 - PHP后端]
netstat -ano | findstr :30100
echo.
echo [端口 30101 - Python后端]
netstat -ano | findstr :30101
echo.
echo [端口 3306 - MySQL]
netstat -ano | findstr :3306
echo.
echo [端口 8000 - 其他服务]
netstat -ano | findstr :8000
echo.
echo ========================================
echo 说明:
echo LISTENING = 正在监听(服务正在运行)
echo ESTABLISHED = 已建立连接
echo TIME_WAIT = 连接关闭等待
echo.
echo 最后一列是进程IDPID
echo 可以使用 tasklist ^| findstr PID 查看进程详情
echo ========================================
echo.
pause