2012 February « Erwin Harahap [PDF]

Feb 6, 2012 - How can I get queue length? How to plot data? How do I know C++?; How to solve NS2.35 installation problem

2 downloads 18 Views 44KB Size

Recommend Stories


February 2012 ~ solderblogs [PDF]
Feb 29, 2012 - Here I will give some way / code to open a menu of services from any brand of television. Please choose ... This step needs to be done if we found specific damage caused by abnormal of IC EEPROM program code so that trick may not work

Strait Talk 2012 February (PDF)
Nothing in nature is unbeautiful. Alfred, Lord Tennyson

February | 2012 | Jobs Catalogue !! - WordPress.com [PDF]
Feb 29, 2012 - Posisi permanent. Mohon mencantumkan gaji yang diinginkan. Bagi yang berminat, silahkan mengirim CV anda dalam bentuk pdf atau doc ke :[email protected] .... Proses seleksi terdiri dari tahapan: seleksi administrasi, asesmen kom

February Newsletter 2012
No matter how you feel: Get Up, Dress Up, Show Up, and Never Give Up! Anonymous

Version 10 February 2012
Kindness, like a boomerang, always returns. Unknown

Version 10 February 2012
Life is not meant to be easy, my child; but take courage: it can be delightful. George Bernard Shaw

Outdoor News, February 2012
Ask yourself: Am I a good example for those around me? Next

Version 10 February 2012
Almost everything will work again if you unplug it for a few minutes, including you. Anne Lamott

Desrinah Harahap
Open your mouth only if what you are going to say is more beautiful than the silience. BUDDHA

Club VeeDub Sydney. February 2012
There are only two mistakes one can make along the road to truth; not going all the way, and not starting.

Idea Transcript


Erwin Harahap do Now or Never

Archive for February, 2012

Questioning Mac Posted by Erwin on February 6, 2012 1. How to remote a windows pc via ssh tunnel ssh [pc.remote.address] -L [pc-remote-port]:[pc-name]:[tunnel-port] then use RDC and type –> localhost:[pc-remote-port] 2. Remote from PC to Mac visit this link — > http://dailycupoftech.com/remote-control-mac-from-windows-in-progress/ (http://dailycupoftech.com/remote-control-mac-from-windows-in-progress/) Posted in Uncategorized | Tagged: mac, problem | Leave a Comment »

Questioning NS2 Posted by Erwin on February 1, 2012 I use this question for my own purpose only. Anyone can use it with your own risk. There’s no guarantee the script or anything else will work here. Any comment is welcome but don’t expect any replies. Spam comment will be trashed. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.

How is packet created ? What is DSR ? Where is location C++ file code of http/server, http/cache, and http/client ? How do I know the NS2 code reference ? How can I get queue length? How to plot data? How do I know C++? How to solve NS2.35 installation problem “tk8.5.10 make failed!” in Linux CentOS 5.7 How to solve NS2.35 installation problem “can’t find X includes ” in Linux CentOS 5.7 How to solve NS2.35 installation problem “tclcl-1.20 make failed! ” in Linux CentOS 5.7

1. How is packet created SRPacket p; p.src = net_id; p.pkt = allocpkt(); hdr_sr *srh = hdr_sr::access(p.pkt); hdr_ip *iph = hdr_ip::access(p.pkt); hdr_cmn *cmnh = hdr_cmn::access(p.pkt); 2. What is DSR DSR is stand for Dynamic Source Routing for details see this link –> http://www.skynet.ie/~bryan/dsr_faq/ (http://www.skynet.ie/~bryan/dsr_faq/) 3. Where is location C++ file code of http/server, http/cache, and http/client ? details code in http.h , http.cc ~/ns-allinone-2.35/ns-2.35/webcache 4. How do I know the NS2 code reference ? see this link –> http://www-rp.lip6.fr/ns-doc/ns226-doc/html/hierarchy.htm (http://www-rp.lip6.fr/ns-doc/ns226-doc/html/hierarchy.htm) 5. How can I get queue length ? If you set up a router, you can then create a trace file for it… $ns duplex-link $router0 $router1 10Mb .05 DropTail set routertracefile [open routertrace.tr w] $ns trace-queue $router0 $router1 $routertracefile And after the simulation runs, you can use an awk script like this one: — #usage: #awk -f makerouterstats.awk routertrace.tr .1 #or other trace file and time increment BEGIN { drops = 0 recv = 0 numinque = 0 time = 0 packetsent = 0 timewindow = ARGV[2] ARGC = 2 } $2 > (time + timewindow) {updateTime()} $1 == “r” {rec += 1} $1 == “+” {numinque += 1} $1 == “-” {numinque += -1; packetsent+=1} $1 == “d” {drops += 1; numinque+= -1} function updateTime() { time = time + timewindow printf(“%s \t %s \t %s \t %s \t %s \n”, time, numinque, drops, recv, packetsent) rec = 0 drops = 0 packetsent = 0 } END { updateTime() } 6. How to plot data? Suppose you want to plot the file d1.dat. Try the following. #set terminal postfile (These commented lines would be used to ) #set output “d1_plot.ps” (generate a postscript file. ) set title “Energy vs. Time for Sample Data” set xlabel “Time” set ylabel “Energy” plot “d1.dat” with lines pause -1 “Hit any key to continue” This example uses the default X11 window for output. It sets the name of the plot title. Then it set the names of the x-axis and y-axis to Time and Energy (default would be X and Y). The plot command is really the key line. It plots data from a file, using column 1 and 2 as the default x and y values. The limits are set automatically, and data points are connected with lines. Some variations on the plot command are: Plot a function. To plot a function instead of a data file, try plot sin(x) with lines Plot in a specified range. To plot a data set in the range 0 < x < 10 and 0.2 < y < 0.6, try plot [0,10] [0.2,0.6] "d1.dat" with lines Plot with points. To plot with points, or to plot with lines and points, use the folloing forms plot "d1.dat" with points plot "d1.dat" with linespoints Plot different columns of datafile. For example, to take x from column 4 and y from column 2, plot "data.dat" using 4:2 with lines Plot several functions at once. To plot d1.dat against the line y(x)=exp(-x), try plot "d1.dat" with lines, exp(x) with lines Change the Plot Title. To change the name that appears in the ‘key’ in the corner of the plot, try plot "d1.dat" title 'Sample Data' with lines or, if you don’t like the key, try plot "d1.dat" notitle with lines Rainbow plot –> http://gnuplot.sourceforge.net/demo/rainbow.html (http://gnuplot.sourceforge.net/demo/rainbow.html) Another Example –> http://www2.yukawa.kyoto-u.ac.jp/~ohnishi/Lib/gnuplot.html (http://www2.yukawa.kyoto-u.ac.jp/~ohnishi/Lib/gnuplot.html) http://sparky.rice.edu/gnuplot.html (http://sparky.rice.edu/gnuplot.html) Gnuplot Demo –> http://gnuplot.sourceforge.net/demo/ (http://gnuplot.sourceforge.net/demo/) 7. How do I know C++ ? see this link http://www.cplusplus.com/doc/tutorial/ (http://www.cplusplus.com/doc/tutorial/) 8. How to solve NS2.35 installation problem “tk8.5.10 make failed!” in Linux CentOS 5.7 Requirements : # yum install \ libX11-devel libXext-devel libXau-devel libXmu-devel gcc-c++ 9. How to solve NS2.35 installation problem “can’t find X includes ” in Linux CentOS 5.7 Requirements : # yum install \ libXt-devel 10. How to solve NS2.35 installation problem “tclcl-1.20 make failed! ” in Linux CentOS 5.7 Requirements : # yum install \ gcc-c++

Posted in Uncategorized | 1 Comment » Blog at WordPress.com.

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.