惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Heimdal Security Blog
A
Arctic Wolf
K
Kaspersky official blog
V
Vulnerabilities – Threatpost
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
L
LINUX DO - 热门话题
MongoDB | Blog
MongoDB | Blog
T
Threat Research - Cisco Blogs
D
Docker
爱范儿
爱范儿
T
Tenable Blog
C
Check Point Blog
B
Blog
C
Cisco Blogs
Vercel News
Vercel News
The Cloudflare Blog
T
Threatpost
NISL@THU
NISL@THU
T
Tor Project blog
V2EX - 技术
V2EX - 技术
P
Palo Alto Networks Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Tailwind CSS Blog
G
GRAHAM CLULEY
P
Privacy & Cybersecurity Law Blog
SecWiki News
SecWiki News
博客园 - 司徒正美
S
Security @ Cisco Blogs
GbyAI
GbyAI
S
Secure Thoughts
Microsoft Security Blog
Microsoft Security Blog
The Register - Security
The Register - Security
Recorded Future
Recorded Future
Cloudbric
Cloudbric
Webroot Blog
Webroot Blog
N
News and Events Feed by Topic
Y
Y Combinator Blog
博客园_首页
T
Troy Hunt's Blog
The Hacker News
The Hacker News
雷峰网
雷峰网
Google DeepMind News
Google DeepMind News
U
Unit 42
AWS News Blog
AWS News Blog
PCI Perspectives
PCI Perspectives
V
Visual Studio Blog
博客园 - 聂微东
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell

博客园 - 陳龑

怎么把网站全站变黑白(如地震哀悼网站变黑白), 要兼容所有主流浏览器 学习新技术的 10 个建议 解决 PHP Fatal error: Call-time pass-by-reference has been removed mysql下float类型使用一些误差详解 Page类与Control类的生命周期(life cycle)比较总结[转] WCF中的Dispose[转] 面向程序员的数据库访问性能优化法则 http https无缝切换 ADO.NET 的最佳实践技巧 模板引擎的一种实现 虚拟主机时常出现MAC验证失败错误之解决方法(转) 转载 软件架构师应该具备的素质(Enterprise Solution Architects and Leadership) asp.net Cookies 转码的问题 中文丢失 - 陳龑 .NET面试题,看看你的水平[转] - 陳龑 - 博客园 js在firefox中的问题 - 陳龑 - 博客园 静态构造函数 “提高一下dotnet程序的效率一”中关于exception的问题 在VS2005中使用原来的IIS调试Web程序(像VS2003一样) 用正则表达式提取url中的Querystring参数 - 陳龑 - 博客园
windows 如何查看端口占用情况
陳龑 · 2014-02-22 · via 博客园 - 陳龑

开始--运行--cmd 进入命令提示符 输入netstat -ano 即可看到所有连接的PID 之后在任务管理器中找到这个PID所对应的程序如果任务管理器中没有PID这一项,可以在任务管理器中选"查看"-"选择列" 

        经常,我们在启动应用的时候发现系统需要的端口被别的程序占用,如何知道谁占有了我们需要的端口,很多人都比较头疼,下面就介绍一种非常简单的方法,希望对大家有用 

假如我们需要确定谁占用了我们的9050端口 

1、Windows平台 
在windows命令行窗口下执行: 
1.查看所有的端口占用情况

C:\>netstat -ano

  协议    本地地址                     外部地址               状态                   PID

  TCP    127.0.0.1:1434         0.0.0.0:0              LISTENING       3236
  TCP    127.0.0.1:5679         0.0.0.0:0              LISTENING       4168
  TCP    127.0.0.1:7438         0.0.0.0:0              LISTENING       4168
  TCP    127.0.0.1:8015         0.0.0.0:0              LISTENING       1456
  TCP    192.168.3.230:139      0.0.0.0:0              LISTENING       4
  TCP    192.168.3.230:1957     220.181.31.225:443     ESTABLISHED     3068
  TCP    192.168.3.230:2020     183.62.96.189:1522     ESTABLISHED     1456
  TCP    192.168.3.230:2927     117.79.91.18:80        ESTABLISHED     4732
  TCP    192.168.3.230:2929     117.79.91.18:80        ESTABLISHED     4732
  TCP    192.168.3.230:2930     117.79.91.18:80        ESTABLISHED     4732
  TCP    192.168.3.230:2931     117.79.91.18:80        ESTABLISHED     4732

2.查看指定端口的占用情况
C:\>netstat -aon|findstr "9050"

  协议    本地地址                     外部地址               状态                   PID

  TCP    127.0.0.1:9050         0.0.0.0:0              LISTENING       2016

P: 看到了吗,端口被进程号为2016的进程占用,继续执行下面命令: (也可以去任务管理器中查看pid对应的进程)

3.查看PID对应的进程
C:\>tasklist|findstr "2016"

 映像名称                       PID 会话名              会话#       内存使用
 ========================= ======== ================
  tor.exe                     2016 Console                 0     16,064 K 

P:很清楚吧,tor占用了你的端口。

4.结束该进程

C:\>taskkill /f /t /im tor.exe