traffic

How to get the correct number of bytes sent and received in TrafficStats?

北战南征 提交于 2019-11-28 19:43:02
My app is trying to count the number of bytes send and received over WiFi/LAN and mobile data connections. To do that, I get the values of TrafficStats counters at one point in time and subtract that from its values the next time I check. // get current values of counters long currentMobileTxBytes = TrafficStats.getMobileTxBytes(); long currentMobileRxBytes = TrafficStats.getMobileRxBytes(); long totalTxBytes = TrafficStats.getTotalTxBytes(); long totalRxBytes = TrafficStats.getTotalRxBytes(); // to get mobile data count, subtract old from current long currentMobileSent = currentMobileTxBytes

android statistic 3g traffic for each APP, how?

我只是一个虾纸丫 提交于 2019-11-28 18:24:53
For statistic network traffic per APP, what I'm using now is Android TrafficStats That I can get result like following : Youtube 50.30 MBytes Facebook 21.39 MBytes Google Play 103.38 MBytes (and more...) As I know, the "Android Trafficstats" just a native pointer to a c file. (maybe an .so ?) But it mixed Wifi & 3g traffic, is there any way to only get non-WiFi traffic statistic ? RRTW Evening all, I got some way to do that... First I have to create a class which extends BroadcasrReceiver, like this: Manifest definition: <receiver android:name=".core.CoreReceiver" android:enabled="true"

Duplicate TCP traffic with a proxy

自作多情 提交于 2019-11-28 04:58:32
I need to send (duplicate) traffic from one machine (port) and to two different machines (ports). I need to take care of TCP session as well. In the beginnig I used em-proxy , but it seems to me that the overhead is quite large (it goes over 50% of cpu). Then I installed haproxy and I managed to redirect traffic (not to duplicate). The overhead is reasonable (less than 5%). The problem is that I could not say in haproxy config file the following: - listen on specific address:port and whatever you find send on the two different machines:ports and discard the answers from one of them. Em-proxy

OpenCV speed traffic sign detection

允我心安 提交于 2019-11-27 21:54:13
问题 I have a problem detecting speed traffic signs with opencv 2.4 for Android. I do the following: "capture frame -> convert it to HSV -> extract red areas -> detect signs with ellipse detection" So far ellipse detection works perfect as long as picture is good quality. But as you see in pictures bellow, that red extraction does not work OK, because of poor quality of picture frames, by my opinion. Converting original image to HSV: Imgproc.cvtColor(this.source, this.source, Imgproc.COLOR_RGB2HSV

How to get the correct number of bytes sent and received in TrafficStats?

夙愿已清 提交于 2019-11-27 11:46:09
问题 My app is trying to count the number of bytes send and received over WiFi/LAN and mobile data connections. To do that, I get the values of TrafficStats counters at one point in time and subtract that from its values the next time I check. // get current values of counters long currentMobileTxBytes = TrafficStats.getMobileTxBytes(); long currentMobileRxBytes = TrafficStats.getMobileRxBytes(); long totalTxBytes = TrafficStats.getTotalTxBytes(); long totalRxBytes = TrafficStats.getTotalRxBytes()

android statistic 3g traffic for each APP, how?

被刻印的时光 ゝ 提交于 2019-11-27 11:32:51
问题 For statistic network traffic per APP, what I'm using now is Android TrafficStats That I can get result like following : Youtube 50.30 MBytes Facebook 21.39 MBytes Google Play 103.38 MBytes (and more...) As I know, the "Android Trafficstats" just a native pointer to a c file. (maybe an .so ?) But it mixed Wifi & 3g traffic, is there any way to only get non-WiFi traffic statistic ? 回答1: Evening all, I got some way to do that... First I have to create a class which extends BroadcasrReceiver,

Duplicate TCP traffic with a proxy

守給你的承諾、 提交于 2019-11-27 05:28:32
问题 I need to send (duplicate) traffic from one machine (port) and to two different machines (ports). I need to take care of TCP session as well. In the beginnig I used em-proxy, but it seems to me that the overhead is quite large (it goes over 50% of cpu). Then I installed haproxy and I managed to redirect traffic (not to duplicate). The overhead is reasonable (less than 5%). The problem is that I could not say in haproxy config file the following: - listen on specific address:port and whatever

QOS限速

青春壹個敷衍的年華 提交于 2019-11-26 20:10:21
XX涉及的QOS限速主要有两种: 第一种是针对一个端口下双向IP互访; 第二种是针对多个端口下双向IP互访;(聚合car) 聚合car: 是指能够对多个业务使用同一个car进行流量监控,即如果多个端口应用同一个聚合CAR,则这多个端口的流量之和必须在此聚合CAR设定的流量监管范围之内。 总部与分部之间为20M专线。现要求:分支10.2.2.0/24和总部10.4.4.0/24为重要业务,要保障带宽10M;10.1.1.0/24和10.3.3.0/24互访限制5M 分支MSR: 流定义: acl advanced 3000 rule 0 permit ip source 10.1.1.0 0.0.0.255 destination 10.3.3.0 0.0.0.255 acl advanced 3001 rule 0 permit ip source 10.2.2.0 0.0.0.255 destination 10.4.4.0 0.0.0.255 traffic classifier 10M operator and if-match acl 3001 traffic classifier 5M operator and if-match acl 3000 流行为: traffic behavior 10M queue ef bandwidth 1024 traffic

Basic F5 LTM HTTP Load Balance Configuration (With Firewall)

◇◆丶佛笑我妖孽 提交于 2019-11-26 16:24:05
The BIG-IP® local traffic management system is specifically designed to manage your local network traffic. Local traffic management refers to the process of managing network traffic that comes into or goes out of a local area network (LAN), including an intranet. A commonly-used feature of the BIG-IP system is its ability to intercept and redirect incoming network traffic, for the purpose of intelligently tuning the load on network servers. However, tuning server load is not the only type of local traffic management. The BIG-IP system includes a variety of features that perform functions such

Gartner Magic Quadrant for WAN Optimization (2016, 2015, 2014, 2013, 2012, 2011)

爱⌒轻易说出口 提交于 2019-11-26 16:20:43
WAN optimization provides a range of features to: (1) improve the performance of applications running across the WAN; and (2) reduce the cost of the WAN. The range and scope of features supported by WAN optimization solutions continue to evolve, typically in support of three high-level needs: Improve the response times as experienced by users of business-critical applications over WAN links or mobile connections, often addressing application performance problems caused by bandwidth constraints, latency or protocol limitations. Assist in maximizing the ROI for WAN bandwidth, and delay costly