ndfred / iperf-ios Goto Github PK
View Code? Open in Web Editor NEWiPerf 3 library and app for iOS
License: Other
iPerf 3 library and app for iOS
License: Other
There are a few tricks on the iperf3 at 40Gbps and above page that could apply to tests on mobile devices too:
sendfile
(-Z) instead of read / write system calls might reduce CPU overhead (see disk testing)I am saddened that the program is in English only.
I suggest to localize the program.
I am ready to assist in the translation into Russian.
(For example, you can use the service Crowdin or any other. Crowdin is free for Open source projects.)
When i trying this code in xcode a code error IPFHelpViewController.h file is not found. how to resolve this error? and how to use c file in objective c?
As title, could we support UDP test in the future? That should useful test! Thanks!
This is what the logs look like:
Warning: Attempt to present <UIAlertController: 0x7fb9aa818e00> on <IPFTestRunnerViewController: 0x7fb9a9f10fa0> which is already presenting (null)`
iOS 12.4.8, iPad mini 2:
144 seconds cpu time over 16 seconds (900% cpu average), exceeding limit of 80% cpu over 180 seconds
Blocks #41.
A good iPerf testing article that goes into the different advanced options. Window size and UDP might be interesting to surface in the UI.
Ideally, jitter should be below 30ms. Packet loss should be no more than 1%, and network latency shouldn’t exceed 150 ms one-way (300 ms return).
Test run with 20 Mbits/s (but unidirectional and single stream) to match a FaceTime connection:
% iperf3 -uc 192.168.6.11 -b 20M
Connecting to host 192.168.6.11, port 5201
[ 5] local 192.168.6.60 port 53073 connected to 192.168.6.11 port 5201
[ ID] Interval Transfer Bitrate Total Datagrams
[ 5] 0.00-1.00 sec 2.38 MBytes 20.0 Mbits/sec 1726
[ 5] 1.00-2.00 sec 2.38 MBytes 20.0 Mbits/sec 1726
[ 5] 2.00-3.00 sec 2.38 MBytes 20.0 Mbits/sec 1727
[ 5] 3.00-4.00 sec 2.38 MBytes 20.0 Mbits/sec 1726
[ 5] 4.00-5.00 sec 2.38 MBytes 20.0 Mbits/sec 1727
[ 5] 5.00-6.00 sec 2.38 MBytes 20.0 Mbits/sec 1726
[ 5] 6.00-7.00 sec 2.38 MBytes 20.0 Mbits/sec 1727
[ 5] 7.00-8.00 sec 2.38 MBytes 20.0 Mbits/sec 1726
[ 5] 8.00-9.00 sec 2.38 MBytes 20.0 Mbits/sec 1727
[ 5] 9.00-10.00 sec 2.38 MBytes 20.0 Mbits/sec 1726
[ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams
[ 5] 0.00-10.00 sec 23.8 MBytes 20.0 Mbits/sec 0.000 ms 0/17264 (0%) sender
[ 5] 0.00-10.00 sec 23.8 MBytes 20.0 Mbits/sec 0.210 ms 0/17264 (0%) receiveriperf Done.
"Cannot connect to the server, please check that the server is running"
On Mac: Install iperf3 via Homebrew.
Start the server with iperf3 -s -D
.
Run iperf -c my-ip
.
All systems go!
With server still running, open the iperf3 app on iPhone
Type in my-ip
(the same one as the Mac)
ERROR: "Cannot connect to the server, please check that the server is running" error.
Am I testing this correctly, should I be using my wi-fi network IP? The IP that my iPhone shows for WiFI?
Nothing seems to work but, with not very much documentation, there's a chance I'm screwing something up.
Any help is appreciated. Thanks
I am integrating iperf in framework I am developing in objective c for iOS and macOS. After copying source files of iperf3.0 (c files), I am getting error on iOS/macOS system files like NSObject, AppKit.h etc. I am not sure what I am missing. But iperf files showing error for arm64 like in screenshot attached.
Universal Framework Minimum Target:
iOS: 11.0
macOS: 10.11
Shared code for iOS and macOS framework developed mainly in Objective C
Right now we only have the iperf license in the repo, look at it to see if it is compatible with App Store release and can cover the ObjC code as well, or pick another license.
As I mostly use the app to compare the speeds of the mobile operators I use, it would be really time-saving to have a option to switch between a test based von IPv4 and IPv6 as a transport protocol. Of course this only makes sense as long as a Hostname with IPv4 and IPv6 address is used for the test.
The CLI-based clients have a similar option while using the -4 and -6 flags and drop a error if the given server does not support IPv4 or IPv6 depending on the given flag.
Right now backgrounding the app or locking the phone will just freeze the application even if a test is running. If we end up supporting server mode, that won't run if the app is backgrounded. Adding the flag to prefer Wifi would also help with test reliability.
Hi Frédéric,
I'd like to help out with testing and work on the UI if needed. I'm a product designer and came across your really useful application! Let me know if and how I can help out.
Lars
Looking at send_results
we can see that the client will dump a lot of useful information to the server:
{
"cpu_util_total": 18.970173953262933,
"cpu_util_user": 3.7781612782127576,
"cpu_util_system": 15.191864176430617,
"sender_has_retransmits": -1,
"streams": [{
"id": 1,
"bytes": 155892352,
"retransmits": -1,
"jitter": 0,
"errors": 0,
"packets": 0,
"start_time": 0,
"end_time": 10.000098943710327
}, {
"id": 3,
"bytes": 140762448,
"retransmits": -1,
"jitter": 0,
"errors": 0,
"packets": 0,
"start_time": 0,
"end_time": 10.000101804733276
}, {
"id": 4,
"bytes": 153085904,
"retransmits": -1,
"jitter": 0,
"errors": 0,
"packets": 0,
"start_time": 0,
"end_time": 10.000101804733276
}, {
"id": 5,
"bytes": 108328960,
"retransmits": -1,
"jitter": 0,
"errors": 0,
"packets": 0,
"start_time": 0,
"end_time": 10.000102996826172
}, {
"id": 6,
"bytes": 146596688,
"retransmits": -1,
"jitter": 0,
"errors": 0,
"packets": 0,
"start_time": 0,
"end_time": 10.000102996826172
}]
}
Maybe we can pick some of these up to provide better data in the UI. For reference, this is what the same completed test looked like in the app:
I am using an Ipad pro running 14.4.1, connecting to a server running on a mac.
Transmit mode upload, streams 1, test duration 10s.
I click start and I get "unknown error 114 running the test". I try again and get the same error. I try again and this time no error.. I just get "..." displayed below.
I wait 10 seconds and nothing happens. I click "Stop", nothing happens.
The server logs indicate it's connecting, but almost nothing is sent:
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 128 KByte (default)
------------------------------------------------------------
[ 4] local 192.168.1.6 port 5001 connected with 192.168.1.123 port 52998 (peer 112.28467.27250-unk)
[ 5] local 192.168.1.6 port 5001 connected with 192.168.1.123 port 52999 (peer 98.30308.30839-unk)
[ 6] local 192.168.1.6 port 5001 connected with 192.168.1.123 port 53000
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-62.4 sec 37.0 Bytes 4.75 bits/sec
[ 5] 0.0-62.4 sec 37.0 Bytes 4.75 bits/sec
[ 6] 0.0-62.4 sec 37.0 Bytes 4.75 bits/sec
[SUM] 0.0-62.4 sec 111 Bytes 14.2 bits/sec
I also tried download, and I got error 114 6 times, and then the "..."
Use udp test to request jitter and lost data,what i can do?
The default server is a public one that is constantly busy, changing it to empty now that we have a help section will be less confusing
It would be great to be able to use the Shortcuts app to control iperf. It would then be possible to run tests automatically. For example, you could run a test daily or you could run a test when you connect to a new network or based on some other trigger like that.
Good suggestion from an App Store customer review, so we can tell whether we're on 5 GHz or 2.4 GHz. Not sure this is still available today, worth a look:
https://gist.github.com/ethanhuang13/8db697f8254f6f5dffe6d194e5078062
Feature request: display the current BSSID of my iOS device. That would be very useful for knowing on which device (eero in my case), and which band (2.4, 5.2,5.8 ghz) I am currently connected to. That is accessible on iOS because I can see it on another (great) app (Net Analyzer).
It would be nice to have a results list from previous runs show up so we can compare the results.
Also if we can tag each test run with a location (Mostly to compare with previous or to to understand blind spots etc) it would help I think.
I have a very barebones implementation here
deepumukundan@69b52d1 but it is in Swift. If you are open to having some Swift (Mostly for the UI part), I can polish up the code a bit and add a persistence via Core Data and create a PR back.
Hello, my name is Mingming Huang, Do you have a version of iperf2?
My Android version is Iperf2.You project version is Iperf3.
When running the iPerf3 test with the default configuration (5 streams and 30s) the test runs fine. However when I increase the duration to 5 min, the test eventually gives the error "Unknown error 116 running the test" for more than half of the test runs and does not complete. This happens whether in 'Upload' or 'Download' transmit mode.
Model Name: iPad (6th generation)
Software Version: iOS 14.3
iPerf 3 WiFi Speed Test Version: 3.6.11
Model Name: Synology VirtualDSM
CPU: INTEL Pentium N3710
DSM Version: DSM 6.2.3-25426 Update 3
Software Version: iperf 3.9 (cJSON 1.7.13)
admin@Demo-NAS:/$ iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from YY::YY:YY:YY:YY, port 57705
[ 5] local XX::XX:XX:XX:XX port 5201 connected to YY::YY:YY:YY:YY port 57706
[ 8] local XX::XX:XX:XX:XX port 5201 connected to YY::YY:YY:YY:YY port 57707
[ 10] local XX::XX:XX:XX:XX port 5201 connected to YY::YY:YY:YY:YY port 57708
[ 12] local XX::XX:XX:XX:XX port 5201 connected to YY::YY:YY:YY:YY port 57709
[ 14] local XX::XX:XX:XX:XX port 5201 connected to YY::YY:YY:YY:YY port 57710
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 9.85 MBytes 82.5 Mbits/sec
[ 8] 0.00-1.00 sec 11.0 MBytes 91.8 Mbits/sec
[ 10] 0.00-1.00 sec 10.5 MBytes 88.2 Mbits/sec
[ 12] 0.00-1.00 sec 11.0 MBytes 92.2 Mbits/sec
[ 14] 0.00-1.00 sec 10.6 MBytes 88.5 Mbits/sec
[SUM] 0.00-1.00 sec 52.9 MBytes 443 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[Results - Approximately 140 sets]
- - - - - - - - - - - - - - - - - - - - - - - - -
[ 5] 146.00-147.00 sec 9.95 MBytes 83.5 Mbits/sec
[ 8] 146.00-147.00 sec 9.52 MBytes 79.9 Mbits/sec
[ 10] 146.00-147.00 sec 10.0 MBytes 83.9 Mbits/sec
[ 12] 146.00-147.00 sec 9.63 MBytes 80.7 Mbits/sec
[ 14] 146.00-147.00 sec 9.89 MBytes 82.9 Mbits/sec
[SUM] 146.00-147.00 sec 49.0 MBytes 411 Mbits/sec
iperf3: the client has unexpectedly closed the connection
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Attemping to set the protocol to UDP via the method -
set_protocol(test , 2);
Sets all the test protocol items correctly for UDP (analysed through breakpoints). But socket writing always fails, and sometimes mentions No such File or directory exists?
WifiPerfEndPoint does this, it is useful in a test lab setup: you have a few iOS devices with the app open, and a wired central host that can query them all. Adding Bonjour support for discovery would be nice too. This will need socket background mode entitlements, as well as the ability to stop the server / test (see #10).
When using an ipv4 address as opposed to hostname I receive the message „unable to connect to server“. The resolvable hostname works fine the server has both an ipv4 and IPv6 address - the IPv6 address works too
I can run iperf3 success in iOS, But I cannot run iperf2 in iOS, What should I do to run iperf2 in iOS?
Thanks
Now that we have 3.9 working, we'll need to ship it:
Thanks @ndfred for making this! It's the only usable iperf3 app in the entire App Store.
I was wondering if you'd considered a simple line graph to visualize the change over time as you walk around and test speeds from different areas?
I looked at every Objective-C charting library listed at ameizi/awesome-ios-chart and selected the 3 that were most recently updated and have the most stars, as some potential candidates:
JunyiXie/XJYChart
AAChartModel/AAChartKit
ZhipingYang/XYChart
strdup
calls strlen
which crashes, possibly because the string is empty / invalid. iPhone 11 Pro Max, iOS 14.1.
Blocks #41.
Hi there, nice work, I just love it!
That would be super nice to be able to export results.
The easiest way I can think of is adding a "share" button.
Thanks for your work!
François
Right now the app resets when it is restarted or killed. Save the test settings and restore them on next startup.
Latest proposal:
Look at the Tokyo 2020 logos for inspiration (see the color scheme too).
Right now we support iOS 10 and above which means iPhone 5 and above (and we should probably target 10.3.3), other options:
Right now you pick a test duration, hit start and wait until the results come back. I don't know if the protocol supports it, but starting the test and stopping it when you are happy with the results is a better user experience.
Would it be possible to make the app available for Apple TV? I have an Apple TV connected using Ethernet over Power and would like to test the speed using iperf3. That would be also useful validating the speed of the wifi/ethernet on Apple TV with a local network source. Currently only speedtest app is available on Apple TV.
This should describe how to set up a server to run a test, and document the different options
Basically get rid of s_currentTestRunner
and pad the iperf_test
structure with a IPFTestRunner
pointer instead. This isn't a big deal in the current app configuration, where only one test ever runs at a time, but will be an issue for more general purpose usecases.
Setting a lower timeout for connecting to a server would be helpful too
hello, I recoverd my iphone and I can't download it. does it still offered in AppStore?
Crashing with SIGSYS on r = sendfile(fromfd, tofd, offset, &sent, NULL, 0);
, do older versions of iOS support sendfile? There may be a way to detect that.
And be able to select one via dropdown
This will give us bidirectional tests, but requires changes since it changes the API
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.