命令mark

for i in `sudo /usr/local/sbin/fping -g 10.181.37.0/26 -p 10 -r 1 | grep alive | awk '{print $1 }'`;do host $i;done | grep -v NXDO

for i in `sudo /usr/local/sbin/fping -g 10.181.37.0/26 -p 10 -r 1 ;done | grep -v NXDO


for i in `sudo /usr/local/sbin/fping -g 10.181.37.0/25 -p 10 -r 1 | grep alive | awk '{print $1 }'`;do echo -n " $i "; host $i | grep baidu.com ;done | grep -v NXDO

 


for i in ` cat qianmo_bignat.txt `;do echo -n " $i "; host $i | grep baidu.com ;done | grep -v NXDO

for i in ` cat qianmo_bignat.txt `;do cat 2019-07-12 | grep $i ; echo -en "\n" ;done


for i in ` cat qianmo_bignat.txt `;do cat 2019-07-12 | grep $i | awk -F "," '{print $4 }' | awk 'BEGIN {max = 0} {if ($1+0 > max+0) max=$1} END {print "Max=", max}' ; done | awk -F " " '{print $2 }' | awk '{sum+=$1} END {print "Sum= ", sum}'


in

 

 


| awk '{sum+=$1} END {print "Sum= ", sum}'

 

共阡陌虚拟机 1195 IP 每一个IP的5min粒度 取一天峰值,求和1195个IP,sum(峰值in)=11G ,sum(峰值out)=1.35G

for i in ` cat qianmo_bignat.txt `;do cat 2019-07-12 | grep $i | awk -F "," '{print $4 }' | awk 'BEGIN {max = 0} {if ($1+0 > max+0) max=$1} END {print "Max=", max}' ; done | awk -F " " '{print $2 }' | awk '{sum+=$1} END {print "Sum= ", sum}'

Sum= 12046665005

in
400G

 

 

for i in ` cat qianmo_bignat.txt `;do cat 2019-07-12 | grep $i | awk -F "," '{print $5 }' | awk 'BEGIN {max = 0} {if ($1+0 > max+0) max=$1} END {print "Max=", max}' ; done | awk -F " " '{print $2 }' | awk '{sum+=$1} END {print "Sum= ", sum}'


[qiaoyanlin@tc-sysnoc-nb.tc.baidu.com ~]$ for i in ` cat qianmo_bignat.txt `;do cat 2019-07-12 | grep $i | awk -F "," '{print $5 }' | awk 'BEGIN {max = 0} {if ($1+0 > max+0) max=$1} END {print "Max=", max}' ; done | awk -F " " '{print $2 }' | awk '{sum+=$1} END {print "Sum= ", sum}'

Sum= 1451515105
out
4G

 

转载于:https://www.cnblogs.com/qiaoyanlin/p/11289303.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值