如何获取特定进程的网络使用? [英] How Can I Get Network Usage Of Specific Process?

查看:128
本文介绍了如何获取特定进程的网络使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。



我想获得特定流程的网络使用情况。



我是搜索了许多论坛,但他们只是说使用WMI。



所以我找到了WMI界面。



我认为Win32_PerfRawData_PerfProc_Process将提供资源信息每个进程。



但我还有疑问。



资源信息 网络使用是什么?



一些资源信息描述这意味着....包括文件,网络和设备I / O



但这些不仅仅适用于网络。



所以,我不能用这些。







请给我你的建议。



如何获得特定进程的网络使用?

Hello.

I want to get network usage of specific process.

I've searched many forums but they just said "using WMI".

So i find WMI interface.

I think "Win32_PerfRawData_PerfProc_Process" will be provide resource information each process.

But still i have question.

What is network usage from that resource information?

Some resource information describes "this means .... including file, network, and device I/Os"

But these are not only for network.

So, i can't use these.



Please give me your advise.

How can i get network usage of specific process?

推荐答案

您可以使用netstat程序:

You can use the netstat program:
netstat -b // Will give you the process involved in each connection
netstat -? // Will give you all possible options for the netstat console



从输出中您将能够获得每个连接的进程(进程名称在括号之间,易于得到一个简单的正则表达式。)


From the output you will be able to get the process for each connection (process name is between brackets, easy to get with a simple regular expression).


这篇关于如何获取特定进程的网络使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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