-1

I'm trying to use a trace file in a traffic generator, here is what i put so far in my input trace file:

0.000000 50
0.000404 50
0.020404 50
0.040404 50
0.060404 50
0.080404 50
0.100404 50
0.120404 50
0.140404 50

but i'm getting an error saying: bad file size in /home/sami/Desktop/ns2/input.tr

probably, this is due to the fact that fields in the trace format file are not appropriate, so what is the appropriate format ? any help will be very appreciated

hek2mgl
  • 152,036
  • 28
  • 249
  • 266
Vladimir90
  • 15
  • 1
  • 3

1 Answers1

0

The above is not a regular trace file . Is an xgraph plot-file.tr . And not a very good one. A typical trace.tr is 1... 100 MB !

Example, a real trace file (The first 5 lines of 56,000 lines are shown) :

M 0.00000 6 (523.00, 222.00, 0.00), (1086.00, 453.00), 40.00
s 1.000000000 _21_ AGT  --- 0 cbr 1000 [0 0 0 0] ------- [21:0 18:0 32 0] [0] 0 0
r 1.000000000 _21_ RTR  --- 0 cbr 1000 [0 0 0 0] ------- [21:0 18:0 32 0] [0] 0 0
s 1.000000000 _21_ RTR  --- 0 AODV 48 [0 0 0 0] ------- [21:255 -1:255 30 0] [0x2 1 1 [18 0] [21 4]] (REQUEST)
s 1.000535000 _21_ MAC  --- 0 AODV 106 [0 ffffffff 15 800] ------- [21:255 -1:255 30 0] [0x2 1 1 [18 0] [21 4]] (REQUEST)
r 1.001383323 _22_ MAC  --- 0 AODV 48 [0 ffffffff 15 800] ------- [21:255 -1:255 30 0] [0x2 1 1 [18 0] [21 4]] (REQUEST)

Knud Larsen
  • 5,753
  • 2
  • 14
  • 19
  • Okay, and how do you generate such a trace file from a video or an audio file ? – Vladimir90 Dec 19 '15 at 19:28
  • ? Which "traffic generator" is it about ? Why do you think you can create ``network flow´´ (file.tr) from a music file, or from a video file ? – Knud Larsen Dec 20 '15 at 06:37
  • i'm talking about tracefile object specified in ns2 as "Application/Traffic/Trace". Actually i found in a paper intitled "Determination of Bit-rate adaptation thresholds for the Opus Codec for Voip Services" that they did it with an audio file, so i just need to do the same – Vladimir90 Dec 21 '15 at 16:59