I've got an ESXi VM that does command execution on some 700~ devices on our network. It's using Expect
, and due to the age of this equipment they have periods of poor performance. These two don't mix well - as the Expect script will have to wait really long to get output before proceeding.
To try to avoid this, our team decided that a ping
test should be issued before connecting to the device. If there's packet loss, we'll come back to it later.
The issue we're having is that our ping test looks like this:
loss=`ping -i 0.2 -w 2 $1 | grep "packet loss" | awk '{print $6}'`
loss=${loss%?}
echo "$loss"
10 pings over two seconds - but we get a LOT of 9% Packet Loss responses. For example we usually have 74/700 tests exit preemptively due to packet loss detection. 39/74 of those report 9%, while the rest report in multiples of 10.
Far as we can tell that doesn't really make sense; there are 10 packets being sent...if one is dropped that should be 10% loss. This has been observed infrequently, but it does happen. Is it possible there's something going on in memory that's causing the number 9 to manifest? If these are legitimate instances of packets being lost then it's big news for us.