Jump to content

Throttle Bandwidth With Autoit?


Bert
 Share

Recommended Posts

Is this possible? I was asked by someone in my department about this. We have a package that is 38 MB is size and some remote locations have only a 256k pipe. As you can imagine, this would bring a site to it's knees if this was pushed to the workstations at the remote sites. I thought it may be posibble to throttle how fast the file was pushed via a script. I can't mess with anything with routers or network settings (not allowed) Suggesting the pipe be widen to increase bandwidth is also not a option.

Thoughts?

Link to comment
Share on other sites

I was waiting to see if anyone else came up with a good Auto-It solution before I chimed in.

For this kind of issue you may need another utility to cut-up the Executable. Personally I would use either WinRAR or FileMonkey but their are a ton of applications out there that do it. Then you could just send small pieces of the file at a time and assemble at the other end. Most of that seems reasonable to do via Autoit. FileMonkey can put the file back together usually, WinRar you'd have to drop at least the command line someone else so it may not be as efficient a proces.

You also mentioned you are pushing a package, what software are you using for that; many of them have load balancing for just this kind of thing. Unless it is merely a script.

Just some thoughts...

"I have discovered that all human evil comes from this, man's being unable to sit still in a room. " - Blaise Pascal
Link to comment
Share on other sites

What method are you using to send the file?

I would suggest FTP because it's faster than most methods.

