Android的 - 如何通过一个过程跟踪带宽使用率?使用率、带宽、过程、Android

由网友(钻石的心心i)分享简介:我可以跟踪通过 android.net.TrafficStats Android设备的整体和每个UID(应用程序)带宽的使用。然而,一个UID可以执行多个二进制文件来调用多个进程。I can track the overall and per uid (application) bandwidth usage of...

我可以跟踪通过 android.net.TrafficStats Android设备的整体和每个UID(应用程序)带宽的使用。然而,一个UID可以执行多个二进制文件来调用多个进程。

I can track the overall and per uid (application) bandwidth usage of Android device by android.net.TrafficStats. However a uid can execute more than one binaries to invoke more than one processes.

我想知道是否有任何方法或方式每个进程的带宽使用就搞定了,这样我就可以追溯到启动到Internet的连接二进制文件。

I want to know if there is any method or way to get per process bandwidth usage, so that I can trace back the binary that starts the connection to the Internet.

推荐答案

您可能想看看 nethogs 以及其源$ C为Linux $ C 。由于Android在基于Linux内核的,我相信你能以类似的方式实现它。

You may want to have a look at nethogs and its source code for Linux. As Android in built on Linux kernel, I believe that you can implement it in a similar way.

阅读全文

相关推荐

最新文章