[文章作者:张宴 本文版本:v1.0 最后修改:2008.11.20 转载请注明原文链接:http://blog.zyan.cc/post/380/]

  Linux下限制网卡的带宽,可用来模拟服务器带宽耗尽,从而测试服务器在此时的访问效果。

  1、安装iproute
yum -y install iproute


  2、限制eth0网卡的带宽为50kbit:
/sbin/tc qdisc add dev eth0 root tbf rate 50kbit latency 50ms burst 1000


  3、限制带宽为50kbit后,在百兆局域网中wget下载一个大文件:
[root@localhost ~]# wget http://192.168.1.7/test.zip
--19:40:27--  http://192.168.1.7/test.zip
Connecting to 192.168.1.7:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23862312 (23M) [application/zip]
Saving to: `test.zip'

37% [=======>   ] 8,994,816    457K/s  eta 27s

  下载速度为457K/s,限制效果达到。

  4、解除eth0网卡的带宽限制:
/sbin/tc qdisc del dev eth0 root tbf


  5、对比:未作带宽限制情况下,在百兆局域网中wget下载一个大文件:
[root@localhost ~]# wget http://192.168.1.7/test.zip    
--19:44:33--  http://192.168.1.7/test.zip
Connecting to 192.168.1.7:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23862312 (23M) [application/zip]
Saving to: `test.zip'

100%[==========>] 23,862,312  6.14M/s   in 3.7s  

19:44:36 (6.16 MB/s) - `test.zip' saved [23862312/23862312]

  下载速度为6.16MB/s。



Tags: , ,



技术大类 » 其他Unix技术 | 评论(56) | 引用(0) | 阅读(86777)
Louis Vuitton Email Homepage
2012-5-19 16:17
During World War II, Louis Vuitton collaborated with the Nazis during the German occupation of France.I know someone has already sent you some photo's of the amazing Marc Jacobs/Louis Vuitton UK exhibition at the Musee Des Arts Decoratifs but I just had to share with you the day I had today . 
Coach  Outlet Email Homepage
2012-5-19 16:34
Coach Outlet has distribution, product development, and quality control operations in the United States, France, Italy, Japan, Hong Kong, China, and South Korea.Lewis Frankfort has been involved with Coach for more than 30 years.Metro Rail and ICF engineers are working to address this general problem.  The Coach Outlet Canada provides primarily for the Indian Railways, a number of different coaches - first and second class coaches, pantry and kitchen cars, luggage and brake vans, self propelled coaches. 
Coach  Outlet Email Homepage
2012-5-19 16:43
Cashin worked for Coach Outlet from 1962 until 1974, and revolutionized their product design. Known as an innovator, she instituted the inclusion of side pockets, coin purses, and brighter colors onto the bags.In the Coach Outlet Online shop, a collection of high quality and hottest Coach Shoulder Bags is offered to you. They are all at the best prices you will ever find. 
Coach Outlet Online Email Homepage
2012-5-19 16:51
At the Coach Outlet Online Store, quality products and satisfying service are provided;High safety and prompt delivery is guaranteed.Coach Outlet has always been simple,durable style features to win consumers.The products are more flexible,with easy bleaching,wear characteristics,and simply use a damp cloth. 
Christian Louboutin Email Homepage
2012-5-19 17:14
christian louboutin have own characteristic designs. The beautiful crystals have added the magical finishing touch to countless bridal gowns. Just get some for yourself. The first Men's Boutique, christian louboutin uk Boutique Homme on Rue Jean-Jacques Rousseau in Paris, opened in the summer of 2012.
Louis Vuitton UK Email Homepage
2012-5-19 17:14
Cheap louis vuitton uk wholesale offers a variety of options to satisfy your needs. Some new ones even has fashionable styles fold over flap to disguise the snap closure and a draw string is added for a convenient closure. Louis vuitton outlet online just like a person who want to show himself in front of other people, because he is confident enough, he can attain the respect of other people.
CoachOutlet Email Homepage
2012-5-19 17:15
coach outlet has become a popular shopping experience for consumers around the world, and a desirable distribution channel for manufacturer's and retailers. Coach outlet online develops very quickly because it runs by its own special way and it contents the customers greatly.
Air Jordan Email Homepage
2012-5-19 17:15
Thank you for shopping in our store. We are a reliable online jordan bags seller, specialist in providing numbers of new air jordan bags at amazing price . If you need practical, fashionable and well-known nike dunks, you can consider to choosing on the nike Outlet. Its nice and popular design will make you feel a sense of fresh air.
Nike Air Max Email Homepage
2012-5-19 17:15
This nike air max for sale belongs to the sounding just what are termed as nike air vintage best sellers, many other products and services for the reason that range appearing companies the actual nike air Galliera, plus the nike air outlet monogram selection. nike dunks are made of high leather materials which can be durable and fashionable.They will make you become the focus in the streets or audience.
xujie123
2012-5-21 11:27
Our online store offers you discounted Designer louis vuitton replica wallet at present. You could find them in desirable quality and price. If you don't mind high class louis vuitton uk, have a good time here.louis vuitton Store Online Handbags can also bring great accuracy as well as practical applicability and fashionable.Have you ever dreamed of being as charming as Madonna? Have you ever thought of becoming an envy of all your friends? If so, come to louis vuitton outlet.<br/>
xujie555
2012-5-21 13:52
coach factory outlet uses graceful accessories to match the classical logo of coach, which is the best combination of coach. The handmade coach products?can make you more charming and graceful.coach factory online provides people many coach goods. If you wish to snatch the coach handbag, then this best method is made for that you like for coach discount.coach factory outlet online is a fashion brand to ensure its quality. With designer coach shoulder bags, you will always attract people's attention. The bags will emphasize your personal style and taste.<br/>
xujie333
2012-5-21 15:16
coach outlet online Store guarantee that all the coach handbags offered are own high quality. In addition , all of them are sold at an unexpected low price.If you want to purchase, just visit their website.coach factory outlet is really sizzling kinds of shopping way for you. With the usage of the replica designer coach bags, you can surely be able to change your individual looks in a stunning manner.Coach bags on sale from the coach outlet are cheap or discount prices that you certainly will stand out from the crowd on your next camping trip!<br/>
coach88888888 Email
2012-8-13 17:53
If you desire to go to Coach Factory Outlet, but have no idea in which to go, you can research online. It is no doubt that there is drastically information and details about it for the reference.Coach Factory Online are loved by many people, when you walk in the street, you could see many people take coach styles.hat experts claim Coach Outlet Online shopping is in the changes they are available in.Coach Outlet will send you a coupon in the post to use in their upon only after you type a achieve. The Coach bags are customarily somewhat many than the ones in the stores.
GFGF Email Homepage
2012-9-26 10:59
Not all pictures will hyperlink to some buying Karen Millen dress site but countless will so it's worth making use of the yahoo picture search.Follow the hyperlink trail - I have discovered some on the ideal small vintage style web sites just by subsequent the suggested back links from a single website towards next. the majority of these web sites by no means are available up in yahoo searches. The proprietors are fantastic Karen Millen Ireland vintage sellers not research motor optimization experts. You'll normally discover far better pricing too. merely go to some web site or weblog and seem for any "links" site or "resources" or "blog followers" site for much more back links to other sites. Then just stick to the hyperlink trail to some genuine unknown gems.Ask for what you choose - There are many vintage style forums, blogs, and Q & A web sites that permit one to article whatever you are searching for and get recommendations for vintage 1940's dresses.These can cause some fantastic finds. Also take into account asking vintage sellers whatever you want. They normally have supply that isn't outlined on Karen Millen outlet their web site however or they are able to store for you personally and e mail you once they discover something.
Karen Millen dresses Email Homepage
2013-1-31 10:29
underneath Karen Millen UK these types of conditions they develop like upset. Take bushes as an example, a Karen Millen coat fantastic idea keeping in mind all of them under control and seeking better additionally causing them to be simpler to preserve is to cut it more frequently, more than simply Karen Millen the one per year schedule when they are actually more than produced. Let them have an instant cut you may notice the modern growth cropping out and about, this gives way less waste to eliminate and earn your own bushes better because shaping encourages Karen Millen sale brand-new progress, causing them to be thicker and much more yummy. To get rid of all of your waste materials protect and other cuttings that are not compostable, employing a constructors handbag is a superb approach to take all of them to your automobile as well as drive them in your local amenity web site, because these are usually robust and can be employed again and again. Don't burn up the spend simply because this usually angers the particular nearby neighbours and just enhances the garden greenhouse gasses. Any local amenity website will reuse all of your eco-friendly spend.
FAWER
2013-3-5 13:45
买轴承就到:www.jkzhoucheng.cn
sdsd
2013-4-11 17:06
买轴承就到:www.jkzhoucheng.cn
海阔天空 Homepage
2013-5-13 20:37
海阔天空俏佳人娱乐会所15026982229 小姐服务24小时出差旅游大学生兼职按摩小姐上门,处女开红,兼职空姐,,白俄罗斯小姐,兼职模特,性感少妇全国连锁,就近提供北京、上海、广州等地姐兼职美女上门保健按摩北京小姐上门,上海兼职美眉,广州美女上门保健按摩,西安女大学生兼职,重庆空姐兼职,杭州酒店宾馆美女,温州兼职美女,南京白领兼职,全国本地找小姐上门按摩,模特私拍,援助交际更多请进 www.lvcai.org 查看
1
2013-12-19 12:14
11111111
耐火砖 Homepage
2018-2-10 09:14
学习了
分页: 2/3 第一页 上页 1 2 3 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]