📄 wlan-stats
字号:
#!/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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -