¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 160°Ç
   
Trickle - ¾îÇø®ÄÉÀ̼ǿ¡ µû¸¥ ¼ÓµµÁ¦ÇÑ
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2015-10-02 (±Ý) 13:09 Á¶È¸ : 3283
±ÛÁÖ¼Ò :
                          

http://www.tuxradar.com/content/control-your-bandwidth-trickle
http://monkey.org/~marius/trickle/trickle.pdf


INSTALL
CentOS (Enable EPEL Repository)
# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm
# yum install trickle

Ubuntu
# apt-get install aptitude
# apt-get install trickle


TrickleÀÌ ¿øÇÏ´Â ¹ÙÀ̳ʸ® ÆÄÀÏ°úÀÇ ÀÛµ¿ ¿©ºÎ È®ÀÎ
#  ldd $(which ncftp) | grep libc.so
libc.so.6 => /lib64/libc.so.6 (0x00007fa499fa5000)

# ldd $(which wget ) |grep libc.so
libc.so.6 => /lib64/libc.so.6 (0x0000003620c00000)

# ldd $(which scp) | grep libc.so
libc.so.6 => /lib64/libc.so.6 (0x00007f0d0afd6000)


Bandwidth Å×½ºÆ® 
 :: Å×½ºÆ®ÇÒ ¾îÇø®ÄÉÀ̼ÇÀº ftp , wget 

Standalone Mode
WGET Á¦ÇѾøÀÌ »ç¿ë


WGET ´Ù¿î·Îµå ¼ÓµµÁ¦ÇÑ 100KB/S


FTP Á¦ÇѾøÀÌ »ç¿ë
# ncftpput -u mojily -p xxxxxxxxx chonnom.com /home/mojily setup.ini


FTP ¾÷·Îµå ¼ÓµµÁ¦ÇÑ 200KB/S
# trickle -s -u 200 ncftpput -u mojily -p xxxxxxxxx chonnom.com /home/mojily setup.ini

¡Ø trickle Usage
Usage: trickle [-hvVs] [-d <rate>] [-u <rate>] [-w <length>] [-t <seconds>]
               [-l <length>] [-n <path>] command ...
-h           Help (this)
-v           Increase verbosity level
-V           Print trickle version
-s           Run trickle in standalone mode independent of trickled
-d <rate>    Set maximum cumulative download rate to <rate> KB/s
-u <rate>    Set maximum cumulative upload rate to <rate> KB/s
-w <length>  Set window length to <length> KB 
-t <seconds> Set default smoothing time to <seconds> s
-l <length>  Set default smoothing length to <length> KB
-n <path>    Use trickled socket name <path>
-L <ms>      Set latency to <ms> milliseconds
-P <path>    Preload the specified .so instead of the default one


Supervised [unmanaged] Mode
# trickled -d 1000 -u 1000
# ps -ef |grep trickled |grep -v grep
root     29719     1  0 18:19 ?        00:00:00 trickled -d 1000 -u 1000

¼ÓµµÁ¦ÇÑÀÌ °É¸®±ä ÇÏÁö¸¸....Upload / Download °ªÀÌ Á¦´ë·Î ¹Ý¿µÀº ¾ÈµÇ´Âµí;;; (OS : CentOS 6.X X86_64, Ubuntu 14.04 LTS)
# trickle wget http://ftp.daumkakao.com/cygwin/x86_64/setup.ini
# trickle ncftpput -u mojily -p xxxxxxxxx chonnom.com /home/mojily setup.ini 

¡Ø trickled Usage
Usage: trickled [-hvVfs] [-d <rate>] [-u <rate>] [-t <seconds>] [-l <length>]
                [-p <priority>] [-c <file>] [-n <path>] [-N <seconds>]
                [-w <length>]
-h            Help (this)
-v            Increase verbosity level
-V            Print trickled version
-f            Run trickled in the foreground
-s            Use syslog instead of stderr to print messages
-d <rate>     Set maximum cumulative download rate to <rate> KB/s
-u <rate>     Set maximum cumulative upload rate to <rate> KB/s
-t <seconds>  Set default smoothing time to <seconds> s
-l <length>   Set default smoothing length to <length> KB
-p <priority> Set default priority to <priority>
-c <file>     Use configuration file <file>
-n <path>     Set socket name to <path>
-N <seconds>  Notify of bandwidth usage every <seconds> s
-w <length>   Set window size to <length> s


/etc/trickled.conf ¼³Á¤Á¤ÀÇ
[service] : »ç¿ëÇÏ°íÀÚ ÇÏ´Â ¾îÇø®ÄÉÀÌ¼Ç À̸§
Priority : ¿ì¼±¼øÀ§
Time-Smoothing [ÃÊ] 
Length-Smoothing [KB] : default 10KB

example) 
# cat /etc/trickled.conf 
[ssh]
Priority = 1
Time-Smoothing = 0.1
Length-Smoothing = 2

[ftp]
Priority = 2
Time-Smoothing = 1
Length-Smoothing = 3

À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.