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

Problem with xgraph




The following code generates nam and ns trace files without any errors.
The NAM animation runs fine.
To generate the xgraph I run the following commands:

%getrc -o out.getrc -s n0 out.tr 
%raw2xg out.getrc > out.raw2xg
%xgraph -bb -tk -nl -m -x time -y packets < out.raw2xg

the xgraph command gives a "Floating exception"  error.
All the xgraph outputs from the test-suites display fine and the files
created by getrc, and raw2xg are nonempty.


Could someone kindly point out the right procedure to generate xgraph
outputs?

Thanks in advance,
-Shreyas

>>>>>
# NS CODE 
set ns [new Simulator]
        
#
# Create two nodes
#
set n0 [$ns node]
set n1 [$ns node]

#
# Create a trace and arrange for all the trace events of the
# links subsequently created to be dumped to "out.tr" #
set f [open out.tr w]
$ns trace-all $f
 
set n [open out.nam w]
$ns namtrace-all $n

proc finish {} {
        global ns f n
        $ns flush-trace
        close $f
        close $n
        exit 0
}

# Connect the two nodes with a 1.5Mb link with a transmission
# delay of 10ms using FIFO drop-tail queuing #
$ns duplex-link $n0 $n1 1.5Mb 10ms DropTail

 

#
# Set up BSD Tahoe TCP connection
set tcp_src1 [new Agent/TCP]
set tcp_snk1 [new Agent/TCPSink]
$ns attach-agent $n0 $tcp_src1
$ns attach-agent $n1 $tcp_snk1
$ns connect $tcp_src1 $tcp_snk1
 

$tcp_src1 set interval_ 0.49

#
# Create ftp sources at the each node #
set ftp1 [$tcp_src1 attach-source FTP]
 

        
#
# Start up the first ftp

$ns at 1.0 "$ftp1 start"
$ns at 4.5 "$ftp1 stop"

# 
# run the simulation for 5 simulated seconds #

$ns at 5.0 "finish"
$ns run