Can you test internet upload speed within Freenas?

Status
Not open for further replies.

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
So thankfully this is an off topic thread and this really is off topic. I'm looking for a way to test my upload internet speed completely unattended to any free server over the internet and from there if the upload speed is below a specific threshold then reboot my cable modem.

What I've been able to achieve so far is I can reboot the cable modem from within Windows using the "wget" program. I however cannot locate any method to test upload speed in a fully unattended way and then trigger the reboot. My batch file gets run at 4AM each morning right now but that doesn't help me troubleshoot the periodicity to try and find a root cause. The batch file also collects all the modem data, also using "wget" and saves it just before the reboot. If I could fix this in Windoze well I would do it there but I hear some rumblings about "iperf" in the linux world but I haven't seen a single example or reasonable reference on how to use it for what I'm looking for. I desire to test upload speed every 15 minutes for now and hope this gives my the granularity I need. The only problem I could see is if I get a low value because I'm performing an upload but that is a bridge I'll cross when I get to it.

Thanks for taking the time to read this and I greatly appreciate and pointers.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
You need something on the other end of the connection to be receiving the data, and the problem is, if any connection between you and that happens to be congested, then you get poor numbers. If your ISP provides a shell server or personal web sites, you might be able to test against that, as it is likely to be near you on the network.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I know my ISP has their own FTP server with a 100MB test file that you can use to test your internet speeds. Your ISP may have something similar.

I will warn you though, that this likely won't help you much. On my ISP(as well as most in the USA) they oversell their internet connections, so you aren't likely to get more than about 1/2 of what they claim is your "up to" speeds for more than 1/2 the day. So unless you plan to set the limits ridiculously low(like <25% of your theoretical max speed) expect to be rebooting your cable modem at least 1/2 of the time that you test your speed.

I had a program like that for Windows about 3 years ago. I gave up because rebooting your cable modem doesn't fix the problem. The problem s very very far upstream of you. Calling the ISP is pointless since they want to oversell their internet connections. That's how they turn a ridiculously high profit margin. The only use I could find for the program was that if you have flaky internet because of their lines between their equipment and your home. In the example I saw the owner set it to 5k/sec because if you lose internet it will do 0 bytes/sec and reboot the modem. Poof, back on the internet until it disconnects again.
 

titan_rw

Guru
Joined
Sep 1, 2012
Messages
586
If you're having to regularly reboot your modem to get your speeds back to what they should be, there's something wrong with the modem, or your connection. I'd be talking to the isp.

Also, if your bandwidth is so oversold you can't get your rated speeds the majority of the time, I'd be complaining / switching isp's. I pay for 50 mbit / 10 mbit. I can get those speeds anytime of the day or night. The last time my modem rebooted was when we had an extended power outage. Overall I'm very happy. My isp seems to have enough backend bandwidth capacity that I can always saturate my dsl connection, downstream, or upstream. It's also very stable. I'll go a month and not have any retrains on the modem. However, if I was constantly having to reboot the modem to get the speeds I'm paying for, I'd be mad. I'd also be mad if I regularly couldn't reach my maximum speeds.

Joeschmuck: I think you need to call your isp and complain. If they won't fix it, I'd be changing isp's.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I've been troubleshooting this problem for over 6 months now and the ISP has been involved. The ISP doesn't believe there is a problem, not even in the modem. All power levels are great, S/N ratio great. My D/L speed is never a problem. My upload speed typically tests out to 1.5 Mb/sec. Periodically it will drop to exactly .49Mb/sec and can be restored by either rebooting the cable modem or here is the kicker, when the ISP tests the line which doesn't reboot the modem. So it acts just like my upload speed limit was dropped to .5Mb/sec and this can go on for days until either I reboot the modem or sometimes it will go away on it's own.

This is why I need an automated method to test upload speed. I wish changing ISP's was an option but the only other game in town is DSL which is capped at 3Mb/sec down, .5Mb/sec up so no gain, just loss. Plus the other ISP has frequent drops, I use to have them years ago. Now once FIOS enters my neighborhood (could be many years from now as I've been waiting 5 years already) then I'll get that in a heart beat.