Another point, if your company can't afford a basic business DSL line (~$50) then they should reconsider why they are in business. I've worked for very small companies (5 - 7 locations) and very large companies (100's of locations) and something as trivial as a highspeed connection has always fallen into place when it comes to $$$. It's a very cheap way to stay connected to remote offices. As a net admin it also gave me the ability to remote connect to machines to do maintenance and other upgrades without having to visit the site. This saves more money than the connection would ever cost. Security is rarely an issue either with small comanies. Current routers can be setup to be very secure with very little knowledge of security.

Point out to the 'powers that be' that it is in their best interest to get up to speed or they risk being left behind (I've seen companies making a very good profit fold because they were too cheap to invest in technology).

Broadband it too cheap now a days to not take advantage of the gains.

My .02 cents.

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Link to comment
Share on other sites

@Fossil Rock

My guess is by Remote Users he is speaking of home users who maybe use Dial-Up or other connectivity. Sales Force Personel, home users, etc.

I know the thought of people not using broadband at this point is anathema to IT, but it does exists. (madness isn't it).

Edit: SP

Edited by NightGaunt
"I have discovered that all human evil comes from this, man's being unable to sit still in a room. " - Blaise Pascal
Link to comment
Share on other sites

What method are you using to send the file?

I would suggest FTP because it's faster than most methods.

Another point, if your company can't afford a basic business DSL line (~$50) then they should reconsider why they are in business. I've worked for very small companies (5 - 7 locations) and very large companies (100's of locations) and something as trivial as a highspeed connection has always fallen into place when it comes to $$$. It's a very cheap way to stay connected to remote offices. As a net admin it also gave me the ability to remote connect to machines to do maintenance and other upgrades without having to visit the site. This saves more money than the connection would ever cost. Security is rarely an issue either with small comanies. Current routers can be setup to be very secure with very little knowledge of security.

Point out to the 'powers that be' that it is in their best interest to get up to speed or they risk being left behind (I've seen companies making a very good profit fold because they were too cheap to invest in technology).

Broadband it too cheap now a days to not take advantage of the gains.

My .02 cents.

Yes, if you can get it! Quite many places in the world you can't. Or you always can if I shell out $500 a month for satelite connection. And $500 for a small offica is a bit more than the ~$50 your accustomed to.

Link to comment
Share on other sites

Ohh, winded my self up about the broadband thing so I forgot about the topic.

Yes you can throtle it by adding a sleep in the TCPRecv and TCPSend loops and use a reasonable maxlen in the TCPRecv call.

This is one of the methodes used by wget.

Link to comment
Share on other sites

@Uten: I thought it may be possible, and your solution sounds like it would work.

@everyone else: The company I work for leases LAN lines that suit the business need. Normally, a 256k line is fine for nomal business functions. They mainly do mainframe applications, so bandwidth isn't a issue. The package is a home grown application that works with mainframe, giving it a GUI interface to make usage easier. Normally, you run setup, and it installs fine. Its a matter of getting it to the workstations in locations that have a small pipe. I do not know if my co-worker will pursue this route on solving the issue, but knowing I have a option to solve it is what counts here. :think:

Also, I do have some home users who are on dialup. Having them drag their machines in is not something to be taken lightly. Some would have to drive a couple of hours to get the PC to a site, and not everyone is bright enought to plug in or unplug a PC. :(

Thank you everyone for the input!

:)

Link to comment
Share on other sites

What method are you using to send the file?

I would suggest FTP because it's faster than most methods.

Another point, if your company can't afford a basic business DSL line (~$50) then they should reconsider why they are in business. I've worked for very small companies (5 - 7 locations) and very large companies (100's of locations) and something as trivial as a highspeed connection has always fallen into place when it comes to $$$. It's a very cheap way to stay connected to remote offices. As a net admin it also gave me the ability to remote connect to machines to do maintenance and other upgrades without having to visit the site. This saves more money than the connection would ever cost. Security is rarely an issue either with small comanies. Current routers can be setup to be very secure with very little knowledge of security.

Point out to the 'powers that be' that it is in their best interest to get up to speed or they risk being left behind (I've seen companies making a very good profit fold because they were too cheap to invest in technology).

Broadband it too cheap now a days to not take advantage of the gains.

My .02 cents.

The price of broadband (BB) also depends on your location, the level of competion in your area for your broadband dollar and whether or not you can deal with a dynamic vs. a static URL address. In my location as a residential user with a dynamic URL, I can get the cheap DSL (download speed varies from 275K bits/s to 825K bits/s) for 29.95 including fees. If I was more than 3 miles from the switch, I would have to use Cable BB at about $55. If I got fast DSL at a business address it would cost me about $125 a month for one static connection and another $10 per additional PC connected. Business cable would be about $150 - $200 depending on feature set for one static connection and another $10 per additional PC connected

Gene

[font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...

Link to comment
Share on other sites

Link to CURL download: http://www.autoitscript.com/forum/index.ph...ndpost&p=172034

From the CURL Manual:

--limit-rate <speed>

Specify the maximum transfer rate you want curl to use. This

feature is useful if you have a limited pipe and you'd like your

transfer not use your entire bandwidth.

The given speed is measured in bytes/second, unless a suffix is

appended. Appending 'k' or 'K' will count the number as kilo-

bytes, 'm' or M' makes it megabytes while 'g' or 'G' makes it

gigabytes. Examples: 200K, 3m and 1G.

If you are also using the -Y/--speed-limit option, that option

will take precedence and might cripple the rate-limiting

slightly, to help keeping the speed-limit logic working.

This option was introduced in curl 7.10.

If this option is used several times, the last one will be used.

Use CURL on the recieving end.

#)

Link to comment
Share on other sites

Link to CURL download: http://www.autoitscript.com/forum/index.ph...ndpost&p=172034

From the CURL Manual:

Use CURL on the recieving end.

#)

You could also use wget from the gnuwin32 project. There you have a throtle option and a resume option (think you will find this in CURL to, but wget is standalone)

I don't have the syntax right here but could provide it at a later point. :think:

Link to comment
Share on other sites

One of my restrictions I have to live with is I'm not allowed to download a application from the net to fix this. I can however write something that can do it. Even after I write it, I need to test it to make sure I get 0% failures. All the applications listed in the above post are not permitted in our enviroment due to the fact they haven't been tested, and/or there is something already approved. Example: Winzip is allowed, but WinRar isn't.

Before someone chimes in saying how stupid this is, the reasoning behind this is really good. When you introduce a new software program from a outside vender, you run the chance of that software causing a issue with the software you already have installed. I've seen enough wierd things happen to believe in this. I can give one example where I made a hotsetkey in a program I share with coworkers. This hotsetkey would cause a failure in Windows Media player of all things. I was able to fix it, but 99% of the time the hotsetkey would have worked fine. One guy had the media player toolbar enabled on his taskbar, and caused the failure.

I really like Uten's solution, for it is simple to do, and I can design it so it will move the package will install itself after moving the file, with little disruption to the user.

Link to comment
Share on other sites

One of my restrictions I have to live with is I'm not allowed to download a application from the net to fix this. I can however write something that can do it. Even after I write it, I need to test it to make sure I get 0% failures. All the applications listed in the above post are not permitted in our enviroment due to the fact they haven't been tested, and/or there is something already approved. Example: Winzip is allowed, but WinRar isn't.

@vollyman - Actually I'd call that standpoint good sense. Many clients are extremly restrictive, and yes applications do all kinds of crazy things. I concur, Uten's solution is certainly the best, the ones I gave were really 'last resort'. I'm glad there is a proper Auto-It solution. So fear not, no man with experience would call disallowing foreign products in a controlled environment stupid. Especially not without testing/licensing.

Edit:Spelling

Edited by NightGaunt
"I have discovered that all human evil comes from this, man's being unable to sit still in a room. " - Blaise Pascal
Link to comment
Share on other sites

Non computer solution: Burn to CD and overnight postage to remote location. Cheap and effective.

Computer component: Make the CD autoinstall by using the autorun facility to call an AutoIT installation script.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...