- 论坛徽章:
- 0
|
echo "202.120.133.211 30701 218.196.193.12 4728 206435 285983976
202.194.63.2 30117 210.42.224.53 13247 103105 145983962
202.194.63.2 30117 210.42.224.54 13247 103105 145983962
202.194.63.2 3011 210.42.224.55 13247 103105 145983962
202.194.63.2 30117 210.42.224.56 13247 103105 145983962
125.220.19.75 27594 202.196.160.251 37432 95661 132603849
219.245.130.3 32425 59.70.232.59 2685 90895 124766246
202.118.110.92 30701 202.196.145.169 2018 79721 113698228
219.226.74.29 23096 202.197.186.105 4201 60613 81521692
"|sort|awk '
{
if($1!=ip){
if(ip!="")printf("%s:%d条,%d源端口数,%d目标IP数,%d个包,%d字节\n",ip,num,asort(sports),asort(dips),packs,bytes);
ip=$1;
num=packs=bytes=0;
delete sports;
delete dips;
}
num++;
packs+=$5;
bytes+=$6;
sports[$2]++;
dips[$3]++;
}
END{
if (ip!=""){
printf("%s:%d条,%d源端口数,%d目标IP数,%d个包,%d字节\n",ip,num,asort(sports),asort(dips),packs,bytes);
ip=$1;
num=0;
delete sports;
delete dips;
}
}'
125.220.19.75:1条,1源端口数,1目标IP数,95661个包,132603849字节
202.118.110.92:1条,1源端口数,1目标IP数,79721个包,113698228字节
202.120.133.211:1条,1源端口数,1目标IP数,206435个包,285983976字节
202.194.63.2:4条,2源端口数,4目标IP数,412420个包,583935848字节
219.226.74.29:1条,1源端口数,1目标IP数,60613个包,81521692字节
219.245.130.3:1条,1源端口数,1目标IP数,90895个包,124766246字节
[ 本帖最后由 zhangshebao 于 2007-8-1 03:45 编辑 ] |
|