blob: 9d84ee05705165f1497966e283f2e0dab203cc02 [file] [log] [blame]
#!/bin/bash
set -e
javaProcessesOutput="$(jps -lmv | grep -v jps)"
echo
echo "Outputting java stack information to stdout (see build.log)" >&2
echo "Java processes: $javaProcessesOutput"
echo
javaPids="$(echo "$javaProcessesOutput" | sed 's/ .*//g')"
echo "Getting stack for processes: $javaPids"
echo
for pid in $javaPids; do
echo jstack "$pid"
jstack "$pid" || true
echo
done
echo "Done getting stack for processes: $javaPids"