'Network'에 해당되는 글 204건
- 2009.01.18 NS2_awk-throughput_upstream10/downstream10
- 2009.01.18 NS2_awk-throughput1_upstream10/downstream10
- 2009.01.18 NS2_ awk-UDP_upstream10/downstream10
- 2009.01.18 ns2 소스 컴파일 방법
- 2009.01.18 [NS2] 새로운 어플리케이션 추가 (ex. Ping)
- 2009.01.18 Ns2 _Transport & Application
- 2009.01.18 Ns2 TCL 파일_3개 무선 노드 연결하기
- 2009.01.18 Ns2 ? traffic-connection & node-movement 에 대한여
- 2009.01.18 Ns2 _Transport & Application
- 2009.01.18 awk script- delay 계산
BEGIN {
n=0;
total0 = 0;
total1 = 0;
total2 = 0;
total3 = 0;
total4 = 0;
throughput0=0;
throughput1=0;
throughput2=0;
throughput3=0;
throughput4=0;
nm0=(nn+2);
nm1=(nn+3);
nm2=(nn+4);
nm3=(nn+5);
nm4=(nn+6);
nm5=(nn+7);
nm6=(nn+8);
nm7=(nn+9);
nm8=(nn+10);
nm9=(nn+11);
SIMUL_TIME=500;
AWK_INTERVAL=400;
}
{
if ( ($1 =="r") && ($4 =="AGT") && ($7 =="tcp") && ($3 ==nm0)) {
if (n == 0) start0 = $2;
total0 += $8 * 8;
end0 = $2;
}
if (1<nn)
{
if ( ($1 =="r") && ($4 =="AGT") && ($7 =="tcp") && ($3 == (nm1))) {
if (n == 0) start1 = $2;
total1 += $8 * 8;
end1 = $2;
}
if (2<nn)
{
if ( ($1 =="r") && ($4 =="AGT") && ($7 =="tcp") && ($3 == (nm2))) {
if (n == 0) start2 = $2;
total2 += $8 * 8;
end2 = $2;
}if (3<nn)
{
if ( ($1 =="r") && ($4 =="AGT") && ($7 =="tcp") && ($3 == (nm3))) {
if (n == 0) start3 = $2;
total3 += $8 * 8;
end3 = $2;
}if (4<nn)
{
if ( ($1 =="r") && ($4 =="AGT") && ($7 =="tcp") && ($3 == (nm4))) {
if (n == 0) start4 = $2;
total4 += $8 * 8;
end4 = $2;
}if (5<nn)
{
if ( ($1 =="r") && ($4 =="AGT") && ($7 =="tcp") && ($3 == (nm5))) {
if (n == 0) start5 = $2;
total5 += $8 * 8;
end5 = $2;
}if (6<nn)
{
if ( ($1 =="r") && ($4 =="AGT") && ($7 =="tcp") && ($3 == (nm6))) {
if (n == 0) start6 = $2;
total6 += $8 * 8;
end6 = $2;
}if (7<nn)
{
if ( ($1 =="r") && ($4 =="AGT") && ($7 =="tcp") && ($3 == (nm7))) {
if (n == 0) start7 = $2;
total7 += $8 * 8;
end7 = $2;
}if (8<nn)
{
if ( ($1 =="r") && ($4 =="AGT") && ($7 =="tcp") && ($3 == (nm8))) {
if (n == 0) start8 = $2;
total8 += $8 * 8;
end8 = $2;
}if (9<nn)
{
if ( ($1 =="r") && ($4 =="AGT") && ($7 =="tcp") && ($3 == (nm9))) {
if (n == 0) start9 = $2;
total9 += $8 * 8;
end9 = $2;
}
}
}
}
}
}
}
}
}
}
}
END {
throughput0 = (total0)/ ( (1000) * 500 );
throughput1 = (total1)/ ( (1000) * 500 );
throughput2 = (total2)/ ( (1000) * 500 );
throughput3 = (total3)/ ( (1000) * 500 );
throughput4 = (total4)/ ( (1000) * 500 );
throughput5 = (total5)/ ( (1000) * 500 );
throughput6 = (total6)/ ( (1000) * 500 );
throughput7 = (total7)/ ( (1000) * 500 );
throughput8 = (total8)/ ( (1000) * 500 );
throughput9 = (total9)/ ( (1000) * 500 );
#Bandwidth 1Mbps = 1000Kbps
print throughput0,"\t",total0;
print throughput1,"\t",total1;
print throughput2,"\t",total2;
print throughput3,"\t",total3;
print throughput4,"\t",total4;
print throughput5,"\t",total5;
print throughput6,"\t",total6;
print throughput7,"\t",total7;
print throughput8,"\t",total8;
print throughput9,"\t",total9;
print "========================================================="
}
'Network > Ns2_source' 카테고리의 다른 글
NS2_awk-ack_send_wire_upstream10/downstream10 (0) | 2009.01.18 |
---|---|
NS2_awk-ack_send_wireless_upstream10/downstream10 (0) | 2009.01.18 |
NS2_awk-throughput1_upstream10/downstream10 (0) | 2009.01.18 |
NS2_ awk-UDP_upstream10/downstream10 (0) | 2009.01.18 |
ns2 소스 컴파일 방법 (0) | 2009.01.18 |
BEGIN {
n0=0;
n1=0;
n2=0;
n3=0;
n4=0;
n5=0;
n6=0;
n7=0;
n8=0;
n9=0;
total0 = 0;
total1 = 0;
total2 = 0;
total3 = 0;
total4 = 0;
total5 = 0;
total6 = 0;
total7 = 0;
total8 = 0;
total9 = 0;
throughput0=0;
throughput1=0;
throughput2=0;
throughput3=0;
throughput4=0;
throughput5=0;
throughput6=0;
throughput7=0;
throughput8=0;
throughput9=0;
SIMUL_TIME=500;
AWK_INTERVAL=400;
}
{
if ( ($1 =="r") && ($5 =="tcp") && ($4 =="0") && ($3 ==nn)) {
if (n0 == 0) start0 = $2;
n0++;
total0 += $6 * 8;
end0 = $2;
}
if (1<nn)
{
if ( ($1 =="r") && ($5 =="tcp") && ($4 =="1") && ($3 ==nn)) {
if (n1 == 0) start1 = $2;
n1++;
total1 += $6 * 8;
end1 = $2;
}
if (2<nn)
{
if ( ($1 =="r") && ($5 =="tcp") && ($4 =="2") && ($3 ==nn)) {
if (n2 == 0) start2 = $2;
n2++;
total2 += $6 * 8;
end2 = $2;
}
if (3<nn)
{
if ( ($1 =="r") && ($5 =="tcp") && ($4 =="3") && ($3 ==nn)) {
if (n3 == 0) start3 = $2;
n3++;
total3 += $6 * 8;
end3 = $2;
}
if (4<nn)
{
if ( ($1 =="r") && ($5 =="tcp") && ($4 =="4") && ($3 ==nn)) {
if (n4 == 0) start4 = $2;
n4++;
total4 += $6 * 8;
end4 = $2;
}
if (5<nn)
{
if ( ($1 =="r") && ($5 =="tcp") && ($4 =="5") && ($3 ==nn)) {
if (n5 == 0) start5 = $2;
n5++;
total5 += $6 * 8;
end5 = $2;
}
if (6<nn)
{
if ( ($1 =="r") && ($5 =="tcp") && ($4 =="6") && ($3 ==nn)) {
if (n6 == 0) start6 = $2;
n6++;
total6 += $6 * 8;
end6 = $2;
}
if (7<nn)
{
if ( ($1 =="r") && ($5 =="tcp") && ($4 =="7") && ($3 ==nn)) {
if (n7 == 0) start7 = $2;
n7++;
total7 += $6 * 8;
end7 = $2;
}
if (8<nn)
{
if ( ($1 =="r") && ($5 =="tcp") && ($4 =="8") && ($3 ==nn)) {
if (n8 == 0) start8 = $2;
n8++;
total8 += $6 * 8;
end8 = $2;
}
if (9<nn)
{
if ( ($1 =="r") && ($5 =="tcp") && ($4 =="9") && ($3 ==nn)) {
if (n9 == 0) start9 = $2;
n9++;
total9 += $6 * 8;
end9 = $2;
}
}
}
}
}
}
}
}
}
}
}
END {
throughput0 = (total0)/ ( (1000) * 500 );
throughput1 = (total1)/ ( (1000) * 500 );
throughput2 = (total2)/ ( (1000) * 500 );
throughput3 = (total3)/ ( (1000) * 500 );
throughput4 = (total4)/ ( (1000) * 500 );
throughput5 = (total5)/ ( (1000) * 500 );
throughput6 = (total6)/ ( (1000) * 500 );
throughput7 = (total7)/ ( (1000) * 500 );
throughput8 = (total8)/ ( (1000) * 500 );
throughput9 = (total9)/ ( (1000) * 500 );
#Bandwidth 1Mbps = 1000Kbps
print throughput0,"\t",total0;
print throughput1,"\t",total1;
print throughput2,"\t",total2;
print throughput3,"\t",total3;
print throughput4,"\t",total4;
print throughput5,"\t",total5;
print throughput6,"\t",total6;
print throughput7,"\t",total7;
print throughput8,"\t",total8;
print throughput9,"\t",total9;
print "========================================================="
}
'Network > Ns2_source' 카테고리의 다른 글
NS2_awk-ack_send_wireless_upstream10/downstream10 (0) | 2009.01.18 |
---|---|
NS2_awk-throughput_upstream10/downstream10 (0) | 2009.01.18 |
NS2_ awk-UDP_upstream10/downstream10 (0) | 2009.01.18 |
ns2 소스 컴파일 방법 (0) | 2009.01.18 |
[NS2] 새로운 어플리케이션 추가 (ex. Ping) (0) | 2009.01.18 |
내용을 보시려면 비밀번호를 입력하세요.
내용을 보시려면 비밀번호를 입력하세요.
내용을 보시려면 비밀번호를 입력하세요.
내용을 보시려면 비밀번호를 입력하세요.
내용을 보시려면 비밀번호를 입력하세요.
내용을 보시려면 비밀번호를 입력하세요.
내용을 보시려면 비밀번호를 입력하세요.
내용을 보시려면 비밀번호를 입력하세요.