Created
June 6, 2017 15:55
-
-
Save poy/2afd264560914bb604daa75e86022eae to your computer and use it in GitHub Desktop.
Detects and counts dropped UDP packets for 60 seconds (for port 0x0d81)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in `seq 0 60`; do | |
echo "sample $i"; | |
timestamp=$(date +%s) | |
value=$(cat /proc/net/udp | grep ": 0100007F:0D81" | tr -s [:space:] '|' | sed 's/|/ /g' | awk '{print $13}') | |
echo "$timestamp $value" | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment