Änderungen

Zur Navigation springen Zur Suche springen
97 Bytes hinzugefügt ,  22:30, 29. Sep. 2006
Zeile 97: Zeile 97:  
<pre>
 
<pre>
 
awk '{if($2=="localhost")s=1;z++;if(z>5){if($0=="")exit;print $1,substr($2,1,length($2)-5)}}END{print "---"}' /etc/hosts >/tmp/dat
 
awk '{if($2=="localhost")s=1;z++;if(z>5){if($0=="")exit;print $1,substr($2,1,length($2)-5)}}END{print "---"}' /etc/hosts >/tmp/dat
 +
 
wget -O - http://127.0.0.1:2006|awk '{if(s==1){if($0=="")exit;if($5<10&&$5!="0.00"&&$5<11)print $1,$2,$5};if($2=="Topology")s=1}' >>/tmp/dat
 
wget -O - http://127.0.0.1:2006|awk '{if(s==1){if($0=="")exit;if($5<10&&$5!="0.00"&&$5<11)print $1,$2,$5};if($2=="Topology")s=1}' >>/tmp/dat
awk 'BEGIN{print "graph g {"}{if(s==1){print node[$1]" -- "node[$2]" style=\"setLinewidth(2)\";"};if(s!=1){node[$1]=$2};if($1=="---")s=1}END{print "}"}' /tmp/dat >/tmp/g.dot
+
 
 +
awk 'BEGIN{print "graph g {"}{if(s==1){if($3<12){pre="edge[style=";typ="dotted] ";if($3<6)typ="dashed] ";if($3<4)typ="normal] ";if($3<2)typ="bold] "};print pre""typ""node[$1]" -- "node[$2]";"};if(s!=1){node[$1]=$2};if($1=="---")s=1}END{print "}"}' /tmp/dat >/tmp/g.dot
 
</pre>
 
</pre>
  

Navigationsmenü