The first NS script set ns [new Simulator] set nf [open out.nam w] $ns namtrace-all $nf proc finish {} { global ns nf $ns flush-trace close $nf exec n