列出进程及其连接
我想制作一个小程序,列出我的计算机上正在运行的程序 计算机 - 这看起来很简单。但我也想检测他们 连接,例如:我检测到正在运行的 Internet Explorer(或其他 浏览器),但我想知道它正在访问哪些网站。 另一个例子;我检测到 Word 正在运行,并且想知道是什么 它正在使用的文档。是否可以查询http- 发现在线连接的协议?那么那些程序怎么样呢? 打开本地资源?因此,列出正在运行的程序及其 连接是我想做的 - 我是否必须每分钟轮询一次还是 有更好的方法来观察这些过程吗?
它必须能够在 MS Windows 上运行,但编程语言并不重要
Thanx
Ask
I would like to make a small program listing running programs on my
computer - this seems simple. But I would also like to detect their
connections, ex.: I detect a running Internet Explorer (or other
browser), but I would like to know which websites it is visiting.
Another example; I detect Word is running, and would like to know what
document(s) it is working with. Is it possible to query the http-
protocol to discover online connections? And how about programs that
open local resources? So, listing running programs and their
connections is what I want to do - and do I have to poll for it every minute or is
there better ways of watching these processes?
It must be able to run on MS Windows, but the programminglanguage is not important
Thanx
Ask
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能需要考虑一些能够执行此操作的现有工具。 Windows NT 和大多数 Unix 都带有“netstat”命令。
Windows NT:netstat -b
Unix:netstat -p
You might want to consider some of the pre-existing tools capable of doing this. Both Windows NT and most Unixes come with the "netstat" command.
Windows NT: netstat -b
Unix: netstat -p
我喜欢使用进程监视器。在这里找到它:http://technet.microsoft.com/en-us/ sysinternals/bb896645.aspx
I like using Process Monitor. Find it here: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx