bandwidth

Get the current bandwidth use in Linux with PHP

雨燕双飞 提交于 2019-12-04 09:04:07
I have a server with OpenVZ installed and virtual machines with a public IPv4 for every machine. I need to get the bandwidth usage of each separate virtual machine (mbps or kbps) from PHP. My idea is to install iftop on the host machine and run it from PHP function exec(), the command "iftop -n -F AA.BB.CC.DD/32". The problem is that is an application iftop "top" style, and is made to run on a real terminal and is updated with new data. I can not install anything on the VMs, should be clean. Nor has a network interface each VM and I can not change it. I wonder what other options I have or how

How can I get the current network interface throughput statistics on Linux/UNIX? [closed]

杀马特。学长 韩版系。学妹 提交于 2019-12-04 07:21:18
问题 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 4 years ago . Tools such as MRTG provide network throughput / bandwidth graphs for the current network utilisation on specific interfaces, such as eth0. How can I return that information at the command line on Linux/UNIX? Preferably this would be without installing anything other than what is available on the system as

Simple bandwidth / latency test to estimate a users experience

怎甘沉沦 提交于 2019-12-04 07:05:47
I write web based applications. Performance is obviously a key factor. Whilst database load and page rendering time are things I have control of, the users internet connection is not. What I'm looking for is a way to indicate what sort of a connection a user has. Something along the lines of a traffic light in the corner of a website that shows the user what sort of a connection they have to the site and therefore indicating what sort of perceived performance they should expect. e.g. Maybe the app just seems slow because everyone else in your company is browsing facebook on their lunch hour.

UDPclient rate control in c#

孤街浪徒 提交于 2019-12-04 02:31:49
问题 Im sending multiple udp packets consecutively to a remote pc. the problem is, if the amount of data is too high, some device somewhere between the channel experience buffer overflow. i intent to limit/throttle/control sending rate of the udp packets. can somebody give me some guide on how to find the optimal rate sending interval? By the way, please stop suggesting tcp over udp. the objective is not to send data reliably, but to measure maximum throughput. 回答1: Trial and error. Point. Make up

what's the correct and most efficient way to use mapped(zero-copy) memory mechanism in Nvidia OpenCL environment?

∥☆過路亽.° 提交于 2019-12-03 22:21:22
Nvidia has offered an example about how to profile bandwidth between Host and Device, you can find codes here: https://developer.nvidia.com/opencl (search "bandwidth"). The experiment is carried on in an Ubuntu 12.04 64-bits computer. I am inspecting pinned memory and mapped accessing mode, which can be tested by invoke: ./bandwidthtest --memory=pinned --access=mapped The core test loop on Host-to-Device bandwidth is at around line 736~748. I also list them here and add some comments and context code: //create a buffer cmPinnedData in host cmPinnedData = clCreateBuffer(cxGPUContext, CL_MEM

How does persistent tcp/ip connections preserve battery and lower bandwidth usage?

狂风中的少年 提交于 2019-12-03 17:08:05
In push notification mechanisms, like Apple's Push Notification Service, they use persistent IP connections. My question is, how does employing persistent connections save battery and bandwidth of a device? I am under the impression that since the connection is persistent, then the device always uses the WiFi or 3G/LTE radio. I know that through persistent connections, you will not waste bandwidth by not asking the server for changes when there is none, and instead the server will "push" to you these changes. But, I don't see how that preserves battery and bandwidth (since you have an always

Is it possible for me to do the performance testing in localhost with actual network environment?

若如初见. 提交于 2019-12-03 16:39:24
I need to test the performance of application running on localhost as if it were in the online environment. I mean the performance test conducted by the network traffic simulation, limited bandwidth simulation, or other parameter as if it were online. Could Apache Ab do the simulation? We've used Charles and Firefox Throttle in the past to simulate slow networks. Yes, but you will need to connect to your application by IP address, not "localhost" or 127.0.0.1. Typically for web applications (HTTP) I use Fiddler which can simulate limited bandwidth, but only if you connect as I have noted.

Checking someones bandwidth and loading content based on it

江枫思渺然 提交于 2019-12-03 14:04:50
I have seen a number of questions that don't answer this, is it possible to check someones bandwidth using java script and load specific content based on it? The BBC seem to give me low quality images when using my mobile and in the middle of nowhere. by the looks of this this cool service does this and its a CDN so it could be server side. http://www.resrc.it/docs/ Does anyone know how they do it? or how I could do it using asp.net or javascript, or an community opensource plug in. I think it may be possible with https://github.com/yahoo/boomerang/ but not sure this is its true purpose.

Programmatic resource monitoring per process in Linux

◇◆丶佛笑我妖孽 提交于 2019-12-03 13:56:46
I want to know if there is an efficient solution to monitor a process resource consumption (cpu, memory, network bandwidth) in Linux. I want to write a daemon in C++ that does this monitoring for some given PIDs. From what I know, the classic solution is to periodically read the information from /proc, but this doesn't seem the most efficient way (it involves many system calls). For example to monitor the memory usage every second for 50 processes, I have to open, read and close 50 files (that means 150 system calls) every second from /proc. Not to mention the parsing involved when reading

Best way to simulate a WAN network

假如想象 提交于 2019-12-03 13:17:32
问题 Simplified, I have an application where data is intended to flow over the internet between two servers. Ideally, I'd like to test at what point the software ceases to function. At what lowerbound limit (bandwidth, latency, dropped packets) do things stop working to test the reliability of the software. What I thought I would do was the following: Setup up 3 machines (VMware instances) Install the 2 applications on two of the servers. Setup up the 3rd server to sit between the two machines by