network-traffic

How to get the GPRS Mobile data usage for 1 month?

若如初见. 提交于 2020-01-23 06:41:26
问题 I have searched a lot about this. Found the same code everywhere which solves the purpose partially. As API documentation says, it reset the counter once the device restarts. Sometimes the counter just resets even without the restart. Below is the code float totalRxBytes = (float)TrafficStats.getTotalRxBytes()/(float)1048576; // Received float totalTxBytes = (float)TrafficStats.getTotalTxBytes()/(float)1048576; // Sent float mobRxBytes = (float)TrafficStats.getMobileRxBytes()/(float)1048576;

Scapy and tcpreplay: bypass temporary file for performance

北慕城南 提交于 2019-12-20 00:42:46
问题 Scapy has a sendpfast function that sends packets using tcpreplay. However, this function first creates a temporary pcap file and then calls tcpreplay on that. This adds too much delay. Is there anyway to bypass it and directly send data to tcpreplay. I know that tcpreplay can read data from STDIN. Context: I want to generate large traffic (with different srcIP) every second and send it through network. One option is to save all traffic with timestamps in a giant pcap file and run tcpreplay.

Are there any programs that can simulate an unstable network connection? [closed]

泪湿孤枕 提交于 2019-12-18 19:22:37
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . We need to simulate an unstable network connection to try to debug some connectivity issues in our server/client application and I was wondering if there are any programs out there that can simulate those conditions such as on a faint wireless network. I'm not just referring to reducing bandwidth, but also

Android programmatically get data usage for specific app, for example: Data Usage used on “Facebook”

亡梦爱人 提交于 2019-12-18 17:24:09
问题 I would like to categorize the data usage by: OS ------60% (300MB used so far) Music ------ 10% (50MB used so far) Facebook -----5% (25MB used so far) Anyone can help me in solving this Android programming as I am a beginner of Android development and would like to develop a mobile network monitor app currently. I would like to get the data usage by specifying the app name. Thank you. Hope to hear from you all. 回答1: Use http://developer.android.com/reference/android/net/TrafficStats.html

EC2 instance types's exact network performance?

懵懂的女人 提交于 2019-12-17 07:58:45
问题 I cannot find exact network performance details for different EC2 instance types on Amazon. Instead, they are only saying: High Moderate Low What does this even mean? I especially want to know the exact amount of Traffic-OUT on each instance type. I need to do live streaming and my stream bit rate will be 240kbps. So I need to know which instance type can handle how many concurrent viewers. 回答1: Bandwidth is tiered by instance size, here's a comprehensive answer: For t2/m3/c3/c4/r3/i2/d2

Get UDP connection statistics from IP Helper API (iphlpapi.dll)

只愿长相守 提交于 2019-12-12 19:18:16
问题 I would like to count the bytes received and sent from specific UDP connections in Windows 10. This answer lists an approach to count bytes for specific TCP connections using GetPerTcpConnectionEStats() from the IP Helper API ( iphlpapi.dll ). I would like to mirror this approach for UDP connections. The IP Helper API provides UDP and TCP implementations for almost all functions (e.g., GetTcpTable() , GetUdpTable() ), except the documentation does not list GetPerUdpConnectionEStats() . This

Using tc tbf on veth to limit ingress bandwidth works, but I don't know the detail

心已入冬 提交于 2019-12-12 17:53:14
问题 I found the Docker container's veth on the host, and used the following command to limit the ingress bandwidth of the container. tc qdisc add dev veth root tbf rate 200mbit latency 50ms burst 800000 It works. However, I have another container, both of them are having heavy ingress traffic. My NIC's capacity is 1000m. As I understand, the ingress traffic goes to docker0 bridge first, and then goes into veth then leaves through the peer inside the container(net namespace). I assume there will

How to capture the network traffic using python [closed]

末鹿安然 提交于 2019-12-09 05:15:39
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I am using python and attempting to scrape the HTTP(s) traffic between my computer and a site, which would include all incoming and outgoing requests,responses, such as images and external calls, etc. I have attempted to find the network traffic within my hit_site function, but I