Skip to content

Instantly share code, notes, and snippets.

@acsrujan
Last active March 17, 2016 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acsrujan/16709761375871141b92 to your computer and use it in GitHub Desktop.
Save acsrujan/16709761375871141b92 to your computer and use it in GitHub Desktop.
Parses rails log file from bash to find out requests which took more than 75sec
arr=```grep -o "in.*ms" $LOG_FILE_NAME | awk '{if ($2-75000ms > 0) print $2}' | sort -r -n``` | for i in $arr; do grep -B 1 $i $LOG_FILE_NAME |awk '{print $2 FS $3}'; echo $i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment