查询端口占用情况:netstat -aon|findstr "5002"查看监听的进程netstat -ano |find /i "listening"计算包含“TCP”字符的条目数netstat -an | find /C "TCP"