you van use an awk script like this:
BEGIN {
sendLine = 0;
recvLine = 0;
fowardLine = 0;
}
$0 ~/^s.* AGT/ {
sendLine ++ ;
}
$0 ~/^r.* AGT/ {
recvLine ++ ;
}
$0 ~/^f.* RTR/ {
fowardLine ++ ;
}
END {
printf "cbr s:%d r:%d, r/s Ratio:%.4f, f:%d \n", sendLine, recvLine,
(recvLine/sendLine),fowardLine;
}
keerthika wrote:
>
>
> hi ,
>
> for calculating packet delivary ratio ,PDR=received pkts / send
> pkts
>
--
View this message in context:
http://www.nabble.com/how-to-calculate-packet-drop-ratio-tp20494720p20560820.html
Sent from the ns-users mailing list archive at Nabble.com.