linux 网卡流量查看shell
一个不错的查看流量的脚本
- #!/bin/bash
- # test network width
- function usage
- {
- echo “Usage: $0 “
- echo “ e.g. $0 eth0 2″
- exit 65
- }
- if [ $# -lt 2 ];then
- usage
- fi
- typeset in in_old dif_in
- typeset out out_old dif_out
- typeset timer
- typeset eth
- eth=$1
- timer=$2
- in_old=$(cat /proc/net/dev | grep $eth | sed -e “s/\(.*\)\:\(.*\)/\2/g” | awk ‘ { print $1 }’ )
- out_old=$(cat /proc/net/dev | grep $eth | sed -e “s/\(.*\)\:\(.*\)/\2/g” | awk ‘ { print $9 }’ )
- while true
- do
- sleep ${timer}
- in=$(cat /proc/net/dev | grep $eth | sed -e “s/\(.*\)\:\(.*\)/\2/g” | awk ‘ { print $1 }’ )
- out=$(cat /proc/net/dev | grep $eth | sed -e “s/\(.*\)\:\(.*\)/\2/g” | awk ‘ { print $9 }’ )
- dif_in=$(((in-in_old)/timer))
- dif_out=$(((out-out_old)/timer))
- echo “IN: ${dif_in} Byte/s OUT: ${dif_out} Byte/s”
- in_old=${in}
- out_old=${out}
- done
- exit 0
本日志由 flyinweb 于 2009-07-08 15:21:11 发表,目前已经被浏览 5206 次,评论 0 次;
引用通告:http://www.517sou.net/Article/135/Trackback.ashx
It is quite useful and interesting too.
VIRT 的上限是64G,也就是36位, cat /proc/cpuinfo的结果是:addre
昨天要准备用线程重写webbench,试验了下Fedora Linux 2.6.35.14
不明白您的具体的意思是什么?
已经发送到你QQ邮箱
http://www.2mysite.net/scriptencoder/screnc.asp 站长你好,看
你好,我发现一个问题,就是从mysqld2同步过来的数据,在mysqld1的
晕,我说是怎么回事情,原来我和你一样,忘记设置了活动分区