Linux 全局限速工具 wondershaper 安装使用
简介
/usr/sbin/wondershaper 实际上是一个shell脚本, 真正实现限速效果的是tc命令(traffic control)
安装:
apt install -y wondershaper
#yum install -y wondershaper
V1.2.1使用方法:
#限速 wondershaper [interface] [downlink] [uplink] 单位Kbit/s
/usr/sbin/wondershaper eth0 8192 4096
#解除 wondershaper clear [interface]
/usr/sbin/wondershaper clear eth0
帮助文档:
- RHEL系OS: /usr/share/doc/wondershaper-1.2.1/README
# /usr/sbin/wondershaper #不加选项
Wonder Shaper 1.2.1
Usage: /usr/sbin/wondershaper [device] clean|[upload speed in Kb/s] [download speed in Kb/s]
Example: /usr/sbin/wondershaper eth0 20 500
https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=wondershaper
- debian系OS: /usr/share/doc/wondershaper/
# man wondershaper
WONDERSHAPER(8) System Manager's Manual WONDERSHAPER(8)
NAME
wondershaper - simple traffic shaping script
SYNOPSIS
wondershaper [interface]
wondershaper clear [interface]
wondershaper [interface] [downlink] [uplink]
DESCRIPTION
This manual page documents briefly the wondershaper script. This manual page was written for the Debian distribution because the original script does not have a manual page.
wondershaper is a traffic shaping script that provides low latency, prioritizes bulk transfers below normal web traffic, prioritizes interactive shells above normal web traffic, and attempts to prevent upload and download traffic from affecting each other's ack packets. Put simply, the wondershaper makes your internet connection more "responsive"
SYNTAX
A summary of wondershaper syntax is included below. For a complete description, see the files in /usr/share/doc/wondershaper.
wondershaper [ interface ]
Shows the status of traffic shaping on that interface.
wondershaper clear [ interface ]
Removes all traffic shaping from that interface.
wondershaper [ interface ] [ downlink ] [ uplink ]
Configures the wondershaper on the specified interface, given the specified downlink speed in kilobits per second, and the specified uplink
speed in kilobits per second.
SEE ALSO
The programs are documented fully by:
/usr/share/doc/wondershaper/README.Debian.gz
/usr/share/doc/wondershaper/README.gz
AUTHOR
This manual page was written by Vince Mulhollon <vlm@debian.org>, for the Debian project (but may be used by others).
May 30, 2004 WONDERSHAPER(8)
================# 水平有限 欢迎指正 #=================