- CheckMates
- :
- Products
- :
- General Topics
- :
- RX-DRP monitor
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
RX-DRP monitor
Whilst working on tuning our 23800 and 26000T performance issues I realised that couple of one-liners that are already available here in the community only provide cumulative statistics from time when counters were restarted and that might give inaccurate picture if some past event created RX drops that are not occurring anymore. So instead I wrote a script that evaluates "current" state by making two readings (set to 30mins apart but you can change it yourself) and then calculating drop rate based on diff
It's ugly as i had only 3 mins to write it but does the trick. Note it reads RX-DRP counter only!
source /etc/profile.d/CP.sh
if [[ -e /etc/profile.d/vsenv.sh ]]; then
source /etc/profile.d/vsenv.sh
vsenv
fi
runme=true
if [ ! -f rxdrop.curr ]; then touch rxdrop.curr; fi
while $runme; do
echo `date`
mv rxdrop.curr rxdrop.prev
netstat -ni | awk '{print $1" "$4" "$6}' | egrep "^bond|^eth" > rxdrop.curr
while read line; do
if_name=`echo "$line" | awk '{print $1}'`
rx_tot_curr=`echo "$line" | awk '{print $2}'`
rx_drp_curr=`echo "$line" | awk '{print $3}'`
rx_tot_prev=`grep $if_name rxdrop.prev | awk '{print $2}'`
rx_drp_prev=`grep $if_name rxdrop.prev | awk '{print $3}'`
if [ ! $rx_tot_prev ]; then rx_tot_prev=0; fi
if [ ! $rx_drp_prev ]; then rx_drp_prev=0; fi
let diff_tot=rx_tot_curr-rx_tot_prev+1
let diff_drp=rx_drp_curr-rx_drp_prev
rate=`echo 100*$diff_drp/$diff_tot | bc -l`
echo "$if_name ${rate:0:5}%" | sed 's/ \./ 0./'
done < rxdrop.curr
echo
sleep 1800 # time in seconds
done
- Tags:
- kz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can also use the expert mode command sar -n EDEV to see when network error counters were incremented for the last 30 days per interface, averaged out per second over 10-minute sampling periods:
CET (Europe) Timezone Course Scheduled for July 1-2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
awesome! thanks heaps!
