jablonka.czprosek.czf

netmap

Subversion Repositories:
[/] [gen_stats_ospf] - Blame information for rev 119

 

Line No. Rev Author Line
11simandl#!/bin/sh
2 
3# (c)2003 by Jan Krupa (krupaj@mobilnews.cz)
4# http://www.mobilnews.cz/honza/
5 
6PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin
7export PATH
8 
9STATS_PATH=/home/www/cgi-bin/netmap
10STATS_PATH_DATA=$STATS_PATH/data
11 
1293simandlNAME=jablonecka
131simandl 
1493simandlDATABASE=$STATS_PATH_DATA/$NAME.link
15 
16105simandl$STATS_PATH/gen_ospf_link.pl \
17119simandl| grep -Ev "infinity|atom|10.33.72.78|10.33.30.16|10.33.0.72|10.33.25.242|olive|hexa|virtuozzo" \
18105simandl > $DATABASE.ospf
19 
20119simandl 
21#
22# jikos:
23# check if there is any of the [jabu,hasit,jab715 ; jgw,ogw,sitelka] links alive
24# (workaround for the script not being able to cope with 3Way/DRother links)
25#
26# sitelka is the Full/DR one
27grep -E '92;jabu;sitelka|92;hasit;sitelka|92;jab715;sitelka' $DATABASE.ospf >/dev/null 2>&1
28if [ $? -eq 0 ]; then
29 cat $DATABASE.ospf | grep -Ev '82;jabu;jgw;|82;jabu;ogw;|82;hasit;jgw|82;hasit;ogw;|82;jab715;jgw;|82;jab715;ogw;' > $DATABASE.ospfA
30 mv $DATABASE.ospfA $DATABASE.ospf
31fi
32# jgw is the Full/DR one
33grep -E '92;jab715;jgw|92;jabu;jgw|92;hasit;jgw' $DATABASE.ospf >/dev/null 2>&1
34if [ $? -eq 0 ]; then
35 cat $DATABASE.ospf | grep -Ev '82;jabu;sitelka;|82;jabu;ogw;|82;hasit;sitelka|82;ogw;hasit;|82;jab715;sitelka;|82;jab715;ogw;' > $DATABASE.ospfA
36 mv $DATABASE.ospfA $DATABASE.ospf
37fi
38# ogw is the Full/DR one
39grep -E '92;jab715;ogw|92;jabu;ogw|92;ogw;hasit' $DATABASE.ospf >/dev/null 2>&1
40if [ $? -eq 0 ]; then
41 cat $DATABASE.ospf | grep -Ev '82;jabu;sitelka;|82;jabu;jgw;|82;hasit;sitelka|82;hasit;jgw;|82;jab715;sitelka;|82;jab715;jgw;' > $DATABASE.ospfA
42 mv $DATABASE.ospfA $DATABASE.ospf
43fi
44 
45 
46 
47 
4829simandlcat $DATABASE.basic | grep -v "^00" > $DATABASE
491simandlcat $DATABASE.ospf >> $DATABASE
50 
51 
52for LINE in `/bin/ls -1 $STATS_PATH_DATA | /bin/grep .config`; do
53 $STATS_PATH/gen_onestatpict `/bin/echo $LINE | /bin/awk -F. '{ printf "%s", $1 }'` &>/dev/null
54done
55 
5630simandlconvert /home/www/html/netmap/out/jablonecka.png -resize 160x95 /home/www/html/wm/images/prosek_netmap.png
5760simandlconvert /home/www/html/netmap/out/jablonecka.png -resize 660x440 /home/www/html/wm/images/netmap.jpg
5830simandl 

Powered by WebSVN 2.2.1