我浏览了一下CURL设置文件,但没有在/ etc /中找到它并且在curl网站上找不到太多...
基本上我想要做的是设置curl可以上传的最大速度限制(无论它运行了多少个实例),以便我的服务器有一些上传容量留给其他任务.
Ind*_*ing 11
很确定你更新了你的问题,因为它肯定使我原来的答案(TFM,下面)已经过时了.
我怀疑你在卷曲中可能要求的是什么,因为我认为卷曲的每个实例彼此独立地运作.
您可以编写一个脚本来生成curl实例,并根据总作业数设置每个作业的限制,但这不是动态的.您可以通过强制所有curl命令通过某个端口或网络接口操作然后使用QOS来限制它来模拟全局速率.
但是,您可能应该找到一个处理作业队列的下载实用程序,并且能够自行进行速率限制.
From TFM(
man curl) - limit-rate指定您希望curl使用的最大传输速率.如果您的管道有限,并且您希望转移不使用整个带宽,则此功能非常有用.Run Code Online (Sandbox Code Playgroud)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. The given rate is the average speed counted during the entire transfer. It means that curl might use higher transfer speeds in short bursts, but over time it uses no more than the given rate. If you also use 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. If this option is used several times, the last one will be used.