The ideas to use my local ISP space is a good one and I'm certain they provide it, I just haven't used it. Personally I feel it's being caused by a pushed config file to my modem from the ISP but it's not easy to identify.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Check the tech forums for details on your cable modem. Sometimes they have a technician's debug section (often hidden) that will cause the web GUI to display config variables, or better, the config file.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Check the tech forums for details on your cable modem. Sometimes they have a technician's debug section (often hidden) that will cause the web GUI to display config variables, or better, the config file.
I will give that a serious look at right now. It would be nice to see the config file that the cable company pushes out, I know that is what controls the upload/download speeds and it gets refreshed very frequently. BTW, it's an SB6120, nice modem.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
That's the exact modem I have. It's supposed to be one of the best.

I do know that some ISPs play games with the speed tests. For instance, my ISP will automatically prioritize data from websites like www.speedtest.net and similar websites. So no matter how crappy my internet gets, if I do a speedtest suddenly I have good speeds. Hard to argue that "my internet is slow" if they're artificially allowing the "full speed" they are trying to sell. That doesn't sound like your problem exactly though.

It does sound like they're artificially capping you at 0.5MB/sec.

I had major issues with my ISP when I first moved into this house. Couldn't figure out the problem until the manager brought a cablemodem for a "test account" and plugged it in. Suddenly all the problems where gone. This had the virtue of me having proof that the issue was my account. :)
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Yesterday I discovered something interesting... My account didn't have an email address assigned to it and the customer service rep was very insistent that I just didn't have my email address and I was wrong. That is funny because I have an active email address with my ISP, same one since I opened the account. A few hours later I get a call from the ISP and turns out that they did some database move/merge and my email address was under someone else's account and it's not the first time that had happened. So that has been corrected. Maybe they fixed my problem as well, time will tell. Now I'm curious if my modem MAC address is located in more than one account, I would doubt it but right now who knows. BTW, my ISP is called Metrocast.

So now I have access to the ISP server space and I can FTP to it. Now it's time to check out iperf to see how to configure it.

@Cyberjock... I hear you on what an ISP will do to claim massive upload/download speeds even though they may not be real world. My DL speed is 16Mb/sec, really fast for real world, so fast that I've never maxed it out except during testing. The places I grab files just don't send things that fast, even if I do multiple files, I'd have to do a lot of them and I just don't use the internet that way. I'd love to change my speeds if I could keep the same payment to upload of 2Mb/sec and dl 10Mb/sec. I don't upload much, it's more remote desktop stuff so that speed helps out a lot.

Cheers
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
iperf is not likely to help with an ISP's ftp server, but you can probably script wget or ftp.

The cheap and easy way probably involves maintaining a static file locally and checking the number of seconds it requires to ftp it, something along the vague lines of

# /usr/bin/time -p ftp command+args | grep real
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Oh yes, I just found out that iperf requires the iperf server on the other end of the connection so it will not work. Sounds like iperf is great for testing a network you completely control.

@jgreco, thanks for the input.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
So progress has been made, I can now check upload speed, still using windows batch file for now but I plan to incorporate it into a FreeNAS jail. I'm getting ready for a long trip out of town so I'm not messing with my FreeNAS server at all. That is one problem I don't need while away for a month.

My batch file now creates a single output file which looks like this...
Code:
ftp> 1.66116.70quit


The data is: 1.66 seconds and 116.70 Kbytes/sec.

I need to strip off the 116.70 part and evaluate it but that shouldn't be too difficult. Basically I will search for the first decimal in the line, move right two spots, extract the data until two spots past the second decimal. Sounds easy once I figure it out. I expect to have it done in a few hours depending on what other things I have to do around the house today.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
I've got it now and it works. I'm currently tweaking the script to collect data each time the throughput falls below the set point and reboot the modem after X number of failures to prevent false positives. While doing this I'm formatting it nicely too.

Once this works well I will see about putting it into a FreeNAS script as it would be nice if it's not dependent on my windoze computer.

Thanks for all the help and guidance.

-Mark
 
Status
Not open for further replies.
Top