命令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 NXDOawk


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 NXDOgrep

 


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

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


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}' sudo


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= 1451515105out4G

相關文章
相關標籤/搜索