trace2stats is a set of AWK scripts to get node-to-node statistics from the tracefiles generated by the ns-2 network simulator.


* 다음 awk 파일들은 새로운 트레이스 포맷   ($ns_ use-newtrace)을 사용



[ avgStats.awk]



설명 : average throughput, average delay ,average jitter 계산

사용법 : awk -f avgStats.awk <변수> <파일명.tr>


<변수> : src - flow source node id
            dst - flow destination node id
            flow - flow id
            pkt - size (bytes) of the DATA packets in the flow as generated by the application

Notice that source and destination nodes' ids, as well as the flow's one are those defined by the ns-2 simulator: nodes' ids are sequential (i.e. the first node defined has id 0, the second has id 1, and so on), while the flow id can be either sequential, as for the nodes', or explicit (using the 'set id' command in OTcl).



사용 예 : awk -f avgStats.awk src=2 dst=3 flow=0 pkt=1000 test.tr > stats.out

결과 예

flowID: 0
flowType: tcp
srcNode: 2
destNode: 3
startTime: 100
stopTime: 116
receivedPkts: 1331
avgTput[kbps]: 652.014
avgDelay[ms]: 142.693
avgJitter1[ms]: 7.96962
avgJitter2[ms]: 2.45535
avgJitter3[ms]: 7.87847
avgJitter4[ms]: 2.40291
참고 파일 : http://www.tlc-networks.polito.it/fiore/


[instantThroughput.awk]


* 다음 awk 파일들은 새로운 트레이스 포맷($ns_ use-newtrace)을 사용

설명 : 순간의 throughput 정보를 나타내며 해당 정보는 plotgraphs를 이용하여 표현 할수 있다.

사용법 : 'awk instantThroughput.awk <변수> <파일명.tr>

<변수> : tic - sampling time (secs)
           src - flow source node id
           dst - flow destination node id
           flow - flow id
           pkt - size (bytes) of the DATA packets in the flow as generated by the application>'

Notice that source and destination nodes' ids, as well as the flow's one are those defined by the ns-2 simulator: nodes' ids are sequential (i.e. the first node defined has id 0, the second has id 1, and so on), while the flow id can be either sequential, as for the nodes', or explicit (using the 'set id' command in OTcl).



사용예 : awk -f instantThroughput.awk tic=1.0 src=2 dst=3 flow=0 pkt=1000 test.tr > stats.out

결과 예 :

flow flowType src dst time  throughput
0  tcp   2  3  21.0006 153.502
0  tcp   2  3  22.002  268.428
0  tcp   2  3  23.0025 265.487
0  tcp   2  3  24.0029  265.487
0  tcp   2  3  25.0225  273.041
  ... ... ... ... ... ...
참고 파일 : http://www.tlc-networks.polito.it/fiore/



[instantJitter.awk]


* 다음 awk 파일들은 새로운 트레이스 포맷($ns_ use-newtrace)을 사용

설명: 순간 적인 jitter 정보를 나타내며 해당 정보는 plotgraphs를 이용하여 표현 할수 있다

사용법 : awk instantJitter.awk <변수> <파일명.tr>

<변수> : tic - sampling time (secs)
           src - flow source node id
           dst - flow destination node id
           flow - flow id
           pkt - size (bytes) of the DATA packets in the flow as generated by the application

Notice that source and destination nodes' ids, as well as the flow's one are those defined by the ns-2 simulator: nodes' ids are sequential (i.e. the first node defined has id 0, the second has id 1, and so on), while the flow id can be either sequential, as for the nodes', or explicit (using the 'set id' command in OTcl).



사용예 : awk -f instantJitter.awk tic=1.5 src=2 dst=3 flow=0 pkt=1000 test.tr > stats.out

결과 예

# flow flowType src dst time jitter1 jitter2 jitter3 jitter4


0 sctp 2 3 21.4355 14.5948 4.08588 6.74654 1.80138
0 sctp 2 3 22.4359 8.4203 1.96976 1.41199 0.00916002
0 sctp 2 3 23.4364 9.80695 1.97042 1.38674 0.000684994
0 sctp 2 3 24.4368 11.9544 1.9711 2.28218 0.000688122
0 sctp 2 3 25.4704 54.8983 6.2007 8.66905 0.216112
  ... ... ... ... ... ... ... ... ...

-----------------------------------------------------------------------------------

Note on jitter results

-----------------------------------------------------------------------------------


Four different values for the jitter are calculated by trace2stats.
The formulas used are reported below:


[1] jitter(i+1) = jitter(i) + |(R(i+1)-S(i+1))-(R(i)-S(i))|
[2] jitter(i+1) = jitter(i) + |(R(i+1)-R(i))-(R(i)-R(i-1))|
[3] jitter(i+1) = jitter(i) + [ |(R(i+1)-S(i+1))-(R(i)-S(i))| - jitter(i) ] / 16
[4] jitter(i+1) = jitter(i) + [ |(R(i+1)-R(i))-(R(i)-R(i-1))| - jitter(i) ] / 16

where S(i) is the time at which packet 'i' was transmitted from the sender
R(i) is the time at which packet 'i' was received by the destination


참고 파일 : http://www.tlc-networks.polito.it/fiore/
작성 : 2006.12.08 by 임헌정
http://www.4ellene.net

2006/12/10 00:30 2006/12/10 00:30
TAG
Trackback address :: http://4ellene.net/tt/trackback/1065
  1. cheap vicodin

    Tracked from cheap vicodin 2008/11/29 20:59  삭제

    Blog

Comments List

  1. dengx2 2007/09/18 15:16

    담아갑니다. 원치 않으시면 지우겠습니다.

  2. 궁금하군요. 2008/02/02 23:11

    위에 aodv 예제 파일을 다운받아서 예제에서 만들어 지는 aodv_3nodes_tcp.tr파일을 awk 명령으로 실행하려고 하니 이렇게 ...awk -f instantThroughput.awk tic=1.0 src=2 dst=3 flow=0 pkt=1000 aodv_3nodes_tcp.tr > stats.out 하였는데 stats.out 파일 열어보면 패킷이 리시버되지 않았다고 하내요 값은 거의 대부분이 0 으로 나오고....어떻게 된건지...실행 방법이 잘못 된건가요?

    • adioshun 2008/02/03 21:41

      시뮬레이션이 제대로 실행 되지 않은거 같네요..

      서로의 전파 범위나 다른 문제로 실제 패킷이 전달되지 않았으니..

      결과도 그렇게 나올수 있고요..

      아님 tr버젼??(new, 유선,무선)이 안맞아 awk가 tr을 인식 못할수도 있습니다

  3. teen kelly video shower 2008/05/23 04:39

  4. naked amish 2008/05/23 06:04

  5. brian j white gay 2008/05/23 07:32

  6. teen bras 2008/05/23 07:54

  7. aname porn 2008/05/24 01:33

Write a comment.

[로그인][오픈아이디란?]