BEGIN {
n=0;
total0 = 0;
total1 = 0;
total2 = 0;
total3 = 0;
total4 = 0;
total5 = 0;
total6 = 0;
total7 = 0;
total8 = 0;
total9 = 0;
throughput=0;
SIMUL_TIME=500;
AWK_INTERVAL=400;
}
{
if ( ($1 =="r") && ($5 =="ack") && ($3 =="0") ) {
if (n == 0) start = $2;
total0 ++;
n +=1;
#print n,"\t",$0;
end = $2;
}
if (1<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($3 =="1") ) {
if (n == 0) start = $2;
total1 ++;
n +=1;
#print n,"\t",$0;
end = $2;
}
if (2<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($3 =="2") ) {
if (n == 0) start = $2;
total2 ++;
n +=1;
#print n,"\t",$0;
end = $2;
}
if (3<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($3 =="3") ) {
if (n == 0) start = $2;
total3 ++;
n +=1;
#print n,"\t",$0;
end = $2;
}
if (4<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($3 =="4") ) {
if (n == 0) start = $2;
total4 ++;
n +=1;
#print n,"\t",$0;
end = $2;
}
if (5<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($3 =="5") ) {
if (n == 0) start = $2;
total5 ++;
n +=1;
#print n,"\t",$0;
end = $2;
}
if (6<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($3 =="6") ) {
if (n == 0) start = $2;
total6 ++;
n +=1;
#print n,"\t",$0;
end = $2;
}
if (7<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($3 =="7") ) {
if (n == 0) start = $2;
total7 ++;
n +=1;
#print n,"\t",$0;
end = $2;
}
if (8<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($3 =="8") ) {
if (n == 0) start = $2;
total8 ++;
n +=1;
#print n,"\t",$0;
end = $2;
}
if (9<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($3 =="9") ) {
if (n == 0) start = $2;
total9 ++;
n +=1;
#print n,"\t",$0;
end = $2;
}
}
}
}
}
}
}
}
}
}
}
END {
print total0;
print total1;
print total2;
print total3;
print total4;
print total5;
print total6;
print total7;
print total8;
print total9;
print "============================================================";
}
'Network > Ns2_source' 카테고리의 다른 글
NS2_awk-ack_rec_wire_upstream10/downstream10 (0) | 2009.01.18 |
---|---|
NS2_awk-ack_rec_wireless_upstream10/downstream10 (0) | 2009.01.18 |
NS2_awk-ack_send_wireless_upstream10/downstream10 (0) | 2009.01.18 |
NS2_awk-throughput_upstream10/downstream10 (0) | 2009.01.18 |
NS2_awk-throughput1_upstream10/downstream10 (0) | 2009.01.18 |