BEGIN {
n=0;
total1 = 0;
total2 = 0;
total3 = 0;
total4 = 0;
total5 = 0;
total6 = 0;
total7 = 0;
total8 = 0;
total9 = 0;
total10 = 0;
throughput=0;
SIMUL_TIME=500;
AWK_INTERVAL=400;
}
{
if ( ($1 =="r") && ($5 =="ack") && ($4 =="0") ) {
if (n == 0) start = $2;
total1 ++;
end = $2;
}if (1<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($4 =="1") ) {
if (n == 0) start = $2;
total2 ++;
end = $2;
}if (2<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($4 =="2") ) {
if (n == 0) start = $2;
total3 ++;
end = $2;
}if (3<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($4 =="3") ) {
if (n == 0) start = $2;
total4 ++;
end = $2;
}if (4<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($4 =="4") ) {
if (n == 0) start = $2;
total5 ++;
end = $2;
}if (5<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($4 =="5") ) {
if (n == 0) start = $2;
total6 ++;
end = $2;
}if (6<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($4 =="6") ) {
if (n == 0) start = $2;
total7 ++;
end = $2;
}if (7<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($4 =="7") ) {
if (n == 0) start = $2;
total8 ++;
end = $2;
}if (8<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($4 =="8") ) {
if (n == 0) start = $2;
total9 ++;
end = $2;
}if (9<data)
{
if ( ($1 =="r") && ($5 =="ack") && ($4 =="9") ) {
if (n == 0) start = $2;
total10 ++;
end = $2;
}
}
}
}
}
}
}
}
}
}
}
END {
print total1;
print total2;
print total3;
print total4;
print total5;
print total6;
print total7;
print total8;
print total9;
print total10;
print "============================================================";
}
'Network > Ns2_source' 카테고리의 다른 글
NS2_Reno, cwnd, ip packet size의 11Mbps 무선랜, 100Mbps유선랜 ns2_upstream10/downstream10 (0) | 2009.01.18 |
---|---|
NS2_스크립트 up_down_stream2.sh_upstream10/downstream10 (0) | 2009.01.18 |
NS2_awk-ack_rec_wireless_upstream10/downstream10 (0) | 2009.01.18 |
NS2_awk-ack_send_wire_upstream10/downstream10 (0) | 2009.01.18 |
NS2_awk-ack_send_wireless_upstream10/downstream10 (0) | 2009.01.18 |