1
mirror of https://git.dn42.dev/wiki/wiki.git synced 2024-12-01 14:58:11 +01:00

Munin - first script is for graphing the number of routes per interface

This commit is contained in:
dn42 wiki 2013-12-06 22:15:21 +01:00
parent 51748aa56d
commit 46fa714b9c

16
Munin.md Normal file
View File

@ -0,0 +1,16 @@
## Graph your routes
```
#!/bin/bash
if [ "$1" = "config" ];then
echo graph_title Number of routes
echo graph_vlabel num. routes
echo graph_category network
echo graph_scale no
for AS in $(ip r|sed 's/.* dev //;s/ .*//'|sort|uniq -c|grep as|awk '{print $2}');do
echo $AS.label $AS
done
else
ip r|sed 's/.* dev //;s/ .*//'|sort|uniq -c|grep as|awk '{print $2".value "$1}'
fi
```