ns2の最新版(ver2.34)をインストール

ns2の最新版(ver2.34)がリリースされていたので,さっそくインストールしてみた.

Download source:
* current release 2.34 (released Jun 17 2009)

まずは,nsの本家のDownload and Build nsからns-allinone-2.34.tar.gzをダウンロード.

次に,ダウンロードしたファイルを解凍する.

$ tar xvfz ns-allinone-2.34.tar.gz

解凍できたらインストール.

$ cd ns-allinone-2.34
$ ./install

これであとはパスを通せば完了.
nam-1.13の時はエラーが発生してパッチをあてたりとインストールにてこずったが,今回のnam-1.14は無事にインストールできた.

調べてみたところ,前バージョンの2.33がリリースされたのが2008/4/1らしい.
およそ一年ぶりのバージョンアップだが,勝手な予想だとおそらく2.33のエラーを取り除いた安定版といったところではないかと思う.

ns3を使ってみようと思っていたが,しばらくはns2でトライしてみよう.

gnuplot for ns2

gnuplotを使ってns2のトレースファイルを解析した.
ほっとくと忘れそうなので,ここにメモっとく.

# gnuplotを起動
$ gnuplot

# gnuplotでプロットする.
# とりあえずプロットしてみる
gnuplot> plot “ex1.tcp” using 2:18 with line

# 複数データをプロット.
gnuplot> plot “ex1.tcp” using 2:18 title “cwnd” with lines,\
> “ex1.tcp” using 2:20 title “ssthresh” with lines

# 左右両方のY軸を使う
gnuplot> set ytics nomirror
gnuplot> set y2tics

gnuplot> plot “ex1.tcp” using 2:18 title “cwnd” with line,\
> “ex1.tcp” using 2:20 title “ssthresh” with lines, \
> “ex1.tcp” using 2:16 title “seqno” with line axis x1y2

# 図の位置(マージン)を調整
# 現在のマージンを確認
gnuplot> show margin

lmargin is computed automatically
bmargin is computed automatically
rmargin is computed automatically
tmargin is computed automatically

# マージンを変更
gnuplot> set lmargin 10
gnuplot> set bmargin 3
gnuplot> set rmargin 2
gnuplot> set tmargin 1

プロットしたものを画像(eps)として保存するやり方も,そのうちまた書くつもり.

← 前のページ