📄 make-cbr-files.sh
字号:
#! /bin/sh# $Id: make-cbr-files.sh,v 1.1.1.1 2000/08/28 18:40:17 jinyang Exp $# produces directory hierarchy of cbr scripts with paths in the# following format:# ./num-nodes/side-length/pkts-per-conn/num-conn # num-conn is either 3n (each node connects to 3 others) or nn (each# node connects to every other node)# traffic is generated to occur between 10 and 400 seconds; the# `empty' 10 seconds in the beginning allows the routing protocols and# location service etc. to initialize.# first argument is the directory holding nscbr_dir=`pwd`echo "working in cbr dir $cbr_dir"ns=$1/nscbrgen_nn=$1/cmu/scripts/cbrgen-nn.tclcbrgen_cn=$1/cmu/scripts/cbrgen-cn.tclrate=4.0c=3# fill in actual packet/num-conns dirs and cbr filesfunction make_cbr_files () { # dir, n, side length dir=$1 n=$2 length=$3 last_dir=$dir/$n/$length if [ ! -d $dir/$n ] ; then mkdir $dir/$n fi if [ ! -d $last_dir ] ; then mkdir $last_dir fi for num_pkts in 800 6 do if [ ! -d $last_dir/$num_pkts ] ; then mkdir $last_dir/$num_pkts fi # make the cbr files $ns $cbrgen_nn -type cbr -nn $n -seed $RANDOM -rate $rate -numpackets $num_pkts > $last_dir/$num_pkts/nn $ns $cbrgen_cn -type cbr -nn $n -seed $RANDOM -rate $rate -numpackets $num_pkts -c $c > $last_dir/$num_pkts/${c}n done} # build cbr script hierarchy for n, lengthfor length in 500 700 800do make_cbr_files $cbr_dir 50 $lengthdonefor length in 700 1000 1200do make_cbr_files $cbr_dir 100 $lengthdonefor length in 800 1200 1500do make_cbr_files $cbr_dir 150 $lengthdonefor length in 1000 1400 1700do make_cbr_files $cbr_dir 200 $lengthdonefor length in 1100 1500 1900do make_cbr_files $cbr_dir 250 $lengthdonefor length in 1200 1700 2100do make_cbr_files $cbr_dir 300 $lengthdone
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -