echo " topN - top number of rows to return"
echo " sortQ - [r|s] to sort on (r)ecv-q or (s)end-q"
exit 1
fi
SLEEP=$1
TOPN=$2
if [ "${3}" = "r" ]
then
SORTQ=2
else
SORTQ=3
fi
while [ 1 ]
do
netstat -t -p | grep Recv-Q > netstatHEAD.lst
netstat -t -p | grep tcp | sort -k ${SORTQ} -g -r > netstatDETAIL.lst
clear
cat netstatHEAD.lst
head -n ${TOPN} netstatDETAIL.lst
echo " -- -- -- -- -- -- -"
echo "Status Counts"
echo " -- -- -- -- -- -- -"
cat netstatDETAIL.lst | grep tcp | cut -c 77-88 | sort -u |\
while read netstatSTATUS
do
statusCnt=`cat netstatDETAIL.lst | grep $netstatSTATUS | wc -l`
echo $netstatSTATUS $statusCnt
done
sleep ${SLEEP}
done
Vertiv
| Avocent® Universal Management Gateway Appliance Installer/User Guide |
104