Here’s how to load the extension:
sh> mod -S
MODULE NAME SIZE OBJECT FILE
MODULE NAME SIZE OBJECT FILE
ffffffffa000f460 dm_mod 84337 /lib/modules/2.6.32-431.20.3.el6_lustre.g5a7c614.x86_64/kernel/drivers/md/dm-mod.ko
crash> extend /root/lustre-ext.so
/root/lustre-ext.so: shared object loaded
crash> lustre -l /tmp/foo.dl
lustre_walk_cpus(0, 5, 1)
cmd: p (*cfs_trace_data[0])[0].tcd.tcd_cur_pages
p (*cfs_trace_data[0])[0].tcd.tcd_pages.next
…
lustre: Dumped 355 total debug pages from 2 CPUs to /tmp/foo.dl
Adding a new Geo:
* create health check for each host in geo
* create new weighted record set for each host in geo
www-sfo: 10.0.0.1 weight: 10 setID: host1 health check: yes
www-sfo: 10.0.0.2 weight: 10 setID: host2 health check: yes
* create alias record with latency routing:
www: www-sfo region: sfo evaluate target health: yes
The input is a csv where the first column is the URL you want to test. The curl line spits out the response code. -f means curl will return an exit code if the fetch fails.
# test URLs
for x in $(cat "$file" | grep -v URL | cut -d, -f1) ; do code=$(curl -s -w %{response_code} -f "$x" -o /dev/null) && echo "URL OK $code: $x"; done
# convert URLs to nginx redirects
sed -e 's#^http://[^/]*\(/[^,]*\),\(.*\)$#rewrite ^\1$ \2 permanent;#' < "$file" > /tmp/output_redirects