wlan-stats

来自「柯老师网站上找到的」· 代码 · 共 42 行

TXT
42
字号
#!/bin/tcsh## basically a wrapper around other wlan-* scripts# works on a trace file produced by ns# generates latency and bw stats for each identifiable flow# outputs channel utilization stats alsoif ( $#argv < 1 || $#argv > 2 ) then  echo usage:  echo "      " $0 \<scenario name\> "[<"interval size for instantaneous bw">" = 0.25"]"  exit 1endifset scenario = $1set tracefile = $scenario.trset interval = 0.25if ( $#argv == 2 ) then  set interval = $2endifset outfile = $scenario.statsrm -f $outfileecho Identifying various flows for scenario $scenarioecho ------------------------------foreach flow ( `egrep "^s .*\-Nl AGT .*\-If " $tracefile | gawk '{ print $41; }' | sort -gu` )  echo Flow $flow | tee -a $outfile  echo No. of IFQ drops = `egrep "^d .*\-Nl IFQ \-Nw IFQ .*\-If $flow " $tracefile | wc -l` | tee -a $outfile  echo No. of MAC drops = `egrep "^d .*\-Nl MAC \-Nw RET .*\-If $flow " $tracefile | wc -l` | tee -a $outfile  wlan-bw $scenario $flow $interval | tee -a $outfile  wlan-lat $scenario $flow AGT | tee -a $outfile  wlan-latdist $scenario $flow  echo ------------------------------ | tee -a $outfileendecho Channel Utilization Stats: | tee -a $outfilewlan-chutil $scenario | tee -a $outfileecho ------------------------------ | tee -a $outfileecho Goodput Stats: | tee -a $outfilewlan-goodput $scenario $interval | tee -a $outfile

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?