Build precise queries to find exactly what you need
Press ESC to close
1) for me, at least, the arp command is /usr/sbin/arp
2) it might be better to just replace everything from the gta= line to the ttl= line with something like:
ttl=$( /usr/sbin/arp -n | grep ether | awk ‘{ print $3 }’ | sort | uniq -d | wc -l )
This is 10 times faster (on my relatively small net), but only counts 1 for each mac that appears two or more times. If you want a MAC appearing three times to give a count of two, try:
gta=`/usr/sbin/arp -n | grep ether | awk ‘{ print $3 }’` gtl=`echo “$gta” | sort -u | wc -l` tot=`echo “$gta” | wc -l` ttl=$(( $tot – $gtl ))
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!