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

Re: Node throughput and packet delay



On Mon, 11 Oct 1999, George Riley wrote:

> Consider running the "postprocessing" on-the-fly, using TCL's output pipe
> for the log file, as follows:
> 
> set logfile [open "|readtr2 3 4 1 2 >> test2.throughput.logs" w]
> $ns trace-all $logfile
> 
> In my example above, I use a program I wrote "readtr2" to analyze raw
> tracefiles, but it doesn't need to huge amount of disk space.  The reduced
> data is written to test2.throughput.logs, and is just a summary of stuff I
> was looking for in the tracefiles.

Problem is, you can't do that straight off the bat; you need a whole
(big) tracefile to start with and work from before you can start
writing your trusted parser to strip out interesting events.

And not all analysis is a single pass.

What's wrong with:

set logfile [open "|gzip > output.tr.gz" w]
$ns trace-all $logfile

? IMO, this should be the standard tracefile generating method/example
in ns (certainly for satellite/mobility stuff, which tends to be
larger); tracefiles compress rather well. You need gzip to download
and install ns, so it's safe to assume that the userbase has gzip
experience.

Piping gzcat output to awk is no great change. Being able to compare
gzipped tracefiles directly during validation would be a nice touch,
but that's a bit too dependent on the gzip implementation/default
level (not sure -9 is worth it over the default -6).

I find that gzip dumps to file in chunks of 50K or so; a little bursty
if you tend to watch the growing output file to make sure the
simulation is doing something, but the resulting saving of filespace
is well worth it.

L.

I keep wondering why there isn't a standard dump-everything-to-
output.tr routine in ~ns/tcl/lib that scripts can just call, too.

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>