Skip to content

Instantly share code, notes, and snippets.

@lapo-luchini
Created February 16, 2017 08:28
Show Gist options
  • Save lapo-luchini/16b8aa9de6ecda1f094f45949708f808 to your computer and use it in GitHub Desktop.
Save lapo-luchini/16b8aa9de6ecda1f094f45949708f808 to your computer and use it in GitHub Desktop.
awk script to extract Java dumps from a log file (`killall -3 jsvc`)
BEGIN { dump = 0; }
/^Full thread dump/ { dump = "dump " prev ".txt"; }
dump != 0 { print $0 > dump; }
/^ PSPermGen/ { getline; print $0 > dump; dump = 0; }
{ prev = $0; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment