D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] ping-based throttling scripts

 

On Thu, Oct 22, 2009 at 6:57 PM, Michael Mortimore wrote:
> how it works:
> 1: ping a server to get it's IP (output of ping was easier to deal with
> than the output of nslookup)
> 2: repeatedly ping the IP from #1
> 3: average the last 5 results from #2
> 4: if result from #3 is too high, limit the upstream bandwidth limit (how
> this happens depends on how high it is)
> 5: if the result from #3 is too low, increase the upstream bandwidth limit

Sounds like a clever little idea. I do wonder if you won't be going
back and forth between 4 and 5: your bandwidth limit is increased as
long as pings are fine, so at some point you will reach the maximum,
when pings become slow and you'll decrease your bandwidth limit until
pings are fine again and bandwidth is increased etcetera. I think that
would mean you're in case 4 quite a lot of the time. (Not sure if
there's a good solution to that problem other than setting a hard
maximum for the bandwidth limit though.)

Re 1:
nslookup $hostname | grep Address | head -n2 | tail -n1 | cut -d' ' -f2

Martijn.

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html