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}'
[[email protected] ~]$ 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