In the Linux system, if you download something in the Web page will become very card, then need to download the speed of a certain limit, and trickle is a very good broadband control tools, the following small set to introduce the next Linux installation using Trickle method.
How Linux installs and uses trickle
What is trickle?
Trickle is a bandwidth-controlled supply that limits the bandwidth of applications such as Firefox, FTP, SSH, and other programs that use network bandwidth. Do you want your youtube music experience to affect your FTP downloads? If not, please continue reading this article to learn how to install and use trickle on your machine.
How to install Trickle on Linux
The Trickle tool has a number of dependencies that must be installed before installing and using trickle, but this library is installed by default on most current Linux machines.
On the Debian/ubuntu/linux Mint.
Run the Apt-get install trickle on the Debian/ubuntu/mint machine for installation. Make sure the source list is updated, and then install the application you want.
$ sudo apt-get update
$ sudo apt-get install trickle
On the Rhel/centos/fedora.
First you need to update the system and then use the following command to install trickle.
# Yum Update
# Yum Install trickle
How does trickle work?
Trickle controls and restricts the upload/download speed of the application by controlling the read and write of the socket data. It uses another version of the BSD socket API, but the difference is that trickle also manages socket calls.
Note that Trickle uses dynamic linking and loading, so it is only useful for programs that use the GLIBC library. Because trickle can set data transfer latency on the socket, it can be used to limit the network bandwidth of an application.
What Trickle can't do?
Trickle cannot be used to limit the bandwidth of applications that use the UDP protocol, it can only be used for TCP connections, but you should know that it is not valid for all TCP connections. If you have been reading this article carefully, you can guess what the reason is. Do you remember trickle only works with the GLIBC library application?
Also, trickle cannot work on an executable program that uses static links.
Determine if trickle can be run on a particular application
Since trickle cannot limit the upload/download speed of each application, there should be a way to find out how trickle can work.
The LDD tool can help us find out if a particular program is using a libc.so library. If the program uses this library, you can use trickle to limit its network bandwidth usage.
The LDD command is used to print the shared libraries that each program requires. If you're a curious Linux Geek, you can use the Man command to find out more about the LDD tool.
# Mans LDD
FileZilla is a program using the FTP protocol to transfer files, trickle can be used to limit its download or upload speed? When you think about it, I use the following command to find out if trickle can be used for FileZilla.
# LDD FileZilla | grep libc.so
As far as I am concerned, it outputs the following:
oltjano@oltjano-x55cr:/usr/bin$ LDD FileZilla | grep libc.so
libc.so.6 = "/lib/i386-linux-gnu/libc.so.6 (0xb6bc4000)
Since FileZilla uses the "libc.so" library, trickle can be used to limit its network bandwidth. This method can be used in any program that you are interested in.
Learn how to use trickle
Use the following command to output the version of the Trickle tool.
root@oltjano-x55cr:~# trickle-v
Trickle:version 1.07
Linux has a lot of command-line tools to make tests (experiments) interesting and beautiful. The following command uses the Wget tool to download the latest Pear OS mirrors.