How to use the shell to limit the network bandwidth of a specified user shell program

Source: Internet
Author: User

In operation, you will encounter network bandwidth problems that need to limit the use of your shell applications (such as wget, Crul, FTP, SFTP, etc.) to connect to the Internet. How to set the network bandwidth without using complex firewall rules?

Tool trickle can implement this function,

System Debian/ubuntu Linux using the Apt-get method can be installed

$ sudo apt-get install trickle

System Centos/rhel/fedora Linux Installation

1. Install Epel Source Address http://www.cyberciti.biz/faq/fedora-sl-centos-redhat6-enable-epel-repo/

2. Installation # Yum Install trickle

How to use

Trickle-u uploadlimit Program
trickle-d downloadlimit program
{upload_limit}{ Download_limit} program-binary
For example limit FTP upload download speed trickle-u 100-d FTP

Limit wget download speed trickle-d wget http://ftp.openbsd.org/pub/OpenBSD/5.2/i386/install52.iso

Limit bandwidth methods for all shell programs trickle-d 500-u either bash or trickle-d 500-u ksh


Trickle method of parameter usage

-H Help (this)
-V Increase verbosity level
-V Print Trickle version
-S Run Trickle in standalone mode independent of trickled
-D Set Maximum cumulative download rate to KB/S
-U Set maximum cumulative upload rate to kb/s
-W Set window length to KB
-T Set default smoothing time to S
-L Set Default smoothing length to KB
-N Use trickled socket name
-L Set Latency to milliseconds

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.