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

Re: [ns] Can't run TFRC simulation scripts



On Tue, 9 Jan 2001, Sally Floyd wrote:

> Sorry, it turns out that the old scripts don't run because a
> line in tfrc-sink.cc got changed 

by you. 'fess up!

> from:
> 
>   printf ("time: %7.5f loss_rate: %7.5f \n", now, drops);
> 
> to:
> 
>   printf ("time: %7.5f sample 0: %5d loss_rate: %7.5f \n",
> 			now, sample, drops);
> 
> and the awkfiles at "http://www.aciri.org/tfrc/sims1.html"
> couldn't deal with it.  I will check in a fix to tfrc-sink.cc tomorrow,
> adding back the old line.

printf ("time: %7.5f loss_rate: %7.5f sample 0: %5d \n",
                        now, drops, sample);

strikes me as the more backwards-compatible line, keeping all info
there. And sample_0: is better still for awk parsing, as it's
obviously one field. If you're going to fix your original debug
mistake (tfrc-sink.cc 1.23), that's probably the best long-term
choice, rather than kludging in a second line as you've just done
(1.32).

since your page says:

  These scripts are quick amalgams of shell scripts, awk, tcl, and
  whatever else was handy at the time, so they are not intended as an
  example of good programming style.

I'd give serious thought to updating the awk scripts in such cases,
rather than altering output functionality from ns. But more thought
when altering output originally is required; this could have been
avoided entirely...

L.

had similar considerations when modifying the satellite dump routine
and related perl scripts.

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