You are here

iperfspeed v0.2

20 posts / 0 new
Last post
iperfspeed v0.2

I've made a web interface for using iperf to test link speeds on the mesh. Just trying this out to see how well it works. You need to install it on at least 2 nodes on your mesh. Then use the ui at http://<node>:8080/iperfspeed to run a speed test. It will login to the server node and start iperf as the server, then login to the client and run iperf against the server for 10 seconds and record the result. See screen shot below.

To install you need to have iperf on both nodes. If your node is connected to the Internet just use the drop down box on the setup page. Otherwise here are links to the packages you need to install before installing iperfspeed on your node:

Then install iperfspeed:

Let me know if it works for you.

Oh one note. After you install iperf on your node you will need to reboot for the firewalls rules to take effect and allow access to iperf.

kj6dzb's picture
Can this be in the next

Can this be in the next release please!

Installing the pakages went fine... I dont think the firewall rules took so I tryed a softreboot that only worked for 1 so I hardreset the other 2.

I always like to see graphics, it would be nice to look at grafts with speed over time, with a hover over details.  

73 Mathison kj6dzb



Image Attachments: 
Just a note, it looks like
Just a note, it looks like this is wide open to access.

The program appears (on my quick read, in remote and reading from a phone) to keep the log on the flash file system.

The flash file system can supports only so many file system writes before it dies out. Once the file system write limit is hit it can render the node unable to function (this is why in the stock firmware we limit file system writes to only the bare necessities, items like the graphs for example are not persisted for this reason.)

Just something to keep in mind if installing this on your core infrastructure.
kj6dzb's picture
Well use of flash memory is
Well use of flash memory is not going to work long term. Whats an alternative?  

Mabey the .js could run? within a .kml map. Call it up as query between 2 selected nodes. I don't want to frivolously run this tool, collecting the data and displaying it along with other map data. Local collection to not that dosent use the nodes onboard flash. I really like how the code allows one to select remote servers & clients.  Seeing this info on a map would gives it a different perspective. 
Any program that's been able

Any program that's been able to get through a code review inside of AREDN to date has relied on the tmpfs directories these get wiped I a reboot so it's not persistent, and it takes away from running memory (another negative) but it spares the flash itself from the writes.

This was the case for the SNR Graphs and the AREDN modified hamchat program (that inspired or at least I belive ) inspired Trevor to create his great meshchat program.

There are probably lots of different ways to handle the data (transfer it to another off node device at interval, only return it and depend on an off board device to always capture it etc).  password protect it to limit the amount of utilization (this may hinder the apps purpose however).

All a part of a balance. I haven't looked and loaded it (still on phone ) I'll say the photos sure are nice though. 

Of course questions like this are probably why this is (or at least I believe it is) a beta, great chance to get something out there, investigate the concerns, fix what is actually and issue, pass on what isn't an issue, get feedback, etc.  I have confidence in Trevor. He's done a lot to date both internally in core team and externally on these sub projects of his own that he deserves full credit for. 

which iperf version?
Is this iperf 2 or iperf 3?

Looks like from the package
Looks like from the package name it is v2
"Test Results" vs "Previous Tests"

The "Test Results" appear to be correct but look entirely different from the saved "Previous Tests".
For example a run shows:

[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.7 sec  2.75 MBytes  2.16 Mbits/sec

Yet the "Previous Tests" for that run shows: 16 Mbits/sec

This looks like a problem.  It doesn't make any difference which node I run it from
 or which is the server or client.  The "Previous Tests" results are always a wildly
 higher number.   Your example looks good but not mine...

- Mike ab4yy
K5DLQ's picture
yeah.  I think it's taking
yeah.  I think it's taking the decimal places AFTER the decimal instead of in front...
ie.    iperf shows 2.16 Mbits/sec, but, reports 16 Mbits/sec in the "previous tests" panel.
Yeah looks like my regex is
Yeah looks like my regex is broken. Will fix in next version.
Any outlook on a fix for this

Any outlook on a fix for this?  Or, is there an area in the script we can edit to fix?  Iperfspeed is a wonderful utility but this bug makes it appear to not be so wonderful.

Thanks and Happy New Year all!
   Mike ab4yy

/www/cgi-bin/iperfspeed line
/www/cgi-bin/iperfspeed line 25:

if ($output =~ /([-+]?[0-9]*\.?[0-9]\s\w+)\/sec\n$/) {
    $output .= "$1\n";        

That is the regex that is broken. If anyone comes up with a fix I can put it in and post a new version. I just don't have time at the moment.
KE2N's picture
how about

if ($output =~ /([-+]?[0-9]*\.?[0-9]*\s\w+)\/sec\n$/) {

(added asterisk)

It works!

It works!

I made the change (line 23) of adding that 2nd asterisk and it seems to have fixed the issue.  I remotely made the change to several nodes.

   Thanks Ken and Trevor!
       - Mike ab4yy

New version with this fix in
New version with this fix in it:

Thanks KE2N!
kj6dzb's picture
is there an version update in
is there an version update in the works? at the moment I dont want to run this all the time.

No change is results
I have two nodes installed, one inside and one outside plus a third inside running temporarily. I ran the speed test before I added the asterisk from KE2N's fix and ran them again after.

Maybe I'm doing some thing wrong but I see no significant change in the results.
Before fix:
Time Server Client Result
1/22/2017 17:48 w7rej-node05 w7rej-base01 13 Mbits/sec
1/22/2017 17:48 w7rej-node05 w7rej-base02 10 Mbits/sec
1/22/2017 17:49 w7rej-base01 w7rej-base02 83.9 Mbits/sec

After fix:
Time Server Client Result
1/22/2017 18:07 w7rej-node05 w7rej-base01 5.75 Mbits/sec
1/22/2017 18:07 w7rej-node05 w7rej-base02 6.04 Mbits/sec
1/22/2017 18:06 w7rej-base01 w7rej-base02 92.0 Mbits/sec

What I don't understand is why the result between w7rej-base01 and w7rej-base02 is sooooooooo much faster than the other two. w7rej-base01 is the node mounted up 20 feet, a bullet and flat panel, w7rej-base02 is a low pwr AirRouter in my shack and w7rej-node05 is a high power AirRouter also in my shack. I confirmed that the fix was applied to all three nodes.

For the reasons mentioned about filling up the flash memory, would it be possible, from the command line, to delete the test results without breaking the application? It looks like all I need to do is delete /www/iperfspeed/tests.log. I assume by deleting the log file, the next time I run iperfspeed, the previous results will not populate hence no re-test button.

Bob, W7REJ

Delete log file
Deleting the log file assumptions are correct.
RE: No change is results
I answered my own question. I have a DtD link established between W7REJ-Base01 and W7REJ-Base02. When I remove this link the results are consistent with the other results. What speed should I expect between nodes only 20 feet apart from RF links? They're running at 28 dbm. Could the power output be too high for these needs being so close together?

Bob, W7REJ
KE2N's picture

The "fix" had to do with the stored test results not matching the corresponding previously-executed individual test. You did not show any individual tests - hopefully they agree.

Without other traffic on the network, I think iperf should report something in the range of 20-50% of the indicated TxMbps rate shown on the mesh status page.  Of course, that number only updates when data is actually being sent so you will need a separate window open with auto refresh to see it. The TxMbps number is constrained by the bandwidth you select (5,10,20) and the LQ, as well as whether you have MIMO or SISO radios (this last consideration gives a factor of up to 2 in the throughput but it is reflected in the TxMbps number).

So if you see 30 Mbps on the link, then you might expect get 6-15 Mpbs on iperf.  YMMV as they say ...

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer