Lustre Crash Tool Extensions

This will let you dump the Lustre log from a kernel vmcore:
https://github.com/Xyratex/crash-tools/tree/master/cr-ext

This is an extended backtrace plugin/extension for crash that decodes the parameters in a nice way, and maybe works:
https://wiki.hpdd.intel.com/display/~jhammond/XBT+-+extended+backtrace+extension+for+crash

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

Updating Route 53 Zones

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

Downloading RTMP Video

The utility rtmpdump comes with a helper app called rtmpsrv that can intercept RTMP requests and save them to disk. Here’s how:


# set up iptables redirect
sudo iptables -t nat -A OUTPUT -p tcp --dport 1935 -j REDIRECT
# start the server
rtmpsrv
# stop redirect
sudo iptables -t nat -D OUTPUT -p tcp --dport 1935 -j REDIRECT
# run the rtmpdump
rtmpdump -r "rtmp://tmphost.com:1935/cfx/st" -a "cfx/st" -f "LNX 11,2,202,411" -W "http://player.org/assets/swf/player.swf?programid=340179" -p "http://www.player.org" -y "mp4:trimmed/program/id/id/program.id.MP4-D20.mp4" -o program.340179.MP4-D20.flv
# use ffmpeg to cut video to part you want
ffmpeg -i 20140715085918001_hd.flv -ss 00:46:44 -to 00:48:53 -strict -2 output.mp4

Recording a screencast

Use pavucontrol to select the recording device you want to use, in this case I used the monitor device in order to get the video sound.

recordmydesktop -o /tmp/file.ogv -fps 24 –pause-shortcut Control+Mod1+o

ffmpeg can convert it to mp4 for upload to youtube.

Testing links to see if they work

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

Good times.