[Bug 7120] Variable bandwidth limit .. bwlimit

samba-bugs at samba.org samba-bugs at samba.org
Sat Mar 9 05:06:17 MST 2013


https://bugzilla.samba.org/show_bug.cgi?id=7120

--- Comment #3 from roland <devzero at web.de> 2013-03-09 12:06:15 UTC ---
you can do that with pipe-viewer or similar pipe transfer visualization tools
with throttling feature. 

http://www.ivarch.com/programs/pv.shtml 

first we need to create a little wrapper to put pv into the transfer chain:

linux:/tmp # cat /tmp/pv-wrapper
#!/bin/bash
pv -L 1000 | "$@"

example:

linux:/tmp # rsync --rsh='/tmp/pv-wrapper ssh' -a /proc
root at localhost:/tmp/test
Password: 4 B 0:00:01 [3.68 B/s] [ <=> ]
file has vanished: "/proc/10/exe"
file has vanished: "/proc/10/task/10/exe"
file has vanished: "/proc/11/exe"
file has vanished: "/proc/11/task/11/exe"
file has vanished: "/proc/12/exe"=> ]
4.88kiB 0:00:05 [1002 B/s] [ <=> 

You can even adjust the transfer rate at runtime, as pv can communicate with a
running instance of itself - you will just need the appropriate PID. This would
even make cron based tuning of transfer rates possible.

pv -R $PIDOFPV -L RATE

-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the rsync mailing list