[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] Trace Drops in a Queue



Lim Joo Ghee wrote:

> Hi,
>
> Is there any way to trace packet drops between two nodes?  Know that
> "trace-queue" includes drop packets but it also gives me other info like
> packets received, queued and sent, which is not required by me.  Is
> there a command that will only reflect dropped packets info?
>
> Joo Ghee

You can actually do that. Read ~ns/tcl/lib/ns-link.tcl, and you will find all
the Otcl calls you need (i.e. create-trace Drop, drop-trace). However, it is
easier to play a shell trick and open a piped file:

set file [open "| grep \"^d\" > drops.out" w]

Everything you write to $file will be filtered first, discarding any event
that doesn't start with "d".

-- Felix Hernandez