traffic bytes
/proc/net/tx_qtaguid/iface_stat_fmt
/proc/net/xt_qtaguid/stats
1.
framework/base/core/java/android/net/TrafficStats.java
getMobileTxPackets()
getMobileRxPackets()
getMobileTxBytes()
getMobileRxBytes()
getUidTcpTxBytes()
......
getUidUdpRxBytes()
......
2.
framework/base/core/jni/android_net_TrafficStats.cpp
inferface:
getStatsType
parseIfaceStats
parseUidStats
getTotalStat
getIfaceStat
getUidStat
-----------------------------------------
shell@android:/proc/net/xt_qtaguid # cat stats
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
2 rmnet1 0x0 10036 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3 rmnet1 0x0 10036 1 2514 55 88883 72 2514 55 0 0 0 0 88883 72 0 0 0 0
4 rmnet0 0x0 0 0 36011 202 30925 422 17380 138 18631 64 0 0 5138 102 19142 298 6645 22
5 rmnet0 0x0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
6 rmnet0 0x0 1000 0 0 0 1520 20 0 0 0 0 0 0 0 0 1520 20 0 0
7 rmnet0 0x0 1000 1 0 0 456 6 0 0 0 0 0 0 0 0 456 6 0 0
8 rmnet0 0x0 10011 0 95885 183 21879 256 95642 182 243 1 0 0 21631 252 248 4 0 0
9 rmnet0 0x0 10011 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
10 rmnet0 0x0 10060 0 4702 75 7612 114 4702 75 0 0 0 0 7612 114 0 0 0 0
11 rmnet0 0x0 10060 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12 rmnet0 0x0 10061 0 1687 15 4549 61 681 12 1006 3 0 0 1525 19 3024 42 0 0
13 rmnet0 0x0 10061 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
14 rmnet0 0x0 10062 0 3905 34 4796 62 2950 31 955 3 0 0 3296 38 1500 24 0 0
15 rmnet0 0x0 10062 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
16 rmnet0 0x0 10065 0 32915 130 21263 206 32615 129 300 1 0 0 19126 175 2137 31 0 0
17 rmnet0 0x0 10065 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
18 rmnet0 0x0 10066 0 1436 6 1693 15 1436 6 0 0 0 0 1165 7 528 8 0 0
19 rmnet0 0x0 10066 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
20 rmnet0 0x0 10068 0 10034 232 24889 516 10034 232 0 0 0 0 23913 500 976 16 0 0
21 rmnet0 0x0 10068 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
22 rmnet0 0x0 10069 0 16117 98 20382 148 16117 98 0 0 0 0 20382 148 0 0 0 0
23 rmnet0 0x0 10069 1 8228 13 1592 15 8228 13 0 0 0 0 1592 15 0 0 0 0
24 rmnet0 0x0 10070 0 107977 388 104132 473 106713 385 1264 3 0 0 103316 460 816 13 0 0
25 rmnet0 0x0 10070 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
26 rmnet0 0x0 10073 0 4716 39 4586 62 3648 37 1068 2 0 0 3816 51 770 11 0 0
27 rmnet0 0x0 10073 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
28 rmnet0 0x0 10075 0 1928 9 1647 15 1928 9 0 0 0 0 1647 15 0 0 0 0
29 rmnet0 0x0 10075 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
30 rmnet0 0x0 10080 0 5076 10 1852 28 5076 10 0 0 0 0 844 12 1008 16 0 0
31 rmnet0 0x0 10080 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
32 wlan0 0x0 0 0 98569 945 37686 682 35465 617 62936 326 168 2 16272 342 17462 279 3952 61
33 wlan0 0x0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
34 wlan0 0x0 1000 0 3412 42 6064 76 3260 40 152 2 0 0 4240 52 1824 24 0 0
35 wlan0 0x0 1000 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
36 wlan0 0x0 10011 0 133072 463 49036 508 133072 463 0 0 0 0 49036 508 0 0 0 0
37 wlan0 0x0 10011 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
38 wlan0 0x0 10060 0 19262959 17450 819558 16711 19262959 17450 0 0 0 0 819558 16711 0 0 0 0
39 wlan0 0x0 10060 1 28345257 26076 1511957 26206 28345257 26076 0 0 0 0 1511957 26206 0 0 0 0
40 wlan0 0x0 10061 0 4004 47 5180 58 2160 37 1844 10 0 0 4460 48 720 10 0 0
41 wlan0 0x0 10061 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
42 wlan0 0x0 10062 0 6036 67 8786 86 6036 67 0 0 0 0 8786 86 0 0 0 0
43 wlan0 0x0 10062 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
44 wlan0 0x0 10064 0 5556 13 1580 15 5556 13 0 0 0 0 1580 15 0 0 0 0
45 wlan0 0x0 10064 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
46 wlan0 0x0 10065 0 100516 483 71047 657 100516 483 0 0 0 0 71047 657 0 0 0 0
47 wlan0 0x0 10065 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
48 wlan0 0x0 10066 0 5513 26 8647 45 5513 26 0 0 0 0 8647 45 0 0 0 0
49 wlan0 0x0 10066 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
50 wlan0 0x0 10068 0 5644 100 6300 116 5644 100 0 0 0 0 6300 116 0 0 0 0
51 wlan0 0x0 10068 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
52 wlan0 0x0 10069 0 240113 490 63964 588 240113 490 0 0 0 0 63964 588 0 0 0 0
53 wlan0 0x0 10069 1 7529610 6734 444045 6967 7529610 6734 0 0 0 0 444045 6967 0 0 0 0
54 wlan0 0x0 10070 0 268545 855 207188 1048 268545 855 0 0 0 0 207188 1048 0 0 0 0
55 wlan0 0x0 10070 1 133973 597 548251 684 133973 597 0 0 0 0 548251 684 0 0 0 0
56 wlan0 0x0 10073 0 9379 98 10266 130 9379 98 0 0 0 0 10266 130 0 0 0 0
57 wlan0 0x0 10073 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
58 wlan0 0x0 10075 0 18590 100 15625 141 18590 100 0 0 0 0 15625 141 0 0 0 0
59 wlan0 0x0 10075 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
60 wlan0 0x0 10080 0 10524 24 1967 33 10524 24 0 0 0 0 1967 33 0 0 0 0
61 wlan0 0x0 10080 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
62 wlan0 0xdc4e7700000000 10011 0 5299 11 1672 14 5299 11 0 0 0 0 1672 14 0 0 0 0
63 wlan0 0xdc4e7700000000 10011 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
64 wlan0 0x30b75e1c00000000 10011 0 0 0 240 4 0 0 0 0 0 0 240 4 0 0 0 0
65 wlan0 0x30b75e1c00000000 10011 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0