How to find a list of sockets held by a process in windows?

后端 未结 2 698
北海茫月
北海茫月 2021-02-02 09:10

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 t

相关标签:
2条回答
  • 2021-02-02 09:46

    I like TCPView from SysInternals: http://technet.microsoft.com/en-us/sysinternals/bb897437 Good for lots of other things too, but to check your own process out, just find it in the list and look at the sockets it has open, addresses they are bound to, etc. You can also watch the dynamic pattern of your processes socket usage.

    0 讨论(0)
  • 2021-02-02 10:03

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

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

    0 讨论(0)
提交回复
热议问题