Skip to content

Instantly share code, notes, and snippets.

@yurrriq
Last active August 29, 2015 14:03
Show Gist options
  • Save yurrriq/23f8b4463cebca6c3ba5 to your computer and use it in GitHub Desktop.
Save yurrriq/23f8b4463cebca6c3ba5 to your computer and use it in GitHub Desktop.
Hacky one-liner to extract worker stack completion times from mover logs
#!/bin/bash
cat logs/mover.log | awk '/in [0-9]+\.[0-9]+s/{time = $11; sub(/s/, "", time); print $4"-"$3"-"$2"@"$5" " time}' | gnuplot -p -e "set xdata time; set timefmt \"%Y-%b-%d@%H:%M:%S\"; set yrange [0 : 10]; set xrange [\"2014-Jul-07@00:00:00\" : \"2014-Jul-09@00:00:00\"]; set term png size 1920,1080; set xtics format \"%m-%d %H:%M\"; plot '-' using 1:2" | base64
#!/bin/bash
cat logs/mover.log | awk '/[0-9]+\.[0-9]+s/{ time = $11; sub(/s/, "", time); print time }' > mover-$(date +'%s').data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment