Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interpreting Android xt_qtaguid/stats

I have a quick question on Android's netstats and how they are reported.

by running this code in cmd: adb shell cat proc/net/xt_qtaguid/stats > C:\netstats.txt"

I get a file that looks more or less like this (I took snippets for sake of questions):

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

I know that it is broken down by UID's (10123,10138,10142,etc.) but what I cant figure out is what the cnt_set is (why each UID is broken up into either 0 or 1) and what acct_tag_hex is (my only guess is that it means a different thread or socket)?

If anyone could give me some basic insight on what those two things mean, I would greatly appreciate it.

Thanks -Z

like image 877
Nefariis Avatar asked Mar 01 '13 17:03

Nefariis


1 Answers

acct_tag_hex is a socket tag

Lines with cnt_set==0 are for background data

Lines with cnt_set==1 are for foreground data

Total traffic is a sum of both

like image 79
Alex P. Avatar answered Oct 08 '22 13:10

Alex P.