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:
parent
51748aa56d
commit
46fa714b9c
16
Munin.md
Normal file
16
Munin.md
Normal 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
|
||||
```
|
Loading…
Reference in New Issue
Block a user