[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Received Packets Trace
On Tue, 24 Apr 2001, Hadar Burstin wrote:
> In a certain topology, I'm trying to find out how many packets were received
> at node n1.
> I tried:
> set tf [open recv.tr w]
> $ns create-trace Recv $tf $n0 $n1
> ...simulation details ...
>
> close $tf
> exit 0
>
> But the file recv.tr was empty.
Surely you have to close $tf at a certain time (hence the usual finish
routine)?
> In the same simulation with
> set tf [open queue.tr w]
> $ns trace-queue $n0 $n1 $tf
> ...simulation details ...
>
> close $tf
> exit 0
>
> The queue.tr file had many logs of received packets (event "r"). Does
> someone know how come there was nothing written in the file when I used
> "create-trace"?
> (I'm working with ns-allinone-2.1b7a.)
If the close $tf for queue.tr wasn't executed at a certain time (as
part of a scheduled finish routine), the more interesting question, I
think, is why it recorded anything at all.
(Assuming that the close sans time executes at time zero before the
simulator actually runs.)
L.
<L.Wood@surrey.ac.uk>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>