Hi Rick,
sorry but there are still problems with your script.
Your script requests the variables: RXDRP1, RXDRP2 and RXOK. Then you still do the calculation: if [ "$RXDRP2" -gt "$RXDRP1" ]. Which is not correct as mentioned above. This needs to be removed completly for current versions.
Instead you only need to caclulate with "ethtool -S". But this works only for the interface not for VLANs. So you need to fix the loop as follow first:
detect_rx_drops() {
(renice -20 $BASHPID > /dev/null 2>&1
for DEV in `fw ctl iflist | grep -v "\." | awk '{ print $3 }'`
do
Next thing is, there are different queues where drops can occur (0-6):
rx_queue_0_drops: 0
rx_queue_1_drops: 0
rx_queue_2_drops: 0
rx_queue_3_drops: 0
rx_queue_4_drops: 0
rx_queue_5_drops: 0
rx_queue_6_drops: 0
All of them should be checked gainst an intervall to see if the firewall really drops packets.
Not sure if you need to do some math at this point. Usually the firewall should not drop any packet. So for me would that be an alert.
If this script is going to support people to maximize there performance you also need to add fw ctl pstat to request the fragmented packets versus real transmitted packets on that firewall. If the ratio to high the performance will be degraded a lot.
Please review also these commands:
fw ctl multik print_heavy_conn
fw ctl multik heavy_conn_analyzer
It would make sense to add them to your script as well as it clearly states which connections do use most of the performance of the firewall. But yes, it has nothing to do with the packet flow.