android - 解读Android xt_qtaguid/stats

标签 android cmd adb netstat

我有一个关于 Android 的网络统计及其报告方式的快速问题。

通过在 cmd 中运行此代码:adb shell cat proc/net/xt_qtaguid/stats > C:\netstats.txt"

我得到一个看起来或多或少像这样的文件(为了提问我截取了一些 fragment ):

idx iface acct_tag_hex uid_tag_int cnt_set rx_bytes rx_packets tx_bytes tx_packets rx_tcp_bytes rx_tcp_packets rx_udp_bytes rx_udp_packets rx_other_bytes rx_other_packets tx_tcp_bytes tx_tcp_packets tx_udp_bytes tx_udp_packets tx_other_bytes tx_other_packets  
44 wlan0 0x0 10123 0 45148 186 32150 265 45148 186 0 0 0 0 32150 265 0 0 0 0
45 wlan0 0x0 10123 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
46 wlan0 0x0 10138 0 19775 84 13625 129 19775 84 0 0 0 0 13625 129 0 0 0 0
47 wlan0 0x0 10138 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
48 wlan0 0x0 10142 0 36422 67 43115 105 36070 64 352 3 0 0 42467 96 648 9 0 0
49 wlan0 0x0 10142 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
50 wlan0 0x300000000 10123 0 7765 35 4820 44 7765 35 0 0 0 0 4820 44 0 0 0 0
51 wlan0 0x300000000 10123 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
52 wlan0 0x3f500000000 10096 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
53 wlan0 0x3f500000000 10096 1 2937868 2025 32034 747 2937868 2025 0 0 0 0 32034 747 0 0 0 
54 wlan0 0xdc4e7700000000 10022 0 31623 75 18611 106 31623 75 0 0 0 0 18611 106 0 0 0 0
55 wlan0 0xdc4e7700000000 10022 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
56 wlan0 0x1000000100000000 10123 0 21864 116 18225 145 21864 116 0 0 0 0 18225 145 0 0 0 0
57 wlan0 0x1000000100000000 10123 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
61 wlan0 0x1010000000000000 10045 1 33010 109 27695 113 33010 109 0 0 0 0 27695 113 0 0 0 0
62 wlan0 0x1100000000000000 10046 0 6804 14 2064 19 6804 14 0 0 0 0 2064 19 0 0 0 0
63 wlan0 0x1100000000000000 10046 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
64 wlan0 0x1144000400000000 10022 0 2532 5 1860 6 2532 5 0 0 0 0 1860 6 0 0 0 0
65 wlan0 0x1144000400000000 10022 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
66 wlan0 0x1244000400000000 10022 0 8197 14 3134 20 8197 14 0 0 0 0 3134 20 0 0 0 0
67 wlan0 0x1244000400000000 10022 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
68 wlan0 0xffffff0100000000 10045 0 8566814 6535 159315 2688 8566814 6535 0 0 0 0 159315 2688 0 0 0 0
69 wlan0 0xffffff0100000000 10045 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

我知道它由 UID 的(10123、10138、10142 等)分解,但我无法弄清楚 cnt_set 是什么(为什么每个UID 分为 0 或 1),acct_tag_hex 是什么(我唯一的猜测是它表示不同的线程或套接字)?

如果有人能给我一些关于这两件事的基本含义,我将不胜感激。

谢谢-Z

最佳答案

acct_tag_hex 是套接字标签

带有cnt_set==0的行用于后台数据

带有cnt_set==1的行用于前台数据

总流量是两者的总和

关于android - 解读Android xt_qtaguid/stats,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15163549/

相关文章:

java - Android SQLite COLLATE NOCASE 语法错误

java - 从 json 获取数据并抛出 org.json.JSONException

android - 使用 ksoap 访问 .Net Web 服务时遇到问题

android - 从亚行发起youtube搜索

java - 安卓ndk : Problem for call of Java method from c++ with jni

python-3.x - 如果我在 .pyw 代码中使用 os.system,有没有办法使 exe 文件不打开命令提示符?

windows - 无法在 Atom、app 或 cmd 中安装包

batch-file - 如何在没有外部工具的情况下在命令提示符下创建唯一的临时文件路径?

Android adb (OSX Lion) 无法识别 Galaxy Nexus、Jelly Bean

java - 以编程方式运行 adb 命令时出现异常