Last active
February 7, 2022 18:43
-
-
Save FlorianHeigl/7940885367332d272b1139a88e369473 to your computer and use it in GitHub Desktop.
find highest number of incoming and outgoing non-unicast packets
This file contains 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
if ! type gawk >/dev/null ; then | |
echo "script requires gawk, please install it via apt/similar" | |
fi | |
cd ~/var/pnp4nagios/perfdata || exit 1 | |
# out | |
for X in */Interface_*_outnucast.rrd; do | |
rrdtool fetch $X MAX -r 300 -s -1h | gawk -v x=$X '{printf(x",\t\t %s,%8.2f,%8.2f \n",strftime("%c",$1),$2,$3) }' | |
done |\ | |
grep -v nan | sort -t',' -r -k3 | head | |
# in | |
for X in */Interface_*_innucast.rrd; do | |
rrdtool fetch $X MAX -r 300 -s -1h | gawk -v x=$X '{printf(x",\t\t %s,%8.2f,%8.2f \n",strftime("%c",$1),$2,$3) }' | |
done |\ | |
grep -v nan | sort -t',' -r -k3 | head | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
still need to get the date ranges figured, but maybe this'll help someone else as a startingpoint.