Squid checker

From Wikitech
(Difference between revisions)
Jump to: navigation, search
 
Line 4: Line 4:
 
do
 
do
 
   echo "Checking $center squids:"
 
   echo "Checking $center squids:"
   for x in `host rr.$center.wikimedia.org | cut -f 4 -d ' '`
+
   for addr in `host rr.$center.wikimedia.org | cut -f 4 -d ' '`
 
   do
 
   do
     echo -n "$x "
+
     echo -n "$addr "
     ab -n1 -X $x:80 http://en.wikipedia.org/robots.txt >/dev/null && echo "ok" || echo "FAIL"
+
     http_proxy=http://$addr:80 \
 +
      wget --quiet -O /dev/null \
 +
      http://en.wikipedia.org/robots.txt \
 +
      && echo "ok" || echo "FAIL"
 
   done
 
   done
 
done
 
done
 
</pre>
 
</pre>

Revision as of 05:49, 21 October 2005

#!/bin/bash
for center in pmtpa lopar knams yaseo
do
  echo "Checking $center squids:"
  for addr in `host rr.$center.wikimedia.org | cut -f 4 -d ' '`
  do
    echo -n "$addr "
    http_proxy=http://$addr:80 \
      wget --quiet -O /dev/null \
      http://en.wikipedia.org/robots.txt \
      && echo "ok" || echo "FAIL"
  done
done
Personal tools
Namespaces

Variants
Actions
Navigation
Ops documentation
Wiki
Toolbox