如何在windows中找到进程持有的套接字列表? [英] How to find a list of sockets held by a process in windows?

查看:37
本文介绍了如何在windows中找到进程持有的套接字列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 .Net 应用程序,它维护一个套接字池以重用它们.怀疑它可能持有太多这些套接字而不释放它们.有没有办法在 Windows 中找到应用程序持有的套接字句柄的数量?

I have a .Net application that maintains a socket pool to reuse them. It is suspected that it might be holding too many of those sockets without releasing them. Is there a way to find the number of socket handles the application is holding to in Windows?

推荐答案

从提升的(管理员)命令提示符键入 netstat -a -o -n -b.

Type netstat -a -o -n -b from an elevated (admin) command prompt.

-b 是显示创建每个连接或监听端口所涉及的可执行文件.有关所有选项的列表,请参阅 netstat --help.

-b is to display the executable involved in creating each connection or listening port. See netstat --help for a list of all options.

这篇关于如何在windows中找到进程持有的套接字列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