From f0c20666da7f1de54106cfec6ca912f07384e9ec Mon Sep 17 00:00:00 2001 From: hniksic Date: Sat, 13 Apr 2002 15:44:16 -0700 Subject: [PATCH] [svn] Document `--limit-rate'. Published in . --- doc/ChangeLog | 4 ++++ doc/wget.texi | 31 ++++++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index 4b7bfc5c..0edab5f4 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2002-04-14 Hrvoje Niksic + + * wget.texi (Wgetrc Commands): Document `--limit-rate'. + 2002-04-10 Hrvoje Niksic * wget.texi: Warn about the dangers of specifying passwords on the diff --git a/doc/wget.texi b/doc/wget.texi index ae6b1998..4d139e37 100644 --- a/doc/wget.texi +++ b/doc/wget.texi @@ -672,15 +672,36 @@ functionality of real @sc{www} spiders. @cindex timeout @item -T seconds @itemx --timeout=@var{seconds} -Set the read timeout to @var{seconds} seconds. Whenever a network read -is issued, the file descriptor is checked for a timeout, which could -otherwise leave a pending connection (uninterrupted read). The default +Set the network timeout to @var{seconds} seconds. Whenever Wget +connects to or reads from a remote host, it checks for a timeout and +aborts the operation if the time expires. This prevents anomalous +occurrences such as hanging reads or infinite connects. The default timeout is 900 seconds (fifteen minutes). Setting timeout to 0 will disable checking for timeouts. Please do not lower the default timeout value with this option unless you know what you are doing. +@cindex bandwidth, limit +@cindex rate, limit +@cindex limit bandwidth +@item --limit-rate=@var{amount} +Limit the download speed to @var{amount} bytes per second. Amount may +be expressed in bytes, kilobytes with the @samp{k} suffix, or megabytes +with the @samp{m} suffix. For example, @samp{--limit-rate=20k} will +limit the retrieval rate to 20KB/s. This kind of thing is useful when, +for whatever reason, you don't want Wget to consume the entire evailable +bandwidth. + +Note that Wget implementeds the limiting by sleeping the appropriate +amount of time after a network read that took less time than specified +by the rate. Eventually this strategy causes the TCP transfer to slow +down to approximately the specified rate. However, it takes some time +for this balance to be achieved, so don't be surprised if limiting the +rate doesn't work with very small files. Also, the "sleeping" strategy +will misfire when an extremely small bandwidth, say less than 1.5KB/s, +is specified. + @cindex pause @cindex wait @item -w @var{seconds} @@ -2102,6 +2123,10 @@ Consider data longer than specified in content-length header as invalid as there is, provided there is more than or equal to the value in @code{Content-Length}. +@item limit_rate = @var{rate} +Limit the download speed to no more than @var{rate} bytes per second. +The same as @samp{--limit-rate}. + @item logfile = @var{string} Set logfile---the same as @samp{-o}.