Skip to main content

Posts

Showing posts with the label xgraph

xgraph in Ubuntu 20.04 | Solved (Issues)

XGRAPH in Ubuntu 20.04 xgraph - Standalone application in Ubuntu 20.04 There are two options to use either 32 bit or 64 bit OS, to find what OS instruction set your OS is Using, use the following command  $] uname -a  Linux pradeepkumar-Latitude-3410 5.8.0-36-generic #40~20.04.1-Ubuntu SMP Wed Jan 6 10:15:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux In the above output x86_64 indicates its 64 bit, else it may show i686 which indicates its a 32 bit OS You can watch the complete instruction here on how to do? $] gedit ~/.bashrc include the following line in the .bashrc file (Copy the PAT H of xgraph and paste it in .bashrc)     alias xgraph=/home/pradeepkumar/XGraph4.38_linux64/bin/xgraph After the above change is made, restart the computer and its set.  $] xgraph  A window will be popping up as shown below xgraph How to plot a data file #data.xg 1 3.2 4.3 2 4.5 6.9 3 9.8 11.9 4 10.2 17.6 5 7.8 22.2 To plot the above two curves, the following command can be ...

Print the Congestion Window Graph in NS2

Congestion window size is a major factor in predicting the performance of a TCP Network. NS2 handles the Congestion window like a variable cwnd_ and it can be printed to a graph and as well printed as values at various intervals of time. The following tcl script will let you understand the working of the network (TCP Reno Protocol) and also helps you in plotting the characteristics of Congestion window value. Xgraph is used to plot the congestion window. To install xgraph, one can use the ns-allinone-2.3x package or directly install using yum install xgraph (fedora) and sudo apt-get install xgraph (Ubuntu, Linux Mint and Debian families) Each and every line of the code is explained with comments. Still any doubts, please post your queries in the comment section. When you copy and paste the following lines in your editor, see whether the characters are ASCII or else download here . #create simulator set ns [new Simulator]         #to create nodes set n0 [$...

AWK Scripts for NS2 to process data from Trace Files

AWK Scripts are very good in processing the data from the log (trace files) which we get from NS2. If you want to process the trace file manually, here is the detail Here is a sample of trace file from NS2 (However ns2 supports a new type of trace file also), but this post will make you understand the old trace format only. r 0.030085562 _0_ MAC  --- 0 message 32 [0 ffffffff 1 800] ------- [1:255 -1:255 32 0] r 0.030110562 _0_ RTR  --- 0 message 32 [0 ffffffff 1 800] ------- [1:255 -1:255 32 0] s 1.119926192 _0_ RTR  --- 1 message 32 [0 0 0 0] ------- [0:255 -1:255 32 0] AWK Scripts are very good in processing the data column wise. For example the first column in the above trace file represents r, s which indicates receive, sent respectively. If we want to trace the entire r and s alone from this trace file we can represent it as $1 So $1 represents ACTION $2 Time $3 Node ID $4 Layer $5 Flags $6 seqno $7 type $8 Size $14 Energy (if the network nodes includes EnergyMo...